docs: 初始化文档项目
This commit is contained in:
parent
089ad69a96
commit
c79cd2f4c2
@ -14,19 +14,6 @@
|
||||
<!-- 由 vite 注入 VITE_APP_TITLE 变量,在 .env 文件内配置 -->
|
||||
<title><%= VITE_APP_TITLE %></title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
// 生产环境下注入百度统计
|
||||
if (window._VBEN_ADMIN_PRO_APP_CONF_) {
|
||||
var _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement('script');
|
||||
hm.src =
|
||||
'https://hm.baidu.com/hm.js?97352b16ed2df8c3860cf5a1a65fb4dd';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -5,7 +5,7 @@ import { defineConfig } from 'vitepress';
|
||||
import { version } from '../../../package.json';
|
||||
|
||||
export const en = defineConfig({
|
||||
description: 'Vben Admin & Enterprise level management system framework',
|
||||
description: 'y-code-platform & Enterprise level management system framework',
|
||||
lang: 'en-US',
|
||||
themeConfig: {
|
||||
darkModeSwitchLabel: 'Theme',
|
||||
@ -55,7 +55,7 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
|
||||
items: [
|
||||
{
|
||||
link: 'introduction/vben',
|
||||
text: 'About Vben Admin',
|
||||
text: 'About y-code-platform',
|
||||
},
|
||||
{
|
||||
link: 'introduction/why',
|
||||
@ -163,7 +163,7 @@ function nav(): DefaultTheme.NavItem[] {
|
||||
text: 'Demo',
|
||||
items: [
|
||||
{
|
||||
text: 'Vben Admin',
|
||||
text: 'y-code-platform',
|
||||
items: [
|
||||
{
|
||||
link: 'https://www.vben.pro',
|
||||
@ -188,7 +188,7 @@ function nav(): DefaultTheme.NavItem[] {
|
||||
items: [
|
||||
{
|
||||
link: 'https://vben.vvbin.cn',
|
||||
text: 'Vben Admin 2.x',
|
||||
text: 'y-code-platform 2.x',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { withPwa } from '@vite-pwa/vitepress';
|
||||
import { defineConfigWithTheme } from 'vitepress';
|
||||
|
||||
import { en } from './en.mts';
|
||||
import { shared } from './shared.mts';
|
||||
import { zh } from './zh.mts';
|
||||
|
||||
@ -9,12 +8,12 @@ export default withPwa(
|
||||
defineConfigWithTheme({
|
||||
...shared,
|
||||
locales: {
|
||||
en: {
|
||||
label: 'English',
|
||||
lang: 'en',
|
||||
link: '/en/',
|
||||
...en,
|
||||
},
|
||||
// en: {
|
||||
// label: 'English',
|
||||
// lang: 'en',
|
||||
// link: '/en/',
|
||||
// ...en,
|
||||
// },
|
||||
root: {
|
||||
label: '简体中文',
|
||||
lang: 'zh-CN',
|
||||
|
File diff suppressed because one or more lines are too long
@ -44,12 +44,12 @@ export const shared = defineConfig({
|
||||
},
|
||||
provider: 'local',
|
||||
},
|
||||
siteTitle: 'Vben Admin',
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/vbenjs/vue-vben-admin' },
|
||||
],
|
||||
siteTitle: 'y-code-platform',
|
||||
// socialLinks: [
|
||||
// { icon: 'github', link: 'https://github.com/vbenjs/vue-vben-admin' },
|
||||
// ],
|
||||
},
|
||||
title: 'Vben Admin',
|
||||
title: 'y-code-platform',
|
||||
vite: {
|
||||
build: {
|
||||
chunkSizeWarningLimit: Infinity,
|
||||
@ -144,7 +144,7 @@ function pwa(): PwaOptions {
|
||||
includeManifestIcons: false,
|
||||
manifest: {
|
||||
description:
|
||||
'Vben Admin is a modern admin dashboard template based on Vue 3. ',
|
||||
'y-code-platform is a modern admin dashboard template based on Vue 3. ',
|
||||
icons: [
|
||||
{
|
||||
sizes: '192x192',
|
||||
@ -158,7 +158,7 @@ function pwa(): PwaOptions {
|
||||
},
|
||||
],
|
||||
id: '/',
|
||||
name: 'Vben Admin Doc',
|
||||
name: 'y-code-platform Doc',
|
||||
short_name: 'vben_admin_doc',
|
||||
theme_color: '#ffffff',
|
||||
},
|
||||
|
@ -5,7 +5,7 @@ import { defineConfig } from 'vitepress';
|
||||
import { version } from '../../../package.json';
|
||||
|
||||
export const zh = defineConfig({
|
||||
description: 'Vben Admin & 企业级管理系统框架',
|
||||
description: '悦码 & 低代码管理系统',
|
||||
lang: 'zh-Hans',
|
||||
themeConfig: {
|
||||
darkModeSwitchLabel: '主题',
|
||||
@ -14,16 +14,16 @@ export const zh = defineConfig({
|
||||
next: '下一页',
|
||||
prev: '上一页',
|
||||
},
|
||||
editLink: {
|
||||
pattern:
|
||||
'https://github.com/vbenjs/vue-vben-admin/edit/main/docs/src/:path',
|
||||
text: '在 GitHub 上编辑此页面',
|
||||
},
|
||||
footer: {
|
||||
copyright: `Copyright © 2020-${new Date().getFullYear()} Vben`,
|
||||
message: '基于 MIT 许可发布.',
|
||||
},
|
||||
langMenuLabel: '多语言',
|
||||
// editLink: {
|
||||
// pattern:
|
||||
// 'https://github.com/vbenjs/vue-vben-admin/edit/main/docs/src/:path',
|
||||
// text: '在 GitHub 上编辑此页面',
|
||||
// },
|
||||
// footer: {
|
||||
// copyright: `Copyright © 2020-${new Date().getFullYear()} Vben`,
|
||||
// message: '基于 MIT 许可发布.',
|
||||
// },
|
||||
// langMenuLabel: '多语言',
|
||||
lastUpdated: {
|
||||
formatOptions: {
|
||||
dateStyle: 'short',
|
||||
@ -55,18 +55,13 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
|
||||
text: '简介',
|
||||
items: [
|
||||
{
|
||||
link: 'introduction/vben',
|
||||
text: '关于 Vben Admin',
|
||||
},
|
||||
{
|
||||
link: 'introduction/why',
|
||||
text: '为什么选择我们?',
|
||||
link: 'introduction/platform',
|
||||
text: '关于悦码',
|
||||
},
|
||||
{ link: 'introduction/quick-start', text: '快速开始' },
|
||||
{ link: 'introduction/thin', text: '精简版本' },
|
||||
{
|
||||
base: '/',
|
||||
link: 'components/introduction',
|
||||
link: 'components/index',
|
||||
text: '组件文档',
|
||||
},
|
||||
],
|
||||
@ -75,48 +70,20 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
|
||||
text: '基础',
|
||||
items: [
|
||||
{ link: 'essentials/concept', text: '基础概念' },
|
||||
{ link: 'essentials/development', text: '本地开发' },
|
||||
{ link: 'essentials/route', text: '路由和菜单' },
|
||||
{ link: 'essentials/settings', text: '配置' },
|
||||
{ link: 'essentials/icons', text: '图标' },
|
||||
{ link: 'essentials/styles', text: '样式' },
|
||||
{ link: 'essentials/external-module', text: '外部模块' },
|
||||
{ link: 'essentials/build', text: '构建与部署' },
|
||||
{ link: 'essentials/server', text: '服务端交互与数据Mock' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '深入',
|
||||
items: [
|
||||
{ link: 'in-depth/login', text: '登录' },
|
||||
// { link: 'in-depth/layout', text: '布局' },
|
||||
{ link: 'in-depth/theme', text: '主题' },
|
||||
{ link: 'in-depth/access', text: '权限' },
|
||||
{ link: 'in-depth/locale', text: '国际化' },
|
||||
{ link: 'in-depth/features', text: '常用功能' },
|
||||
{ link: 'in-depth/check-updates', text: '检查更新' },
|
||||
{ link: 'in-depth/loading', text: '全局loading' },
|
||||
{ link: 'in-depth/ui-framework', text: '组件库切换' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '工程',
|
||||
items: [
|
||||
{ link: 'project/standard', text: '规范' },
|
||||
{ link: 'project/cli', text: 'CLI' },
|
||||
{ link: 'project/dir', text: '目录说明' },
|
||||
{ link: 'project/test', text: '单元测试' },
|
||||
{ link: 'project/tailwindcss', text: 'Tailwind CSS' },
|
||||
{ link: 'project/changeset', text: 'Changeset' },
|
||||
{ link: 'project/vite', text: 'Vite Config' },
|
||||
],
|
||||
items: [{ link: 'in-depth/features', text: '常用功能' }],
|
||||
},
|
||||
{
|
||||
text: '其他',
|
||||
items: [
|
||||
{ link: 'other/project-update', text: '项目更新' },
|
||||
{ link: 'other/remove-code', text: '移除代码' },
|
||||
{ link: 'other/faq', text: '常见问题' },
|
||||
// { link: 'other/project-update', text: '项目更新' },
|
||||
// { link: 'other/remove-code', text: '移除代码' },
|
||||
// { link: 'other/faq', text: '常见问题' },
|
||||
],
|
||||
},
|
||||
];
|
||||
@ -132,10 +99,6 @@ function sidebarCommercial(): DefaultTheme.SidebarItem[] {
|
||||
link: 'technical-support',
|
||||
text: '技术支持',
|
||||
},
|
||||
{
|
||||
link: 'customized',
|
||||
text: '定制开发',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@ -205,55 +168,52 @@ function nav(): DefaultTheme.NavItem[] {
|
||||
items: [
|
||||
{
|
||||
activeMatch: '^/guide/',
|
||||
link: '/guide/introduction/vben',
|
||||
text: '指南',
|
||||
link: '/guide/introduction/platform',
|
||||
text: '低代码平台',
|
||||
},
|
||||
{
|
||||
activeMatch: '^/components/',
|
||||
link: '/components/introduction',
|
||||
text: '组件',
|
||||
activeMatch: '^/materials/',
|
||||
link: '/materials/index',
|
||||
text: '物料',
|
||||
},
|
||||
{
|
||||
text: '历史版本',
|
||||
items: [
|
||||
activeMatch: '^/renderer/',
|
||||
link: '/renderer/index',
|
||||
text: '渲染器',
|
||||
},
|
||||
{
|
||||
link: 'https://doc.vvbin.cn',
|
||||
text: '2.x版本文档',
|
||||
activeMatch: '^/designer/',
|
||||
link: '/designer/index',
|
||||
text: '设计器',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
{
|
||||
text: '低代码管理平台',
|
||||
items: [
|
||||
{
|
||||
text: '悦码 2.0',
|
||||
items: [
|
||||
{
|
||||
link: 'https://y-code-platform.shiyuegame.com',
|
||||
text: '生产版本',
|
||||
},
|
||||
{
|
||||
text: '演示',
|
||||
items: [
|
||||
{
|
||||
text: 'Vben Admin',
|
||||
items: [
|
||||
link: 'https://y-code-platform-pre.shiyue.com',
|
||||
text: '预发布版本',
|
||||
},
|
||||
{
|
||||
link: 'https://www.vben.pro',
|
||||
text: '演示版本',
|
||||
},
|
||||
{
|
||||
link: 'https://ant.vben.pro',
|
||||
text: 'Ant Design Vue 版本',
|
||||
},
|
||||
{
|
||||
link: 'https://naive.vben.pro',
|
||||
text: 'Naive 版本',
|
||||
},
|
||||
{
|
||||
link: 'https://ele.vben.pro',
|
||||
text: 'Element Plus版本',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '其他',
|
||||
items: [
|
||||
{
|
||||
link: 'https://vben.vvbin.cn',
|
||||
text: 'Vben Admin 2.x',
|
||||
link: 'https://custom-chart.shiyuegame.com/',
|
||||
text: '悦码 1.0(已废弃,不再更新功能)',
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -267,45 +227,20 @@ function nav(): DefaultTheme.NavItem[] {
|
||||
text: '更新日志',
|
||||
},
|
||||
{
|
||||
link: 'https://github.com/orgs/vbenjs/projects/5',
|
||||
link: 'https://doc.weixin.qq.com/smartsheet/s3_Aa0ASwZ0AOEr2TbPuaMRoCvs1yzjA?scode=AOwAYgeoAAkoT6VFa0Aa0ASwZ0AOE&tab=q979lj&viewId=vpDUFs',
|
||||
text: '路线图',
|
||||
},
|
||||
{
|
||||
link: 'https://github.com/vbenjs/vue-vben-admin/blob/main/.github/contributing.md',
|
||||
text: '贡献',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
link: '/commercial/technical-support',
|
||||
text: '🦄 技术支持',
|
||||
},
|
||||
text: '👨👦👦 问题反馈',
|
||||
items: [
|
||||
{
|
||||
link: '/sponsor/personal',
|
||||
text: '✨ 赞助',
|
||||
link: 'https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&appChannel=share&inviteCode=22ySzj7pKiw&businessType=9&from=246610&biz=ka&mainSourceId=share&subSourceId=others&jumpsource=shorturl#/pc',
|
||||
text: '热心大姐',
|
||||
},
|
||||
{
|
||||
link: '/commercial/community',
|
||||
text: '👨👦👦 交流群',
|
||||
// items: [
|
||||
// {
|
||||
// link: 'https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&appChannel=share&inviteCode=22ySzj7pKiw&businessType=9&from=246610&biz=ka&mainSourceId=share&subSourceId=others&jumpsource=shorturl#/pc',
|
||||
// text: 'QQ频道',
|
||||
// },
|
||||
// {
|
||||
// link: 'https://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=mjZmlhgVzzUxvdxllB6C1vHpX8O8QRL0&authKey=DBdFbBwERmfaKY95JvRWqLCJIRGJAmKyZbrpzZ41EKDMZ5SR6MfbjOBaaNRN73fr&noverify=0&group_code=4286109',
|
||||
// text: 'QQ群',
|
||||
// },
|
||||
// {
|
||||
// link: 'https://discord.gg/VU62jTecad',
|
||||
// text: 'Discord',
|
||||
// },
|
||||
// ],
|
||||
],
|
||||
},
|
||||
// {
|
||||
// link: '/friend-links/',
|
||||
// text: '🤝 友情链接',
|
||||
// },
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vben/docs",
|
||||
"version": "5.5.3",
|
||||
"name": "@sy/y-code-docs",
|
||||
"version": "1.0.0-alpha.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
111
docs/src/components/introduction/index.md
Normal file
111
docs/src/components/introduction/index.md
Normal file
@ -0,0 +1,111 @@
|
||||
---
|
||||
outline: deep
|
||||
---
|
||||
|
||||
# 快速开始 {#quick-start}
|
||||
|
||||
## 前置准备
|
||||
|
||||
::: info 环境要求
|
||||
|
||||
在启动项目前,你需要确保你的环境满足以下要求:
|
||||
|
||||
- [Node.js](https://nodejs.org/en) 20.15.0 及以上版本,推荐使用 [fnm](https://github.com/Schniz/fnm) 、 [nvm](https://github.com/nvm-sh/nvm) 或者直接使用[pnpm](https://pnpm.io/cli/env) 进行版本管理。
|
||||
- [Git](https://git-scm.com/) 任意版本。
|
||||
|
||||
验证你的环境是否满足以上要求,你可以通过以下命令查看版本:
|
||||
|
||||
```bash
|
||||
# 出现相应 node LTS版本即可
|
||||
node -v
|
||||
# 出现相应 git 版本即可
|
||||
git -v
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
## 启动项目
|
||||
|
||||
### 获取源码
|
||||
|
||||
::: code-group
|
||||
|
||||
```sh [GitHub]
|
||||
# clone 代码
|
||||
git clone https://github.com/vbenjs/vue-vben-admin.git
|
||||
```
|
||||
|
||||
```sh [Gitee]
|
||||
# clone 代码
|
||||
# Gitee 的代码可能不是最新的
|
||||
git clone https://gitee.com/annsion/vue-vben-admin.git
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::: danger 注意
|
||||
|
||||
注意存放代码的目录及所有父级目录不能存在中文、韩文、日文以及空格,否则安装依赖后启动会出错。
|
||||
|
||||
:::
|
||||
|
||||
### 安装依赖
|
||||
|
||||
在你的代码目录内打开终端,并执行以下命令:
|
||||
|
||||
```bash
|
||||
# 进入项目目录
|
||||
cd vue-vben-admin
|
||||
|
||||
# 使用项目指定的pnpm版本进行依赖安装
|
||||
corepack enable
|
||||
|
||||
# 安装依赖
|
||||
pnpm install
|
||||
```
|
||||
|
||||
::: tip 注意
|
||||
|
||||
- 项目只支持使用 `pnpm` 进行依赖安装,默认会使用 `corepack` 来安装指定版本的 `pnpm`。:
|
||||
- 如果你的网络环境无法访问npm源,你可以设置系统的环境变量`COREPACK_NPM_REGISTRY=https://registry.npmmirror.com`,然后再执行`pnpm install`。
|
||||
- 如果你不想使用`corepack`,你需要禁用`corepack`,然后使用你自己的`pnpm`进行安装。
|
||||
|
||||
:::
|
||||
|
||||
### 运行项目
|
||||
|
||||
#### 选择项目
|
||||
|
||||
执行以下命令运行项目:
|
||||
|
||||
```bash
|
||||
# 启动项目
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
此时,你会看到类似如下的输出,选择你需要运行的项目:
|
||||
|
||||
```bash
|
||||
│
|
||||
◆ Select the app you need to run [dev]:
|
||||
│ ○ @vben/web-antd
|
||||
│ ○ @vben/web-ele
|
||||
│ ○ @vben/web-naive
|
||||
│ ○ @vben/docs
|
||||
│ ● @vben/playground
|
||||
└
|
||||
```
|
||||
|
||||
现在,你可以在浏览器访问 `http://localhost:5555` 查看项目。
|
||||
|
||||
#### 运行指定项目
|
||||
|
||||
如果你不想选择项目,可以直接运行以下命令运行你需要的应用:
|
||||
|
||||
```bash
|
||||
pnpm run dev:antd
|
||||
pnpm run dev:ele
|
||||
pnpm run dev:naive
|
||||
pnpm run dev:docs
|
||||
pnpm run dev:play
|
||||
```
|
1
docs/src/designer/index.md
Normal file
1
docs/src/designer/index.md
Normal file
@ -0,0 +1 @@
|
||||
设计器
|
@ -31,7 +31,7 @@
|
||||
|
||||
```bash [.env]
|
||||
# 应用标题
|
||||
VITE_APP_TITLE=Vben Admin
|
||||
VITE_APP_TITLE=y-code-platform
|
||||
|
||||
# 应用命名空间,用于缓存、store等功能的前缀,确保隔离
|
||||
VITE_APP_NAMESPACE=vben-web-antd
|
||||
@ -195,7 +195,7 @@ const defaultPreferences: Preferences = {
|
||||
layout: 'sidebar-nav',
|
||||
locale: 'zh-CN',
|
||||
loginExpiredMode: 'modal',
|
||||
name: 'Vben Admin',
|
||||
name: 'y-code-platform',
|
||||
preferencesButtonPosition: 'auto',
|
||||
watermark: false,
|
||||
},
|
||||
|
@ -64,7 +64,7 @@ updateLocale('en-US');
|
||||
```json
|
||||
{
|
||||
"about": {
|
||||
"desc": "Vben Admin 是一个现代的管理模版。"
|
||||
"desc": "y-code-platform 是一个现代的管理模版。"
|
||||
}
|
||||
}
|
||||
````
|
||||
@ -75,7 +75,7 @@ updateLocale('en-US');
|
||||
```json
|
||||
{
|
||||
"about": {
|
||||
"desc": "Vben Admin is a modern management template."
|
||||
"desc": "y-code-platform is a modern management template."
|
||||
}
|
||||
}
|
||||
````
|
||||
|
@ -11,7 +11,7 @@
|
||||
3. 移除其他组件库依赖及代码,并用你的组件库进行替换相应逻辑,需要改动的地方不多。
|
||||
4. 调整`locales`内的语言文件。
|
||||
5. 调整 `app.vue` 内的组件。
|
||||
6. 自行适配组件库的主题,与 `Vben Admin` 契合。
|
||||
6. 自行适配组件库的主题,与 `y-code-platform` 契合。
|
||||
7. 调整 `.env` 内的应用名
|
||||
8. 在大仓根目录增加 `dev:xxx` 脚本
|
||||
9. 执行 `pnpm install` 安装依赖
|
||||
|
19
docs/src/guide/introduction/platform.md
Normal file
19
docs/src/guide/introduction/platform.md
Normal file
@ -0,0 +1,19 @@
|
||||
# 关于悦码
|
||||
|
||||
::: info 你正在阅读的是 [悦码](y-code-platform.shiyuegame.com) `2.0`版本的文档
|
||||
|
||||
## 特点
|
||||
|
||||
- **最新技术栈**:使用 `Vue3`、`Vite`、`TypeScript` 等前端前沿技术开发。
|
||||
- **组件丰富**:提供了丰富的组件,可以满足大部分的业务需求。
|
||||
- **多UI库支持**:支持 `Ant Design Vue`、`Element Plus` 等主流 UI 库,不再限制于特定框架。
|
||||
|
||||
## 浏览器支持
|
||||
|
||||
- **本地开发**推荐使用`Chrome 最新版`浏览器,**不支持**`Chrome 80`以下版本。
|
||||
|
||||
- **生产环境**支持现代浏览器,不支持 IE。
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png" alt="IE" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Safari |
|
||||
| :-: | :-: | :-: | :-: | :-: |
|
||||
| 不支持 | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
|
@ -24,6 +24,7 @@ git -v
|
||||
|
||||
:::
|
||||
|
||||
<!--
|
||||
## 启动项目
|
||||
|
||||
### 获取源码
|
||||
@ -108,4 +109,4 @@ pnpm run dev:ele
|
||||
pnpm run dev:naive
|
||||
pnpm run dev:docs
|
||||
pnpm run dev:play
|
||||
```
|
||||
``` -->
|
||||
|
@ -1,94 +0,0 @@
|
||||
---
|
||||
outline: deep
|
||||
---
|
||||
|
||||
# 精简版本
|
||||
|
||||
从 `5.0` 版本开始,我们不再提供精简的仓库或者分支。我们的目标是提供一个更加一致的开发体验,同时减少维护成本。在这里,我们将如何介绍自己的项目,如何去精简以及移除不需要的功能。
|
||||
|
||||
## 应用精简
|
||||
|
||||
首先,确认你需要的 `UI` 组件库版本,然后删除对应的应用,比如你选择使用 `Ant Design Vue`,那么你可以删除其他应用, 只需要删除下面两个文件夹即可:
|
||||
|
||||
```bash
|
||||
apps/web-ele
|
||||
apps/web-naive
|
||||
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
如果项目没有内置你需要的 `UI` 组件库应用,你可以直接全部删除其他应用。然后自行新建应用即可。
|
||||
|
||||
:::
|
||||
|
||||
## 演示代码精简
|
||||
|
||||
如果你不需要演示代码,你可以直接删除的`playground`文件夹。
|
||||
|
||||
## 文档精简
|
||||
|
||||
如果你不需要文档,你可以直接删除`docs`文件夹。
|
||||
|
||||
## Mock 服务精简
|
||||
|
||||
如果你不需要`Mock`服务,你可以直接删除`apps/backend-mock`文件夹。同时在你的应用下`.env.development`文件中删除`VITE_NITRO_MOCK`变量。
|
||||
|
||||
```bash
|
||||
# 是否开启 Nitro Mock服务,true 为开启,false 为关闭
|
||||
VITE_NITRO_MOCK=false
|
||||
```
|
||||
|
||||
## 安装依赖
|
||||
|
||||
到这里,你已经完成了精简操作,接下来你可以安装依赖,并启动你的项目:
|
||||
|
||||
```bash
|
||||
# 根目录下执行
|
||||
pnpm install
|
||||
|
||||
```
|
||||
|
||||
## 命令调整
|
||||
|
||||
在精简后,你可能需要根据你的项目调整命令,在根目录下的`package.json`文件中,你可以调整`scripts`字段,移除你不需要的命令。
|
||||
|
||||
```json
|
||||
{
|
||||
"scripts": {
|
||||
"build:antd": "pnpm run build --filter=@vben/web-antd",
|
||||
"build:docs": "pnpm run build --filter=@vben/docs",
|
||||
"build:ele": "pnpm run build --filter=@vben/web-ele",
|
||||
"build:naive": "pnpm run build --filter=@vben/web-naive",
|
||||
"build:play": "pnpm run build --filter=@vben/playground",
|
||||
"dev:antd": "pnpm -F @vben/web-antd run dev",
|
||||
"dev:docs": "pnpm -F @vben/docs run dev",
|
||||
"dev:ele": "pnpm -F @vben/web-ele run dev",
|
||||
"dev:play": "pnpm -F @vben/playground run dev",
|
||||
"dev:naive": "pnpm -F @vben/web-naive run dev"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 其他
|
||||
|
||||
如果你想更进一步精简,你可以删除参考以下文件或者文件夹的作用,判断自己是否需要,不需要删除即可:
|
||||
|
||||
- `.changeset` 文件夹用于管理版本变更
|
||||
- `.github` 文件夹用于存放 GitHub 的配置文件
|
||||
- `.vscode` 文件夹用于存放 VSCode 的配置文件,如果你使用其他编辑器,可以删除
|
||||
- `./scripts/deploy` 文件夹用于存放部署脚本,如果你不需要docker部署,可以删除
|
||||
|
||||
## 应用精简
|
||||
|
||||
当你确定了某个应用,你还可以进一步精简:
|
||||
|
||||
### 删除不需要的路由及页面
|
||||
|
||||
- 在应用的 `src/router/routes` 文件中,你可以删除不需要的路由。其中 `core` 文件夹内,如果只需要登录和忘记密码,你可以删除其他路由,如忘记密码、注册等。路由删除后,你可以删除对应的页面文件,在 `src/views/_core` 文件夹中。
|
||||
|
||||
- 在应用的 `src/router/routes` 文件中,你可以按需求删除不需要的路由,如`demos`、`vben` 目录等。路由删除后,你可以删除对应的页面文件,在 `src/views` 文件夹中。
|
||||
|
||||
### 删除不需要的组件
|
||||
|
||||
- 在应用的 `packages/effects/common-ui/src/ui` 文件夹中,你可以删除不需要的组件,如`about`、`dashboard` 目录等。删除之前请先确保你的路由中没有引用到这些组件。
|
@ -1,49 +0,0 @@
|
||||
# 关于 Vben Admin
|
||||
|
||||
::: info 你正在阅读的是 [Vben Admin](https://github.com/vbenjs/vue-vben-admin) `5.0`版本的文档!
|
||||
|
||||
- Vben Admin 2.x 目前已存档,仅进行重大问题修复。
|
||||
- 新版本与旧版本不兼容,如果你使用的是旧版本(v2、v3),请查看 [Vue Vben Admin 2.x 文档](https://doc.vvbin.cn)
|
||||
- 如发现文档有误,欢迎提交 [issue](https://github.com/vbenjs/vue-vben-admin/issues) 帮助我们改进。
|
||||
- 如果你只是想体验一下,你可以查看[快速开始](./quick-start.md)。
|
||||
|
||||
:::
|
||||
|
||||
[Vben Admin](https://github.com/vbenjs/vue-vben-admin) 是一个基于 [Vue3.0](https://github.com/vuejs/core)、[Vite](https://github.com/vitejs/vite)、 [TypeScript](https://www.typescriptlang.org/) 的中后台解决方案,目标是为开发中大型项目提供开箱即用的解决方案。包括二次封装组件、utils、hooks、动态菜单、权限校验、多主题配置、按钮级别权限控制等功能。项目会使用前端较新的技术栈,可以作为项目的启动模板,以帮助你快速搭建企业级中后台产品原型。也可以作为一个示例,用于学习 `vue3`、`vite`、`ts` 等主流技术。该项目会持续跟进最新技术,并将其应用在项目中。
|
||||
|
||||
## 特点
|
||||
|
||||
- **最新技术栈**:使用 `Vue3`、`Vite`、`TypeScript` 等前端前沿技术开发。
|
||||
- **国际化**:内置完善的国际化方案,支持多语言切换。
|
||||
- **权限验证**:完善的权限验证方案,按钮级别权限控制。
|
||||
- **多主题**:内置多种主题配置和黑暗模式,满足个性化需求。
|
||||
- **动态菜单**:支持动态菜单,可以根据权限配置显示菜单。
|
||||
- **Mock 数据**:基于 `Nitro` 的本地高性能 Mock 数据方案。
|
||||
- **组件丰富**:提供了丰富的组件,可以满足大部分的业务需求。
|
||||
- **规范**:代码规范,使用 `ESLint`、`Prettier`、`Stylelint`、`Publint`、`CSpell` 等工具保证代码质量。
|
||||
- **工程化**:使用 `Pnpm Monorepo`、`TurboRepo`、`Changeset` 等工具,提高开发效率。
|
||||
- **多UI库支持**:支持 `Ant Design Vue`、`Element Plus`、`Naive` 等主流 UI 库,不再限制于特定框架。
|
||||
|
||||
## 浏览器支持
|
||||
|
||||
- **本地开发**推荐使用`Chrome 最新版`浏览器,**不支持**`Chrome 80`以下版本。
|
||||
|
||||
- **生产环境**支持现代浏览器,不支持 IE。
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png" alt="IE" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Safari |
|
||||
| :-: | :-: | :-: | :-: | :-: |
|
||||
| 不支持 | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
|
||||
|
||||
## 贡献
|
||||
|
||||
- [Vben Admin](https://github.com/vbenjs/vue-vben-admin) 还在持续更新中,本项目欢迎您的参与,共同维护,逐步完善,打造更好的中后台解决方案。
|
||||
- 如果你有兴趣加入我们,可以通过以下方式开始,我们会根据你的活跃度邀请你加入。
|
||||
|
||||
::: info 加入我们
|
||||
|
||||
- 长期提交 `PR`。
|
||||
- 提供有价值的建议。
|
||||
- 参与讨论,帮助解决 `issue`。
|
||||
- 共同维护文档。
|
||||
|
||||
:::
|
@ -1,23 +0,0 @@
|
||||
# 为什么选择我们?
|
||||
|
||||
::: info 写在前面
|
||||
|
||||
我们不会去和其他框架做比较。我们认为每个框架都有自己的特点,适合不同的场景。我们的目标是提供一个简单、易用的框架,让开发者可以快速上手,专注于业务逻辑的开发。所以我们只会不断完善和优化我们的框架,提供更好的体验。
|
||||
|
||||
:::
|
||||
|
||||
我们致力于为开发者提供一个高效、现代、易用的前端框架。我们的解决方案基于最新的技术栈,如 Vue3、Vite 和 TypeScript,确保您在构建项目时始终走在技术的前沿。同时,我们注重代码的质量与规范,通过严格的工具链保证代码的一致性和可维护性。无论是初创项目还是企业级应用,我们的框架都能帮助您快速构建、迭代和部署。
|
||||
|
||||
## 框架历程
|
||||
|
||||
从 Vue Vben Admin 1.x 版本开始,框架经历了许多迭代和优化。从一开始使用 `Vite 0.x` 版本,没有现成的插件,开发了很多自定义插件来弥合 Webpack 和 Vite 之间的差异。虽然很多现在已经被代替,但是我们的初衷一直没有变,就是提供一个简单、易用的框架。
|
||||
|
||||
虽然中间有段时间由社区维护,但我们一直密切关注 Vue Vben Admin 的发展。见证了许多开发者使用 Vben Admin,并提供了许多宝贵的建议和反馈。非常感谢大家的支持和贡献,这些都是我们持续改进 Vben Admin 的动力。新版本中,我们持续收集用户反馈,重新开始,不断优化框架,以提供更好的用户体验。我们的目标是让开发者能够快速上手,专注于业务逻辑的开发。
|
||||
|
||||
## 单元测试
|
||||
|
||||
单元测试是确保代码质量的基石。在开发过程中编写和执行单元测试,以捕捉潜在的错误并提升代码的可靠性。框架核心逻辑使用 `vitest` 做了单元测试,并在逐步增加覆盖率。通过单元测试,可以放心地进行代码重构,减少回归问题,从而提高整体开发效率。
|
||||
|
||||
## 质量与规范
|
||||
|
||||
我们始终高度重视代码的质量与规范。通过使用 ESLint、Prettier、Stylelint、Publint、CSpell 等工具来确保代码质量。我们的代码规范基于 Vue3、Vite、TypeScript 等现代前端技术制定,旨在提供一个简洁、易用的框架,使开发者能够快速上手并专注于业务逻辑的开发。
|
@ -4,22 +4,19 @@ layout: home
|
||||
sidebar: false
|
||||
|
||||
hero:
|
||||
name: Vben Admin
|
||||
text: 企业级管理系统框架
|
||||
name: y-code 悦码
|
||||
text: 低代码管理平台
|
||||
tagline: 全新升级,开箱即用,简单高效
|
||||
image:
|
||||
src: https://unpkg.com/@vbenjs/static-source@0.1.7/source/logo-v1.webp
|
||||
alt: Vben Admin
|
||||
alt: y-code-platform
|
||||
actions:
|
||||
- theme: brand
|
||||
text: 快速开始 ->
|
||||
link: /guide/introduction/vben
|
||||
link: /guide/introduction/platform
|
||||
- theme: alt
|
||||
text: 在线预览
|
||||
link: https://www.vben.pro
|
||||
- theme: alt
|
||||
text: 在 GitHub 查看
|
||||
link: https://github.com/vbenjs/vue-vben-admin
|
||||
|
||||
features:
|
||||
- icon: 🚀
|
||||
@ -27,50 +24,11 @@ features:
|
||||
details: 基于 Vue3、Pinia、Vue Router、TypeScript、等最新技术栈。
|
||||
link: /guide/introduction/quick-start
|
||||
linkText: 快速开始
|
||||
- icon: 🦄
|
||||
title: 丰富的配置
|
||||
details: 企业级中后台前端解决方案,提供丰富的组件和模板以及 N 种偏好设置组合方案。
|
||||
link: /guide/essentials/settings
|
||||
linkText: 配置文档
|
||||
- icon: 🎨
|
||||
title: 主题定制
|
||||
details: 通过简单的配置,即可实现各种主题切换,满足个性化需求。
|
||||
link: /guide/in-depth/theme
|
||||
linkText: 主题文档
|
||||
- icon: 🌐
|
||||
title: 国际化
|
||||
details: 内置国际化方案,支持多语言切换,满足国际化需求。
|
||||
link: /guide/in-depth/locale
|
||||
linkText: 国际化文档
|
||||
- icon: 🔐
|
||||
title: 权限管理
|
||||
details: 内置权限管理方案,支持多种权限控制方式,满足各种权限需求。
|
||||
link: /guide/in-depth/access
|
||||
linkText: 权限文档
|
||||
- title: Vite
|
||||
icon:
|
||||
src: /logos/vite.svg
|
||||
details: 现代化的前端构建工具,快速冷启动,瞬间热更新。
|
||||
link: https://vitejs.dev/
|
||||
linkText: 官方站点
|
||||
- title: Shadcn UI
|
||||
icon:
|
||||
src: /logos/shadcn-ui.svg
|
||||
details: 核心基于 Shadcn UI + Tailwindcss,业务可支持任意的 UI 框架。
|
||||
link: https://www.shadcn-vue.com/
|
||||
linkText: 官方站点
|
||||
- title: Turbo Repo
|
||||
icon:
|
||||
src: /logos/turborepo.svg
|
||||
details: 规范且标准的大仓架构,使用 pnpm + monorepo + turbo 工程管理模式,提供企业级开发规范。
|
||||
link: https://turbo.build/
|
||||
linkText: 官方站点
|
||||
- title: Nitro Mock Server
|
||||
icon:
|
||||
src: /logos/nitro.svg
|
||||
details: 内置 Nitro Mock 服务,让你的 mock 服务更加强大。
|
||||
link: https://nitro.unjs.io/
|
||||
linkText: 官方站点
|
||||
# - icon: 🦄
|
||||
# title: 丰富的配置
|
||||
# details: 企业级中后台前端解决方案,提供丰富的组件和模板以及 N 种偏好设置组合方案。
|
||||
# link: /guide/essentials/settings
|
||||
# linkText: 配置文档
|
||||
---
|
||||
|
||||
<!-- <script setup>
|
||||
@ -105,4 +63,4 @@ const members = [
|
||||
/>
|
||||
</VPTeamPage> -->
|
||||
|
||||
<VbenContributors />
|
||||
<!-- <VbenContributors /> -->
|
||||
|
1
docs/src/materials/index.md
Normal file
1
docs/src/materials/index.md
Normal file
@ -0,0 +1 @@
|
||||
物料
|
1
docs/src/renderer/index.md
Normal file
1
docs/src/renderer/index.md
Normal file
@ -0,0 +1 @@
|
||||
渲染器
|
@ -17,7 +17,7 @@
|
||||
"path": "apps/y-code-v1",
|
||||
},
|
||||
{
|
||||
"name": "@vben/docs",
|
||||
"name": "@sy/y-code-docs",
|
||||
"path": "docs",
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user