Compare commits

..

3 Commits

Author SHA1 Message Date
unitwk
43a4d986b2 fix: Upgrade Vue version (#3023) 2023-09-13 20:26:07 +08:00
Shell2
c4216e24d6 explicitly checkout the thin branch (#2464)
explicitly checkout the thin branch
2022-12-18 19:54:20 +08:00
saber
d5e2d26a0f Compact main branch (#2255)
* init

* init

* fix: 修改外联路由打包bug

* fix: sime

* wip(lock): remove

* fix: LOCK

* fix: lock

* init

* feat: remove lock

* chore: remove semi

* chore: chore

* chore: chore

* chore: chore

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init

* init
2022-10-10 10:53:48 +08:00
1009 changed files with 31268 additions and 79105 deletions

View File

@@ -1,4 +0,0 @@
> 1%
last 2 versions
not dead
not ie 11

View File

@@ -1,3 +0,0 @@
node_modules/
dist/
.vscode/

6
.env
View File

@@ -1,2 +1,8 @@
# port
VITE_PORT = 3100
# spa-title
VITE_GLOB_APP_TITLE = Vben Admin
# spa shortname
VITE_GLOB_APP_SHORT_NAME = vue_vben_admin

View File

@@ -1,23 +0,0 @@
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
# Basic interface address SPA
VITE_GLOB_API_URL = /basic-api
# File upload address optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL = /upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX =
VITE_ENABLE_ANALYZE = true

View File

@@ -4,11 +4,19 @@ VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /
# Cross-domain proxy, you can configure multiple
# Please note that no line breaks
VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","http://localhost:3300/upload"]]
# VITE_PROXY=[["/api","https://vvbin.cn/test"]]
# Delete console
VITE_DROP_CONSOLE = false
# Basic interface address SPA
VITE_GLOB_API_URL = /basic-api
VITE_GLOB_API_URL=/basic-api
# File upload address optional
VITE_GLOB_UPLOAD_URL = /upload
VITE_GLOB_UPLOAD_URL=/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX =
VITE_GLOB_API_URL_PREFIX=

View File

@@ -1,22 +0,0 @@
# Whether to open mock
VITE_USE_MOCK = false
# public path
VITE_PUBLIC_PATH = /
# timeout(seconds)
VITE_TIMEOUT = 15
# Delete console
VITE_DROP_CONSOLE = true
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
VITE_GLOB_API_URL = "__vg_base_url"
# File upload address optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL = /files/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX =

View File

@@ -4,18 +4,32 @@ VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /
# Delete console
VITE_DROP_CONSOLE = true
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
# Whether to delete origin files when using compress, default false
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
# Basic interface address SPA
VITE_GLOB_API_URL = /basic-api
VITE_GLOB_API_URL=/basic-api
# File upload address optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL = /upload
VITE_GLOB_UPLOAD_URL=/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX =
VITE_GLOB_API_URL_PREFIX=
# Whether to enable image compression
VITE_USE_IMAGEMIN= true
# use pwa
VITE_USE_PWA = false
# Is it compatible with older browsers
VITE_LEGACY = false

View File

@@ -1,21 +1,36 @@
NODE_ENV = production
NODE_ENV=production
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /
# Delete console
VITE_DROP_CONSOLE = true
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
# Whether to delete origin files when using compress, default false
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
# Basic interface address SPA
VITE_GLOB_API_URL = /basic-api
VITE_GLOB_API_URL=/basic-api
# File upload address optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL = /upload
VITE_GLOB_UPLOAD_URL=/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX =
VITE_GLOB_API_URL_PREFIX=
# Whether to enable image compression
VITE_USE_IMAGEMIN= true
# use pwa
VITE_USE_PWA = false
# Is it compatible with older browsers
VITE_LEGACY = false

View File

@@ -13,4 +13,3 @@ dist
.local
/bin
Dockerfile
package.json

View File

@@ -1,7 +0,0 @@
module.exports = {
root: true,
extends: ['@vben'],
rules: {
'no-undef': 'off',
},
};

View File

@@ -1,4 +1,5 @@
export default {
module.exports = {
root: true,
env: {
browser: true,
node: true,
@@ -13,27 +14,26 @@ export default {
ecmaFeatures: {
jsx: true,
},
project: './tsconfig.*?.json',
createDefaultProgram: false,
extraFileExtensions: ['.vue'],
},
plugins: ['vue', '@typescript-eslint', 'import'],
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
rules: {
'no-unused-vars': 'off',
'no-case-declarations': 'off',
'vue/script-setup-uses-vars': 'error',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-empty-function': 'off',
'vue/custom-event-name-casing': 'off',
'no-use-before-define': 'off',
'space-before-function-paren': 'off',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
@@ -41,19 +41,15 @@ export default {
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'vue/script-setup-uses-vars': 'error',
'vue/no-reserved-component-names': 'off',
'vue/custom-event-name-casing': 'off',
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'space-before-function-paren': 'off',
'vue/attributes-order': 'off',
'vue/one-component-per-file': 'off',
'vue/html-closing-bracket-newline': 'off',
@@ -76,16 +72,5 @@ export default {
},
],
'vue/multi-word-component-names': 'off',
// 'sort-imports': [
// 'error',
// {
// ignoreCase: true,
// ignoreDeclarationSort: false,
// ignoreMemberSort: false,
// memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
// allowSeparatedGroups: false,
// },
// ],
},
globals: { defineOptions: 'readonly' },
};

11
.gitattributes vendored
View File

@@ -1,11 +0,0 @@
# https://docs.github.com/cn/get-started/getting-started-with-git/configuring-git-to-handle-line-endings
# Automatically normalize line endings (to LF) for all text-based files.
* text=auto eol=lf
# Declare files that will always have CRLF line endings on checkout.
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.{ico,png,jpg,jpeg,gif,webp,svg,woff,woff2} binary

View File

@@ -55,42 +55,35 @@ jobs:
# ARGS: --delete --verbose --parallel=80
push-to-gh-pages:
if: "contains(github.event.head_commit.message, '[release]')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# - uses: NullVoxPopuli/action-setup-pnpm@v2
uses: actions/checkout@v2
- name: Sed Config Base
shell: bash
run: |
sed -i 's#VITE_PUBLIC_PATH\s*=.*#VITE_PUBLIC_PATH = /vue-vben-admin/#g' ./.env.production
sed -i "s#VITE_BUILD_COMPRESS\s*=.*#VITE_BUILD_COMPRESS = 'gzip'#g" ./.env.production
sed -i "s#VITE_DROP_CONSOLE\s*=.*#VITE_DROP_CONSOLE = true#g" ./.env.production
cat ./.env.production
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: use Node.js 16
uses: actions/setup-node@v2.1.2
with:
version: 9
run_install: false
node-version: '16.x'
- name: use Node.js 20
uses: actions/setup-node@v3
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
node-version: '20.x'
# - name: Get yarn cache directory path
# id: yarn-cache-dir-path
# run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
#
# - name: Cache dependencies
# uses: actions/cache@v3
# with:
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set SSH Environment
env:
@@ -101,26 +94,25 @@ jobs:
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com > ~/.ssh/known_hosts
chmod 700 ~/.ssh && chmod 600 ~/.ssh/*
git config --global user.email "vbenadmin@163.com"
git config --global user.name "vbenAdmin"
- name: Build
env:
NODE_OPTIONS: '--max_old_space_size=4096'
run: |
pnpm install --no-frozen-lockfile
pnpm build
touch dist/.nojekyll
cp dist/index.html dist/404.html
git config --local user.email "vbenadmin@163.com"
git config --local user.name "vbenAdmin"
- name: Delete gh-pages branch
run: |
git push origin --delete gh-pages
- name: Build
run: |
yarn install
yarn run build
touch dist/.nojekyll
cp dist/index.html dist/404.html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.9.0
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./dist
CNAME: vben.vvbin.cn
with:
forceOrphan: true

56
.github/workflows/ftp-schedule.yml vendored Normal file
View File

@@ -0,0 +1,56 @@
name: schedule-push-to-ftp
# Timed deployment project
on:
push:
schedule:
- cron: '0 20 * * *'
jobs:
schedule-push-to-ftp:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Sed Config Base
shell: bash
run: |
sed -i 's#VITE_PUBLIC_PATH\s*=.*#VITE_PUBLIC_PATH = /next/#g' ./.env.production
sed -i "s#VITE_BUILD_COMPRESS\s*=.*#VITE_BUILD_COMPRESS = 'gzip'#g" ./.env.production
sed -i "s#VITE_DROP_CONSOLE\s*=.*#VITE_DROP_CONSOLE = true#g" ./.env.production
cat ./.env.production
- name: use Node.js 16
uses: actions/setup-node@v2.1.2
with:
node-version: '16.x'
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Build
run: |
yarn install
yarn run build
- name: Deploy
uses: SamKirkland/FTP-Deploy-Action@2.0.0
env:
FTP_SERVER: ${{ secrets.FTP_SERVER }}
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
METHOD: sftp
PORT: ${{ secrets.FTP_PORT }}
LOCAL_DIR: dist
REMOTE_DIR: /srv/www/vben-admin
ARGS: --delete --verbose --parallel=80

View File

@@ -1,39 +0,0 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
on:
push:
branches: [main, thin]
pull_request:
branches: [main, thin]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Run type:check
run: pnpm run type:check
- name: Build
run: pnpm build

View File

@@ -1,18 +0,0 @@
name: 'Close stale issues'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.OPER_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days'
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days'
exempt-issue-labels: 'bug,enhancement'
days-before-stale: 60
days-before-close: 7

3
.gitignore vendored
View File

@@ -1,8 +1,8 @@
node_modules
.DS_Store
dist
.npmrc
.cache
.turbo
tests/server/static
tests/server/static/upload
@@ -31,4 +31,3 @@ pnpm-debug.log*
package-lock.json
pnpm-lock.yaml
.history

View File

@@ -3,6 +3,4 @@
# shellcheck source=./_/husky.sh
. "$(dirname "$0")/_/husky.sh"
PATH="/usr/local/bin:$PATH"
npx --no-install commitlint --edit "$1"

View File

@@ -4,7 +4,5 @@
[ -n "$CI" ] && exit 0
PATH="/usr/local/bin:$PATH"
# Format and submit code according to lintstagedrc.js configuration
pnpm exec lint-staged
npm run lint:lint-staged

8
.npmrc
View File

@@ -1,8 +0,0 @@
public-hoist-pattern[]=husky
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=lint-staged
public-hoist-pattern[]=*stylelint*
public-hoist-pattern[]=@commitlint/cli
public-hoist-pattern[]=@vben/eslint-config
package-manager-strict=false

View File

@@ -1,12 +1,9 @@
dist
/dist/*
.local
.output.js
node_modules
/node_modules/**
**/*.svg
**/*.sh
public
.npmrc
*-lock.yaml
/public/*

View File

@@ -1,2 +1,3 @@
dist
public
/dist/*
/public/*
public/*

View File

@@ -1,4 +0,0 @@
module.exports = {
root: true,
extends: ['@vben/stylelint-config'],
};

View File

@@ -7,8 +7,7 @@
"mrmlnc.vscode-less",
"lokalise.i18n-ally",
"antfu.iconify",
"antfu.unocss",
"mikestead.dotenv",
"warmthsea.vscode-custom-code-color"
"heybourn.headwind"
]
}

107
.vscode/settings.json vendored
View File

@@ -57,7 +57,7 @@
"stylelint.enable": true,
"stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"],
"path-intellisense.mappings": {
"@/": "${workspaceRoot}/src"
"/@/": "${workspaceRoot}/src"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
@@ -84,93 +84,58 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
"source.fixAll.eslint": true
},
"[vue]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
}
},
"i18n-ally.localesPaths": ["src/locales/lang"],
"i18n-ally.keystyle": "nested",
"i18n-ally.sortKeys": true,
"i18n-ally.namespace": true,
"i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
"i18n-ally.enabledParsers": ["json", "ts", "js"],
"i18n-ally.enabledParsers": ["ts"],
"i18n-ally.sourceLanguage": "en",
"i18n-ally.displayLanguage": "zh-CN",
"i18n-ally.enabledFrameworks": ["vue", "react"],
"cSpell.words": [
"antd",
"antv",
"brotli",
"browserslist",
"codemirror",
"commitlint",
"cropperjs",
"echarts",
"esnext",
"esno",
"iconify",
"INTLIFY",
"lintstagedrc",
"logicflow",
"mockjs",
"nprogress",
"pinia",
"pnpm",
"qrcode",
"sider",
"sortablejs",
"stylelint",
"tailwindcss",
"tinymce",
"unocss",
"unref",
"vben",
"vditor",
"Vite",
"windi",
"browserslist",
"tailwindcss",
"esnext",
"antv",
"tinymce",
"sider",
"pinia",
"sider",
"nprogress",
"INTLIFY",
"stylelint",
"esno",
"vitejs",
"sortablejs",
"mockjs",
"codemirror",
"iconify",
"commitlint",
"vditor",
"echarts",
"cropperjs",
"logicflow",
"vueuse",
"zxcvbn"
"zxcvbn",
"lintstagedrc",
"brotli",
"tailwindcss",
"sider",
"pnpm",
"antd"
],
"vetur.format.scriptInitialIndent": true,
"vetur.format.styleInitialIndent": true,
"vetur.validation.script": false,
"MicroPython.executeButton": [
{
"text": "▶",
"tooltip": "运行",
"alignment": "left",
"command": "extension.executeFile",
"priority": 3.5
}
],
"MicroPython.syncButton": [
{
"text": "$(sync)",
"tooltip": "同步",
"alignment": "left",
"command": "extension.execute",
"priority": 4
}
],
// 控制相关文件嵌套展示
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
"*.ts": "$(capture).test.ts, $(capture).test.tsx",
"*.tsx": "$(capture).test.ts, $(capture).test.tsx",
"*.env": "$(capture).env.*",
"CHANGELOG.md": "CHANGELOG*",
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,README*,.npmrc,.browserslistrc",
".eslintrc.cjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,.stylelintrc.*"
},
"terminal.integrated.scrollback": 10000,
"nuxt.isNuxtApp": false,
"vscodeCustomCodeColor.highlightValue": "v-auth",
"vscodeCustomCodeColor.highlightValueColor": "#6366f1"
"vetur.validation.script": false
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,251 +1,3 @@
## [2.11.2](https://github.com/vbenjs/vue-vben-admin/compare/v2.11.1...v2.11.2) (2024-04-23)
### Bug Fixes
- **BasicForm:** solve the error about setFieldValue array ([#3775](https://github.com/vbenjs/vue-vben-admin/issues/3775)) ([f5cd3ad](https://github.com/vbenjs/vue-vben-admin/commit/f5cd3ad593ded10a9702cf342d788c4b1540944a))
- **ci:** use for package-manager-strict ([d53a5b2](https://github.com/vbenjs/vue-vben-admin/commit/d53a5b22ccadc28f99fc5e9751e3177d349ba8b9))
## [2.11.1](https://github.com/vbenjs/vue-vben-admin/compare/v2.11.0...v2.11.1) (2024-04-20)
### Bug Fixes
- the form not working when setFieldsValue through form-groups and add a demo with form groups ([#3765](https://github.com/vbenjs/vue-vben-admin/issues/3765)) ([65e5e71](https://github.com/vbenjs/vue-vben-admin/commit/65e5e71f5ee44eac221721de2c8c1d03e622e34a))
# [2.11.0](https://github.com/vbenjs/vue-vben-admin/compare/2.10.1...2.11.0) (2024-04-20)
### Bug Fixes
- (demo->page>form>high) expose getDataSource close [#3529](https://github.com/vbenjs/vue-vben-admin/issues/3529) ([#3530](https://github.com/vbenjs/vue-vben-admin/issues/3530)) ([0c1235e](https://github.com/vbenjs/vue-vben-admin/commit/0c1235e75aa6a855d774435ef08d3ffae19d1272))
- [#2744](https://github.com/vbenjs/vue-vben-admin/issues/2744)tabs选项卡渲染问题以及完善路由中affix=true时处理逻辑。 ([#3127](https://github.com/vbenjs/vue-vben-admin/issues/3127)) ([b43d306](https://github.com/vbenjs/vue-vben-admin/commit/b43d3069e1ec731e339ed28c17325620f1fe9a6e))
- [#3077](https://github.com/vbenjs/vue-vben-admin/issues/3077) 最新代码 ApiTransfer编辑后无法正常显示数据 ([#3083](https://github.com/vbenjs/vue-vben-admin/issues/3083)) ([c0c3116](https://github.com/vbenjs/vue-vben-admin/commit/c0c31161939027f64fa44a57084acafa0c6c2a8b))
- [#3144](https://github.com/vbenjs/vue-vben-admin/issues/3144) Drawer的footer样式错位问题 ([#3148](https://github.com/vbenjs/vue-vben-admin/issues/3148)) ([8e9d4f0](https://github.com/vbenjs/vue-vben-admin/commit/8e9d4f0a5758bf414b2885f02563a3b24f5cf6f1))
- 1.修正ImageUpload直接使用时无法正常回传value 2.修正ImageUpload无法正常初始化第一次传值 ([#3704](https://github.com/vbenjs/vue-vben-admin/issues/3704)) ([b5c87cf](https://github.com/vbenjs/vue-vben-admin/commit/b5c87cf6abc46ccd9b9bb8795b235b738e8bb376))
- 菜单搜索功能修复 ([#3688](https://github.com/vbenjs/vue-vben-admin/issues/3688)) ([c1809cd](https://github.com/vbenjs/vue-vben-admin/commit/c1809cd6c59228d7932f24a2b1f8e4933654238d))
- 当TableAction的actions属性中的ActionItem传递了color属性时PopConfirm的指示箭头颜色异常问题 ([#3597](https://github.com/vbenjs/vue-vben-admin/issues/3597)) ([e6a7384](https://github.com/vbenjs/vue-vben-admin/commit/e6a73840ab7c7cbd5a5a534bd248f5ed5df11e5c))
- 多选框必填选中校验异常close [#3097](https://github.com/vbenjs/vue-vben-admin/issues/3097) ([#3103](https://github.com/vbenjs/vue-vben-admin/issues/3103)) ([18f5583](https://github.com/vbenjs/vue-vben-admin/commit/18f55833e282206c1ca650a7c62654d45e819759))
- 解决 'Cannot find module uncss' 的问题 ([#3334](https://github.com/vbenjs/vue-vben-admin/issues/3334)) ([3a5f406](https://github.com/vbenjs/vue-vben-admin/commit/3a5f4062602f8394523a82cd807a27580e96a42a))
- 解决table复选框点击无法勾选状态问题 ([#3370](https://github.com/vbenjs/vue-vben-admin/issues/3370)) ([dde3652](https://github.com/vbenjs/vue-vben-admin/commit/dde3652b7d8b68b7f8ac669bd96a55c7b9b1b1fa))
- 设置 baseurl 后不生效的问题 ([#3318](https://github.com/vbenjs/vue-vben-admin/issues/3318)) ([4305f58](https://github.com/vbenjs/vue-vben-admin/commit/4305f58d201382c71f41fcd2625bc45ae09a2ae0))
- 使用suffix时label没有垂直居中 ([#3384](https://github.com/vbenjs/vue-vben-admin/issues/3384)) ([6b6b790](https://github.com/vbenjs/vue-vben-admin/commit/6b6b790f87edab31cb8e0dff730a1490903a3048))
- 修复表单按钮的类型定义外部无法修改重置或者提交按钮的文字的问题 ([141f3bd](https://github.com/vbenjs/vue-vben-admin/commit/141f3bdbd06f4d32e3d0e871072f876c29a8d68b))
- 修复表单设计的右侧属性配置面板中部分表单错乱的问题 ([#3300](https://github.com/vbenjs/vue-vben-admin/issues/3300)). close [#3268](https://github.com/vbenjs/vue-vben-admin/issues/3268) ([cb13986](https://github.com/vbenjs/vue-vben-admin/commit/cb13986a170815c5a21c86033057a8a56d608388))
- 修复菜单在MIX_SIDEBAR模式下title显示为name的问题 ([#3682](https://github.com/vbenjs/vue-vben-admin/issues/3682)) ([264f34e](https://github.com/vbenjs/vue-vben-admin/commit/264f34e49d413783d6d23715ebd9ab721b03d01c))
- 修复黑暗模式下一些样式问题 ([#3201](https://github.com/vbenjs/vue-vben-admin/issues/3201)) ([054a476](https://github.com/vbenjs/vue-vben-admin/commit/054a476d25b2d8322b238a6da6028051bcfdab84))
- 修复确认弹出框样式错乱的问题 ([#3742](https://github.com/vbenjs/vue-vben-admin/issues/3742)) ([a00725b](https://github.com/vbenjs/vue-vben-admin/commit/a00725be571e90fa5d807ec2bc1e23b160c824ff))
- 修复设置抽屉弹框滚动条样式异常 ([#3193](https://github.com/vbenjs/vue-vben-admin/issues/3193)) ([4755017](https://github.com/vbenjs/vue-vben-admin/commit/4755017bcc2dc0aee2f98b46d929a060a5b1bb62))
- 修复BasicForm使用componentProps函数返回valueFormat时DatePicker无法正确格式化的问题 ([#3357](https://github.com/vbenjs/vue-vben-admin/issues/3357)) ([beee351](https://github.com/vbenjs/vue-vben-admin/commit/beee35173b84dfb4c27bcd403df689e102379303))
- 修复index.html加载文字偏移的问题 ([#3306](https://github.com/vbenjs/vue-vben-admin/issues/3306)) ([c715d35](https://github.com/vbenjs/vue-vben-admin/commit/c715d35ad5754dd78135073ddbea86e43e17be91))
- 修复Modal.confirm的返回类型问题需要有destroyupdate的方法 ([#3161](https://github.com/vbenjs/vue-vben-admin/issues/3161)) ([a0e43ab](https://github.com/vbenjs/vue-vben-admin/commit/a0e43abeab2930097209a0cf6c21f3de687435ca))
- 修复notice样式绑定路径错误 ([#3218](https://github.com/vbenjs/vue-vben-admin/issues/3218)) ([ee8ec9e](https://github.com/vbenjs/vue-vben-admin/commit/ee8ec9eacfbfe1c5dc3a842da126dbaf5d54b126))
- 修复rule validator类型默认为string导致 radio 等组件在 setFormValues 时如果值不是string类型提示校验错误 ([a63a10c](https://github.com/vbenjs/vue-vben-admin/commit/a63a10c047cda32d92f35780163772fb20a6fe7a))
- 英文版本时提示中的单词没有分开 ([eb26650](https://github.com/vbenjs/vue-vben-admin/commit/eb2665059eb5fdcb8299032dc1a49c73f1675156))
- **ApiCascader:** apiParamKey not working ([c42ba1c](https://github.com/vbenjs/vue-vben-admin/commit/c42ba1cc1b2fba7179701cb1f918443523a9fc70))
- **ApiCascader:** wrong api reload ([#3536](https://github.com/vbenjs/vue-vben-admin/issues/3536)) resolve [#3534](https://github.com/vbenjs/vue-vben-admin/issues/3534) ([83f16da](https://github.com/vbenjs/vue-vben-admin/commit/83f16da2d35716f94f1837ab9bee41c5878ab3b0))
- **ApiSelect:** 移除watchEffect引发的重复请求 ([#3107](https://github.com/vbenjs/vue-vben-admin/issues/3107)) ([1519f47](https://github.com/vbenjs/vue-vben-admin/commit/1519f47f7d7785a93be51ce9da0f9ef2e78705c9))
- **ApiSelect:** 修复监听不到params的变动 ([ccf4027](https://github.com/vbenjs/vue-vben-admin/commit/ccf4027533d2adabd21bade025ca7bc7d34d75f6))
- **ApiSelect:** ApiSelect的isFirstLoaded赋值逻辑只有当加载报错时才能恢复未初次加载状态 ([#3671](https://github.com/vbenjs/vue-vben-admin/issues/3671)) ([3d733de](https://github.com/vbenjs/vue-vben-admin/commit/3d733de3995a667782fa3219a0e0b171327c5b6f))
- **ApiSelect:** BasicForm emit ield-value-change twice ([0f2c2ea](https://github.com/vbenjs/vue-vben-admin/commit/0f2c2eabd671af457febbb16fa3996c845bae145))
- **ApiSelect:** Incorrect value type definition. close [#3168](https://github.com/vbenjs/vue-vben-admin/issues/3168) ([0cf79d4](https://github.com/vbenjs/vue-vben-admin/commit/0cf79d4ce2786e71444d4d9483ed77a99f57169c))
- **ApiSelect:** type warning ([8f6153f](https://github.com/vbenjs/vue-vben-admin/commit/8f6153fd2a73b9537e7f9ba0f2326388745bc232))
- ApiTransfer 不支持disabled ([#3149](https://github.com/vbenjs/vue-vben-admin/issues/3149)) ([95ca2c3](https://github.com/vbenjs/vue-vben-admin/commit/95ca2c3ae6085d97f24546e24117ee2518f33e2d))
- **ApiTree:** 多触发一次onchange ([882270d](https://github.com/vbenjs/vue-vben-admin/commit/882270d5baff92eb8f51ccb80758c68ef8babe51))
- **ApiTree:** Modify Trigger Selection Event Name ([094a33c](https://github.com/vbenjs/vue-vben-admin/commit/094a33c0c2511816079c935eb83e60ad93c9289c))
- async validator ([#3194](https://github.com/vbenjs/vue-vben-admin/issues/3194)) ([405ef9e](https://github.com/vbenjs/vue-vben-admin/commit/405ef9e2b3e61bd6195b58996504b9cb3939ef6f))
- **BackTop:** repair BackTup comp ([#3581](https://github.com/vbenjs/vue-vben-admin/issues/3581)) ([6f4bdae](https://github.com/vbenjs/vue-vben-admin/commit/6f4bdae5c2a5455cb924e1903612f9fe96cf4481))
- basemodal 无法透传 attributes 至 Modal.tsx ([#3637](https://github.com/vbenjs/vue-vben-admin/issues/3637)) ([89830ec](https://github.com/vbenjs/vue-vben-admin/commit/89830ec7e69a7cab55e6ccf90b74377bcbadf44c))
- **BasicDrawer:** remove toRaw props ([#3399](https://github.com/vbenjs/vue-vben-admin/issues/3399)) ([57e6e4f](https://github.com/vbenjs/vue-vben-admin/commit/57e6e4f00435637c545c58de3cd84c102003032a))
- **BasicForm->ApiRadioGroup:** when options click, duplicate requests. resolve [#3387](https://github.com/vbenjs/vue-vben-admin/issues/3387) ([fdde6f0](https://github.com/vbenjs/vue-vben-admin/commit/fdde6f06b2d388bbdcc7f0de2b5419593cd686c3))
- **BasicForm->FormItem:** model should update before event call ([#3573](https://github.com/vbenjs/vue-vben-admin/issues/3573)). resolve [#3570](https://github.com/vbenjs/vue-vben-admin/issues/3570) ([43aa743](https://github.com/vbenjs/vue-vben-admin/commit/43aa7430324a7f390c31ea9e8a2f1e00fad8a1d0))
- **BasicForm:** 修复 useComponentRegister 方法无法添加自定义的组件,添加时爆类型错误的问题 ([#3483](https://github.com/vbenjs/vue-vben-admin/issues/3483)) ([98e2e4c](https://github.com/vbenjs/vue-vben-admin/commit/98e2e4c89a859e67c911134652d4b005be51e2d1))
- **BasicForm:** script setup defineExpose ([#3316](https://github.com/vbenjs/vue-vben-admin/issues/3316)) ([f58ef67](https://github.com/vbenjs/vue-vben-admin/commit/f58ef6777c4dd8ac905919637410ea5373eb770b))
- **BasicForm:** type instantiation is excessively deep and possibly infinite. ([#3128](https://github.com/vbenjs/vue-vben-admin/issues/3128)) ([5a388be](https://github.com/vbenjs/vue-vben-admin/commit/5a388be15e44d86c87d76dc8829a5286ac1818e0))
- **BasicForm:** useForm 中 scheme 选项 slot 与 component冲突 ([#3133](https://github.com/vbenjs/vue-vben-admin/issues/3133)) ([0bb76a8](https://github.com/vbenjs/vue-vben-admin/commit/0bb76a86d25cbd1de1c672f5cc5e63d0ae478b68))
- **BasicForm:** validate Form tip height ([#3286](https://github.com/vbenjs/vue-vben-admin/issues/3286)). close [#3281](https://github.com/vbenjs/vue-vben-admin/issues/3281) ([100f3cf](https://github.com/vbenjs/vue-vben-admin/commit/100f3cf26c2b124bf94f3bb4913dd3d6d15aed3e))
- **BasicModal:** 修复BasicModal添加wrapClassName样式异常问题 ([#3726](https://github.com/vbenjs/vue-vben-admin/issues/3726)) ([13b031e](https://github.com/vbenjs/vue-vben-admin/commit/13b031eef9b8d4e8333c9397ff26e4875bf9816a))
- **BasicTable->rowKey&scroll:** declear and usage about rowKey and scroll ([#3541](https://github.com/vbenjs/vue-vben-admin/issues/3541)) ([e23e338](https://github.com/vbenjs/vue-vben-admin/commit/e23e3383dd73b20a479977d29bab999c51334a1a))
- **BasicTable->useColumns:** handle deep colunm hidden ([#3561](https://github.com/vbenjs/vue-vben-admin/issues/3561)) resolve [#3559](https://github.com/vbenjs/vue-vben-admin/issues/3559) ([54af5bb](https://github.com/vbenjs/vue-vben-admin/commit/54af5bb42ddd04a56a7da3becf325dd9cfbccc48))
- **BasicTable:** 滑动表格内容合计行不跟随滑动bug ([#3438](https://github.com/vbenjs/vue-vben-admin/issues/3438)) resolve [#2166](https://github.com/vbenjs/vue-vben-admin/issues/2166) ([7ba83e7](https://github.com/vbenjs/vue-vben-admin/commit/7ba83e71bf718b6c896eac892f3b66cd266747af))
- **BasicTable:** 修复BasicTable数据为空时重置后高度不能自适应问题 ([#3724](https://github.com/vbenjs/vue-vben-admin/issues/3724)) ([6054fa2](https://github.com/vbenjs/vue-vben-admin/commit/6054fa2ffac7ff0206a4e0138da16a548d2d25a2))
- **BasicTable:** avoid select when edit cell ([#3484](https://github.com/vbenjs/vue-vben-admin/issues/3484)) ([2f921cf](https://github.com/vbenjs/vue-vben-admin/commit/2f921cfb88b969fb8bd361c46ddf2f41a9e363b0))
- **BasicTable:** BasicTable resize wrong in modal ([#3549](https://github.com/vbenjs/vue-vben-admin/issues/3549)) ([a121b32](https://github.com/vbenjs/vue-vben-admin/commit/a121b32252cf4b0570c937a1ab86d8b924b229ce))
- **BasicTable:** column setting about action fixed and default not cache ([#3441](https://github.com/vbenjs/vue-vben-admin/issues/3441)) ([86ecb27](https://github.com/vbenjs/vue-vben-admin/commit/86ecb2729ef15bb0bb3fc7347a84ffa83487eec8))
- **BasicTable:** ColumnSetting about selectedRowKeys override ([#3446](https://github.com/vbenjs/vue-vben-admin/issues/3446)) ([65122ea](https://github.com/vbenjs/vue-vben-admin/commit/65122ea1a52e2f06463dc15f7ee06aba4e29d104))
- **BasicTable:** ColumnSetting mistake when use setColumns ([#3408](https://github.com/vbenjs/vue-vben-admin/issues/3408)) ([fec67b4](https://github.com/vbenjs/vue-vben-admin/commit/fec67b4d53ce82d156f4683f2c436f31dd3b4f7a))
- **BasicTable:** getSelectRows return duplicate records ([#3545](https://github.com/vbenjs/vue-vben-admin/issues/3545)) ([974c1fa](https://github.com/vbenjs/vue-vben-admin/commit/974c1fad7fb2767429eeb50680cbae8e17b80f1f))
- **BasicTable:** headerCell slot title not exist ([8df2590](https://github.com/vbenjs/vue-vben-admin/commit/8df2590aae8d646880e8c064e6b4ba48cb54086d))
- **BasicTable:** index still show when set showIndexColumn false ([#3455](https://github.com/vbenjs/vue-vben-admin/issues/3455)) ([75f5b7a](https://github.com/vbenjs/vue-vben-admin/commit/75f5b7ac4dda840ce0098ed528e0b161d99d9b09))
- **BasicTable:** keep rowSelection onChange call outside ([#3461](https://github.com/vbenjs/vue-vben-admin/issues/3461)). resolve [#3453](https://github.com/vbenjs/vue-vben-admin/issues/3453) ([a7b2f14](https://github.com/vbenjs/vue-vben-admin/commit/a7b2f14b900771186ee126cf60e8841ecc0cb8c1))
- **BasicTable:** pagination exceeds page height. close [#3185](https://github.com/vbenjs/vue-vben-admin/issues/3185) ([41451f4](https://github.com/vbenjs/vue-vben-admin/commit/41451f4fa3495be1d1ea4088cad77322dcde57de))
- **BasicTable:** ref table ([#3327](https://github.com/vbenjs/vue-vben-admin/issues/3327)) ([c8744a0](https://github.com/vbenjs/vue-vben-admin/commit/c8744a057e0da407ab929c91b46e638d196d82cc))
- **BasicTable:** selection wrong by click input when cross pages ([#3540](https://github.com/vbenjs/vue-vben-admin/issues/3540)). resolve [#3539](https://github.com/vbenjs/vue-vben-admin/issues/3539) ([69c3602](https://github.com/vbenjs/vue-vben-admin/commit/69c36021fa5558097c4fc7b9f63e29816e478cb9))
- **BasicTable:** showIndexColumn/showRowSelection cache should by route name ([#3489](https://github.com/vbenjs/vue-vben-admin/issues/3489)) ([d88f455](https://github.com/vbenjs/vue-vben-admin/commit/d88f455cd3530cd7cc7450e8f0fe7744ca0cb313))
- **BasicTable:** table表格宽度自适应隐藏的列导致宽度增加 ([#3388](https://github.com/vbenjs/vue-vben-admin/issues/3388)) ([bca5154](https://github.com/vbenjs/vue-vben-admin/commit/bca5154a9d3d020a70cd332ac19c853ea94405e2))
- **BasicTree:** not inherit slot and not show icon slot. close [#1902](https://github.com/vbenjs/vue-vben-admin/issues/1902) ([a0b2a9e](https://github.com/vbenjs/vue-vben-admin/commit/a0b2a9e949dbf1e149da8be757f78fa6b1cebec0))
- breadcrumb is displayed despite the menu being hidden ([#3733](https://github.com/vbenjs/vue-vben-admin/issues/3733)) ([e8a86ec](https://github.com/vbenjs/vue-vben-admin/commit/e8a86ec8b996387c9c2d167344eb1e7a010d94fb)), closes [#3690](https://github.com/vbenjs/vue-vben-admin/issues/3690)
- **breadcrumb:** 修复面包屑跳转外链时导致当前页面404问题 ([#3337](https://github.com/vbenjs/vue-vben-admin/issues/3337)). close [#3336](https://github.com/vbenjs/vue-vben-admin/issues/3336) ([895352a](https://github.com/vbenjs/vue-vben-admin/commit/895352ad221f91bdb57fdfd0396925fb7901c2df))
- breakpoint ([#3242](https://github.com/vbenjs/vue-vben-admin/issues/3242)) ([b6f8379](https://github.com/vbenjs/vue-vben-admin/commit/b6f8379e936df3743c5b9514e88a02148b08a5d1))
- bug RangePicker with componentProps valueFormat ('YYYY-MM-DD') does not return the formatted value when using form validate() method [#3690](https://github.com/vbenjs/vue-vben-admin/issues/3690) ([#3691](https://github.com/vbenjs/vue-vben-admin/issues/3691)) ([09f795e](https://github.com/vbenjs/vue-vben-admin/commit/09f795e00ed8d56d6b1e028fc40974d3292eed5f))
- change salesProductPie.vue's data name to '成交占比'. ([#3524](https://github.com/vbenjs/vue-vben-admin/issues/3524)) ([0589458](https://github.com/vbenjs/vue-vben-admin/commit/0589458b2d120b5c6ee0ab10cd8b2d3f13318911))
- checkedKeys use unref bug ([#3198](https://github.com/vbenjs/vue-vben-admin/issues/3198)) ([ae61fa1](https://github.com/vbenjs/vue-vben-admin/commit/ae61fa11865b2d7b0337b1fd2edcb20bf559a71f))
- **ci:** update node version for linter ([a5565bf](https://github.com/vbenjs/vue-vben-admin/commit/a5565bf9cf361e38057d8ca34fe2542ea1c39873))
- **ci:** update use pnpm version for deploy ([83455a0](https://github.com/vbenjs/vue-vben-admin/commit/83455a07a0821142864b4668d89a51057d74330b))
- column setting index column sort ([#3463](https://github.com/vbenjs/vue-vben-admin/issues/3463)) ([fc002d3](https://github.com/vbenjs/vue-vben-admin/commit/fc002d3db327a432259eb02e2a72b9b81381eb6e))
- **component->markdown:** 浏览器媒体获取兼容 ([#3470](https://github.com/vbenjs/vue-vben-admin/issues/3470)) ([f0ca8d5](https://github.com/vbenjs/vue-vben-admin/commit/f0ca8d5a03e994c9948b055dc5f69dad40d96922))
- **component:** insertNextAt is not a function ([#3656](https://github.com/vbenjs/vue-vben-admin/issues/3656)) ([#3657](https://github.com/vbenjs/vue-vben-admin/issues/3657)) ([c827ffb](https://github.com/vbenjs/vue-vben-admin/commit/c827ffb8e680df13dae0c75b19634b6474aa5897))
- **component:** resolve the defaultValue error in setting the date type ([#3652](https://github.com/vbenjs/vue-vben-admin/issues/3652)) ([d42acb4](https://github.com/vbenjs/vue-vben-admin/commit/d42acb477c577c0f855403bff371e0780e630cdc)), closes [#3651](https://github.com/vbenjs/vue-vben-admin/issues/3651)
- **component:** resolve the error when clicking on a row when clickRowToExpand is true ([#3714](https://github.com/vbenjs/vue-vben-admin/issues/3714)) ([38d58ab](https://github.com/vbenjs/vue-vben-admin/commit/38d58ab47af3611cebade960dbcbd60f165f3a72))
- **component:** resolve the issue of "vxe-table" export function not being able to be used ([#3646](https://github.com/vbenjs/vue-vben-admin/issues/3646)) ([bc5e5fa](https://github.com/vbenjs/vue-vben-admin/commit/bc5e5fa015f8c5f1d69f3f8572a1957d83cfe44e)), closes [#3614](https://github.com/vbenjs/vue-vben-admin/issues/3614)
- **component:** resovle fullscreen content issues with "fixedHeight" and "contentFullHeight" combined ([#3721](https://github.com/vbenjs/vue-vben-admin/issues/3721)) ([212e78f](https://github.com/vbenjs/vue-vben-admin/commit/212e78fa76132b4239e81d3432f7f3c15d7e5254))
- **components->Upload:** 修复文件上传过程中删除文件终止上传时上传状态未改变不能关闭Modal的bug ([#3761](https://github.com/vbenjs/vue-vben-admin/issues/3761)) ([04d4c5c](https://github.com/vbenjs/vue-vben-admin/commit/04d4c5cd665f52cb287b5059b301e71aed75b3df))
- **config:** vite:html warning ([#3518](https://github.com/vbenjs/vue-vben-admin/issues/3518)) ([6978517](https://github.com/vbenjs/vue-vben-admin/commit/6978517a3a0b522a466fc248d0ed4384cdcfecb7))
- content fixed mode with blank page ([#3523](https://github.com/vbenjs/vue-vben-admin/issues/3523)) ([49fdb6c](https://github.com/vbenjs/vue-vben-admin/commit/49fdb6c986f36e45fc9f9e206af371f8eb3581f6))
- contextmenu location not right when body with scroll ([#3516](https://github.com/vbenjs/vue-vben-admin/issues/3516)) ([c2c9f4f](https://github.com/vbenjs/vue-vben-admin/commit/c2c9f4f556d65eb768a5202a398dc9684c08d577))
- Correct spelling error in comments ([#3678](https://github.com/vbenjs/vue-vben-admin/issues/3678)) ([54f8584](https://github.com/vbenjs/vue-vben-admin/commit/54f85844436d95ce290a2f3b5db5b7c4fd14cc0d))
- **CropperAvatar:** wrong type about the prop size ([#3635](https://github.com/vbenjs/vue-vben-admin/issues/3635)) ([aef90aa](https://github.com/vbenjs/vue-vben-admin/commit/aef90aa2a0b43c3fc72596d9aecf408a594cb6fd))
- **CropperModal:** beforeUpload should return false ([#3601](https://github.com/vbenjs/vue-vben-admin/issues/3601)) ([b6bcf8d](https://github.com/vbenjs/vue-vben-admin/commit/b6bcf8d36dc348af7b51782e43c09c5e1cfeed68))
- **customExport:** Failure to export ([#3137](https://github.com/vbenjs/vue-vben-admin/issues/3137)) ([4d02205](https://github.com/vbenjs/vue-vben-admin/commit/4d02205839aad840bbb247b26b7e1dcdbc8b3a67))
- **dark:** fix --text-color light color not work ([#3228](https://github.com/vbenjs/vue-vben-admin/issues/3228)) ([2e632e4](https://github.com/vbenjs/vue-vben-admin/commit/2e632e4d4d8af4b8766396b340f9996832310853))
- **DatePicker:** date show is wrong and setup script defineExpose ([#3324](https://github.com/vbenjs/vue-vben-admin/issues/3324)) ([f62043b](https://github.com/vbenjs/vue-vben-admin/commit/f62043b1fca82234e04aa04629ba4bbcc624b0ee))
- **DatePicker:** zh-CN is not work in DatePicker ([#3273](https://github.com/vbenjs/vue-vben-admin/issues/3273)) ([6d047fb](https://github.com/vbenjs/vue-vben-admin/commit/6d047fb53fb113a4c6fc5c46c5b4195e50744eb0))
- defaultValue类型为number时的bug ([#3288](https://github.com/vbenjs/vue-vben-admin/issues/3288)) ([3b2760c](https://github.com/vbenjs/vue-vben-admin/commit/3b2760ca3ae5b51989ea7e97713f629a567fe53a))
- **demo->customerForm:** FormItem下有多个受控组件控制台显示错误提示的bug ([#3238](https://github.com/vbenjs/vue-vben-admin/issues/3238)) ([ec646c5](https://github.com/vbenjs/vue-vben-admin/commit/ec646c57b8c2d365f5ce298c496e1efaad8456b7))
- **demo:** 修复引导页文件名问题 ([#3352](https://github.com/vbenjs/vue-vben-admin/issues/3352)) ([be935eb](https://github.com/vbenjs/vue-vben-admin/commit/be935eb44e363665b99288f78f03cb3053274200))
- **demo:** 修复form demo的远程搜索不会触发的bug ([#3770](https://github.com/vbenjs/vue-vben-admin/issues/3770)) ([44b1877](https://github.com/vbenjs/vue-vben-admin/commit/44b1877eaedca1716aa40b8d819d5fe7cbd26ba0))
- **demo:** account page table without dept ([#3164](https://github.com/vbenjs/vue-vben-admin/issues/3164)) ([40aac65](https://github.com/vbenjs/vue-vben-admin/commit/40aac6544cb9b22e2362f2a2d99c0a9cc2f7fb57))
- **demo:** useForm中DatePickerRangePicker 日期控件位置不对 ([ae58ada](https://github.com/vbenjs/vue-vben-admin/commit/ae58ada82e2f62cea8e89a18c9f2ab18d6dba52a))
- **dept:** no parentDept can edit parentDept ([#3255](https://github.com/vbenjs/vue-vben-admin/issues/3255)) ([2142506](https://github.com/vbenjs/vue-vben-admin/commit/2142506ce5225dbe19118fcedb2cb48612c58fa7))
- Docker 打包逻辑改进,彻底解决缓存问题 ([#3473](https://github.com/vbenjs/vue-vben-admin/issues/3473)) ([dcbe551](https://github.com/vbenjs/vue-vben-admin/commit/dcbe5510d42c3dc5e93b68704a5fa24c88d4de69))
- EditableCell about checked/unChecked Value, getDisable, rowKey missing for updating ([#3418](https://github.com/vbenjs/vue-vben-admin/issues/3418)). resolve [#3419](https://github.com/vbenjs/vue-vben-admin/issues/3419) ([404a472](https://github.com/vbenjs/vue-vben-admin/commit/404a4720b016abb6da93cb0b03271ebea6cca976))
- **EditCellTable:** 表格编辑行在使用Switch,checkedValue为数字时无法切换开关.close [#2560](https://github.com/vbenjs/vue-vben-admin/issues/2560) ([71c4394](https://github.com/vbenjs/vue-vben-admin/commit/71c43945a5e95fda6daddbb90af51f6d149547f5))
- **Editor:** ts类型错误 ([8b13f62](https://github.com/vbenjs/vue-vben-admin/commit/8b13f62995cb7f080eabf2e22d530959d4b79e0b))
- Failed to resolve component EllipsisText ([#3330](https://github.com/vbenjs/vue-vben-admin/issues/3330)) ([42e9de5](https://github.com/vbenjs/vue-vben-admin/commit/42e9de50a2bb150556a0eb8098acb2d2d3662c3c))
- FormItem won't render when a component is not provided ([9e055ad](https://github.com/vbenjs/vue-vben-admin/commit/9e055ad2734819c2778c0db1990e69b67c95022f))
- **FormItem:** use getPopupContainer default value ([#3215](https://github.com/vbenjs/vue-vben-admin/issues/3215)) ([ed267d9](https://github.com/vbenjs/vue-vben-admin/commit/ed267d9c016e50b4d9a7886209bad2432a88ad9b))
- **FormTable:** Invert select bug ([#3412](https://github.com/vbenjs/vue-vben-admin/issues/3412)) ([595b1ce](https://github.com/vbenjs/vue-vben-admin/commit/595b1ce680d8b315589d98036a70333055123b18))
- **full-screen:** dom fullscreen status text ([#3130](https://github.com/vbenjs/vue-vben-admin/issues/3130)) ([e161c14](https://github.com/vbenjs/vue-vben-admin/commit/e161c1449ac3d097cd6eab9441b25de25d3aa27e))
- fullscreen-modal width wrong ([#3321](https://github.com/vbenjs/vue-vben-admin/issues/3321)) ([617b013](https://github.com/vbenjs/vue-vben-admin/commit/617b01338cf4a8d88da529dae7da878b52b30c3b))
- handleFormValues 不再将所有空字符串转换为undefined ([#3496](https://github.com/vbenjs/vue-vben-admin/issues/3496)) ([6fbb576](https://github.com/vbenjs/vue-vben-admin/commit/6fbb57621e6ff79f93830969ab388549cbec5d32))
- **koa->upload:** fix the error that occurs when uploading files in the `test server` of Koa. ([#3698](https://github.com/vbenjs/vue-vben-admin/issues/3698)) ([954f04f](https://github.com/vbenjs/vue-vben-admin/commit/954f04f1c8e941e45c2bd4ab55df331ba13cb89c))
- **layout->menu:** can`t hover when menu is colappsed ([#3499](https://github.com/vbenjs/vue-vben-admin/issues/3499)) resolve [#3492](https://github.com/vbenjs/vue-vben-admin/issues/3492) ([7ffe172](https://github.com/vbenjs/vue-vben-admin/commit/7ffe1726b9ac0ac1f90c20b53996636f31af5c31))
- **layout->user-dropdown:** resolve warning "Invalid prop name: key is a reserved property" ([#3640](https://github.com/vbenjs/vue-vben-admin/issues/3640)) ([eae68bb](https://github.com/vbenjs/vue-vben-admin/commit/eae68bb029864d5f1af4e0c6b57038d0c96e4faf)), closes [#3639](https://github.com/vbenjs/vue-vben-admin/issues/3639)
- **layout:** 修复切换导航栏模式,分割菜单的状态不同步,导致页面内容区域存在被遮挡的问题 ([#3519](https://github.com/vbenjs/vue-vben-admin/issues/3519)) ([50276cb](https://github.com/vbenjs/vue-vben-admin/commit/50276cb60275d15c2d370c5a1be2705067c7b275))
- **LayoutSidre:** resolve the breakpoint conflict. resolve [#3605](https://github.com/vbenjs/vue-vben-admin/issues/3605) ([1a7ae0e](https://github.com/vbenjs/vue-vben-admin/commit/1a7ae0e81071876fe6a5cf2ef00bb61cbca70736))
- **LockModal:** Cannot unlock ([#3143](https://github.com/vbenjs/vue-vben-admin/issues/3143)) ([cdac147](https://github.com/vbenjs/vue-vben-admin/commit/cdac147bc8d09fba6ac14ff1ed31ab4d5b5cb28b))
- **Login:** avoid infinite loop when query redirect to next route redirect ([#3630](https://github.com/vbenjs/vue-vben-admin/issues/3630)). resolve [#3620](https://github.com/vbenjs/vue-vben-admin/issues/3620) [#3627](https://github.com/vbenjs/vue-vben-admin/issues/3627) ([ab55cbf](https://github.com/vbenjs/vue-vben-admin/commit/ab55cbf99bd9891f10546176e203eb4ea8cafaa4))
- **Menu:** tab标签切换选中状态焦点重复. fix [#1681](https://github.com/vbenjs/vue-vben-admin/issues/1681) ([2ec5f63](https://github.com/vbenjs/vue-vben-admin/commit/2ec5f6322d036ea5d6968c16961d2c253e1cef06))
- **menu:** top menu and breadcrumb show wrong ([#3703](https://github.com/vbenjs/vue-vben-admin/issues/3703)) ([573fd53](https://github.com/vbenjs/vue-vben-admin/commit/573fd53b4e287524ffa6ec205b68812b657dde71))
- modal open logic missing ([#3462](https://github.com/vbenjs/vue-vben-admin/issues/3462)) ([cc97f06](https://github.com/vbenjs/vue-vben-admin/commit/cc97f0635438c102b97102a1e0a9d5550961d6fa))
- **Modal:** 修复BasicModal跟原生Modal样式冲突问题 ([#3720](https://github.com/vbenjs/vue-vben-admin/issues/3720)) ([ade6d4c](https://github.com/vbenjs/vue-vben-admin/commit/ade6d4c22dd62aa666fe934a747e2a3764feb7cd))
- modalElIterator可能为空导致报错 ([#3738](https://github.com/vbenjs/vue-vben-admin/issues/3738)) ([162a0d0](https://github.com/vbenjs/vue-vben-admin/commit/162a0d025252ff954f081d126c381e5fefd06e83))
- navigator.clipboard 兼容问题 [#3372](https://github.com/vbenjs/vue-vben-admin/issues/3372) ([#3403](https://github.com/vbenjs/vue-vben-admin/issues/3403)) ([d3600da](https://github.com/vbenjs/vue-vben-admin/commit/d3600daf5c55cc884f4a0311ee7335bdad529a1a))
- **PageWrapper:** 修复headerSticky样式 ([#3569](https://github.com/vbenjs/vue-vben-admin/issues/3569)) ([778ebe1](https://github.com/vbenjs/vue-vben-admin/commit/778ebe1f44bc4929f34fad41b5fec13e9270b517))
- **PopConfirmButton:** avoid type lint error ([#3600](https://github.com/vbenjs/vue-vben-admin/issues/3600)) ([5ec4446](https://github.com/vbenjs/vue-vben-admin/commit/5ec444644384c6a1b8d559e0e21dfa814e5af635))
- remove duplicate code ([#3674](https://github.com/vbenjs/vue-vben-admin/issues/3674)) ([c33ee66](https://github.com/vbenjs/vue-vben-admin/commit/c33ee66473159a0322b7c4489538dd5309587e45))
- repair login about redirect query ([#3592](https://github.com/vbenjs/vue-vben-admin/issues/3592)) ([236ddf3](https://github.com/vbenjs/vue-vben-admin/commit/236ddf3471a7851ff6541f5709e9cbb6105b58f7))
- resolve conflicts between eslint and prettier and bump prettier-plugin-packagejson version to 2.4.6([#3328](https://github.com/vbenjs/vue-vben-admin/issues/3328)) ([8a00070](https://github.com/vbenjs/vue-vben-admin/commit/8a000705d1c89194647a11d01a620c1a893d2643))
- **router:** resolve menu loading failure when permission is in "role mode" ([#3660](https://github.com/vbenjs/vue-vben-admin/issues/3660)) ([c7631fe](https://github.com/vbenjs/vue-vben-admin/commit/c7631fed681da0dd51583cf3ecba60ebfd76ec4d)), closes [#3655](https://github.com/vbenjs/vue-vben-admin/issues/3655)
- **router:** resolve the next function being called twice ([#3643](https://github.com/vbenjs/vue-vben-admin/issues/3643)) ([7ec9344](https://github.com/vbenjs/vue-vben-admin/commit/7ec9344be8e80899749f41d173c1a11db267354e)), closes [#3642](https://github.com/vbenjs/vue-vben-admin/issues/3642)
- **router:** the issue of blank page navigation during repair of non-LAYOUT first-level route component ([#3764](https://github.com/vbenjs/vue-vben-admin/issues/3764)) ([c58c192](https://github.com/vbenjs/vue-vben-admin/commit/c58c1929c1e8a41c15ff2f4f4398eba0fd375b69))
- scroll back to top when tab switch ([#3498](https://github.com/vbenjs/vue-vben-admin/issues/3498)). resolve [#3490](https://github.com/vbenjs/vue-vben-admin/issues/3490) ([d709dd6](https://github.com/vbenjs/vue-vben-admin/commit/d709dd67b50a2e2b88cbcce48f19085ce528f971))
- scrollbar is obscured ([#3331](https://github.com/vbenjs/vue-vben-admin/issues/3331)) ([3f65baf](https://github.com/vbenjs/vue-vben-admin/commit/3f65baf503bee677bde70535525ae514d0585d69))
- ScrollContainer的一个问题 [#3046](https://github.com/vbenjs/vue-vben-admin/issues/3046) ([#3119](https://github.com/vbenjs/vue-vben-admin/issues/3119)) ([aa03c87](https://github.com/vbenjs/vue-vben-admin/commit/aa03c87383c703ddce7759bd7ba114709f2f5241))
- **ScrollContainer:** enable x scroll ([#3564](https://github.com/vbenjs/vue-vben-admin/issues/3564)) ([a1e862b](https://github.com/vbenjs/vue-vben-admin/commit/a1e862bde7a29420fd1de6083c5bde02bef8e9fd))
- **SimpleMenuTag:** SimpleMenuTag的引用都改为动态组件引用,以消除打包警告.close [#3121](https://github.com/vbenjs/vue-vben-admin/issues/3121) ([6e33c26](https://github.com/vbenjs/vue-vben-admin/commit/6e33c268930ad2a99311f0f2b6eb4b90f3cf61ce))
- **StrengthMeter:** change事件应随handleChange一起抛出。close [#3118](https://github.com/vbenjs/vue-vben-admin/issues/3118) ([f5ce480](https://github.com/vbenjs/vue-vben-admin/commit/f5ce480f0fb2f97de57e26a01945b715938f6e18))
- **style:** 修复黑暗模式下弹框、demo目录下、按钮样式问题 ([#3208](https://github.com/vbenjs/vue-vben-admin/issues/3208)) ([06a6c94](https://github.com/vbenjs/vue-vben-admin/commit/06a6c947a980530be6654f05357bc3c721c1140b))
- tabel取消编辑单元格后会回到初始值. close [#2739](https://github.com/vbenjs/vue-vben-admin/issues/2739) ([#3108](https://github.com/vbenjs/vue-vben-admin/issues/3108)) ([9864305](https://github.com/vbenjs/vue-vben-admin/commit/986430513bc2da9a2ad88d40c026b0373bf22d07))
- table height calc when fullcontent and footer visible change ([#3392](https://github.com/vbenjs/vue-vben-admin/issues/3392)) ([20698c0](https://github.com/vbenjs/vue-vben-admin/commit/20698c052c2b696587ac77ba7c85d74abc974ed5))
- table index column width is not enough in english ([#3342](https://github.com/vbenjs/vue-vben-admin/issues/3342)) ([0f13758](https://github.com/vbenjs/vue-vben-admin/commit/0f137585542ee2cf3b542a4ca4d94e76aadfb3d0))
- TableAction设置icon显示iconify关键字 ([#3608](https://github.com/vbenjs/vue-vben-admin/issues/3608)) ([b233973](https://github.com/vbenjs/vue-vben-admin/commit/b2339739746740eaaf4adee3ef16757f3b05ec86))
- **test-server:** test-server can not lanuch ([#3554](https://github.com/vbenjs/vue-vben-admin/issues/3554)) ([e679704](https://github.com/vbenjs/vue-vben-admin/commit/e6797043c53abb8280ff9c86e32663450a650076))
- **tree:** remove expandedKeys prop default value ([#3184](https://github.com/vbenjs/vue-vben-admin/issues/3184)) ([92875cb](https://github.com/vbenjs/vue-vben-admin/commit/92875cbeccf6213bcad9acd4e322cdee59e35266))
- turbo run lint ([#3332](https://github.com/vbenjs/vue-vben-admin/issues/3332)) ([064922d](https://github.com/vbenjs/vue-vben-admin/commit/064922dd4c3ae674a463e4b9453a4ca8bf2a52a0)), closes [#3277](https://github.com/vbenjs/vue-vben-admin/issues/3277)
- **type:** type:check error ([#3309](https://github.com/vbenjs/vue-vben-admin/issues/3309)) ([2cd5a40](https://github.com/vbenjs/vue-vben-admin/commit/2cd5a40322e9b7946e789d7c5023fda0e712af4d))
- typo in locale ([#3659](https://github.com/vbenjs/vue-vben-admin/issues/3659)) ([a4cc1d5](https://github.com/vbenjs/vue-vben-admin/commit/a4cc1d53169bc26e01862ca4ff88e28d5329ab8f))
- typo substract -> subtract ([#3551](https://github.com/vbenjs/vue-vben-admin/issues/3551)) ([f3fbb57](https://github.com/vbenjs/vue-vben-admin/commit/f3fbb57dc944a11a06be2eff376d77f9cef29813))
- **typo:** fileservice class name ([#3625](https://github.com/vbenjs/vue-vben-admin/issues/3625)) ([b794469](https://github.com/vbenjs/vue-vben-admin/commit/b7944690d118377a32e694fa30081b1e43c71719))
- Update TableAction.vue ([#3619](https://github.com/vbenjs/vue-vben-admin/issues/3619)) ([76ffd8f](https://github.com/vbenjs/vue-vben-admin/commit/76ffd8fdf1ecc37a30f33c901ff199ba21f88ad4))
- **Upload:** The file name is too long bug ([#3182](https://github.com/vbenjs/vue-vben-admin/issues/3182)) ([e7fbd74](https://github.com/vbenjs/vue-vben-admin/commit/e7fbd742287928112b318bf966e57c74f6a8ee72))
- **useFormEvent:** 修复表单项存在defaultValue时,updateSchema方法会将setFieldsValue设置的值覆盖问题 ([#3287](https://github.com/vbenjs/vue-vben-admin/issues/3287)) ([72ef3df](https://github.com/vbenjs/vue-vben-admin/commit/72ef3df57fe978c0b8e185f0d632a59e128a390f))
- **useFormEvents:** 修复setFieldsValue 方法设置完值后,函数 componentProps丢失formActionType 的bug ([#3301](https://github.com/vbenjs/vue-vben-admin/issues/3301)) ([82671d0](https://github.com/vbenjs/vue-vben-admin/commit/82671d07502adbaa06decbe0caa51ca2ba2e5149))
- **util:** resolve executing retry even when HTTP status code is 401 ([#3756](https://github.com/vbenjs/vue-vben-admin/issues/3756)) ([3627402](https://github.com/vbenjs/vue-vben-admin/commit/36274025d6a19de978bcaaae3f0ddb42f31ecd2f))
- validateFields await missing ([#3254](https://github.com/vbenjs/vue-vben-admin/issues/3254)) ([71c3fea](https://github.com/vbenjs/vue-vben-admin/commit/71c3fea88afa9209f080458bbd7429b1d37baa2c))
- **VFormDesign:** findIndex === -1 ([#3305](https://github.com/vbenjs/vue-vben-admin/issues/3305)) ([d7472b8](https://github.com/vbenjs/vue-vben-admin/commit/d7472b8a2e480299888ffeac6ac95466b27afa0f))
- **vxe-table:** theme dark is not work ([#3239](https://github.com/vbenjs/vue-vben-admin/issues/3239)) ([031d613](https://github.com/vbenjs/vue-vben-admin/commit/031d613b18125c877ebaa4a3241c3b4bf9c7624a))
- watch open logic lost after build ([#3421](https://github.com/vbenjs/vue-vben-admin/issues/3421)) ([089a989](https://github.com/vbenjs/vue-vben-admin/commit/089a98953e01d6b7cb0003f33d321035e19311c5))
### Features
- 解决Form updateSchema后执行setProps导致schemaRef被重置的问题 ([#3354](https://github.com/vbenjs/vue-vben-admin/issues/3354)) ([b0e8154](https://github.com/vbenjs/vue-vben-admin/commit/b0e8154f9f23db71dba7302395cc7d3db4b4a339))
- 新增表单只读功能 ([#3335](https://github.com/vbenjs/vue-vben-admin/issues/3335)) ([342328c](https://github.com/vbenjs/vue-vben-admin/commit/342328ce5f06b33dabdbd4a3bdd2c846f011eb03))
- 修复 vxetable 实例中缺少的 getRefMaps 和 getComputeMaps 方法 ([#3361](https://github.com/vbenjs/vue-vben-admin/issues/3361)) ([2376e8f](https://github.com/vbenjs/vue-vben-admin/commit/2376e8f67d154fe902452c6c1af19248402602b7))
- 增加文本省略组件 ([#3180](https://github.com/vbenjs/vue-vben-admin/issues/3180)) ([8722471](https://github.com/vbenjs/vue-vben-admin/commit/87224715c3983227866f148d858276c1234f77e0))
- 支持设置多重水印,增加清除所有水印方法. close [#2610](https://github.com/vbenjs/vue-vben-admin/issues/2610) ([#3084](https://github.com/vbenjs/vue-vben-admin/issues/3084)) ([64b8128](https://github.com/vbenjs/vue-vben-admin/commit/64b812802f5ca053c8f0ae9c9f159cbfedb32d5d))
- add pinia persist plugin ([#3173](https://github.com/vbenjs/vue-vben-admin/issues/3173)) ([2152b3f](https://github.com/vbenjs/vue-vben-admin/commit/2152b3f779b47f70e4442ff4c850db10048733d3))
- **ApiTree:** 完善ApiTree组件的重置回显功能. close [#2307](https://github.com/vbenjs/vue-vben-admin/issues/2307) ([a0d4b10](https://github.com/vbenjs/vue-vben-admin/commit/a0d4b10a1f0f858925ce7fff3f9b686308fd3ada))
- **BasicButton:** BasicButton组件支持icon插槽. close [#1377](https://github.com/vbenjs/vue-vben-admin/issues/1377) ([5aac032](https://github.com/vbenjs/vue-vben-admin/commit/5aac032acc294e087e45d5787cbae843d5a86f28))
- **BasicForm:** 新增监听表单收缩方法传值进行判断 ([#3745](https://github.com/vbenjs/vue-vben-admin/issues/3745)) ([e9c6dd8](https://github.com/vbenjs/vue-vben-admin/commit/e9c6dd83b1b21bd46fbb7b16f159733761b49fd2))
- **BasicForm:** Improve ts types for BasicForm ([#3426](https://github.com/vbenjs/vue-vben-admin/issues/3426)) ([6bb7918](https://github.com/vbenjs/vue-vben-admin/commit/6bb79180fc798b1a0b1a6c22f7c13ddb3a45a3b5))
- **BasicTable:** 新增表格搜索获取参数的方法 ([#3715](https://github.com/vbenjs/vue-vben-admin/issues/3715)) ([de5f9e3](https://github.com/vbenjs/vue-vben-admin/commit/de5f9e304791ce131a589683282b42f77d10238c))
- **BasicTable:** table enable accordion expand ([#3533](https://github.com/vbenjs/vue-vben-admin/issues/3533)). resolve [#3525](https://github.com/vbenjs/vue-vben-admin/issues/3525) ([abae7f3](https://github.com/vbenjs/vue-vben-admin/commit/abae7f3295846f10b69c591739bbec22d176b6fe))
- **BasicTree:** BasicTree组件暴露treeData数据 ([caf1783](https://github.com/vbenjs/vue-vben-admin/commit/caf178352537650f603aca441386b377f7cf8821))
- ColumnSetting and SizeSetting persist ([#3398](https://github.com/vbenjs/vue-vben-admin/issues/3398)) ([f4df2d5](https://github.com/vbenjs/vue-vben-admin/commit/f4df2d5a4bd23f346af10580e5ab7de64933bb4c))
- **components->Upload:** 修正图片上传组件允许自定义上传格式限制 ([#3755](https://github.com/vbenjs/vue-vben-admin/issues/3755)) ([302e212](https://github.com/vbenjs/vue-vben-admin/commit/302e2125ba1c7e63e7db47ef6e1ee256da9f81d4))
- **demo->BasicTable:** add TableSelectionBar and enable checkbox rowSelection demo ([#3477](https://github.com/vbenjs/vue-vben-admin/issues/3477)) ([816553b](https://github.com/vbenjs/vue-vben-admin/commit/816553bfcd5a88988c6e7b93cc3378f4a5b17fee))
- **demo->useRequest:** 更新错误重试示例 ([#3456](https://github.com/vbenjs/vue-vben-admin/issues/3456)) ([7fa2578](https://github.com/vbenjs/vue-vben-admin/commit/7fa2578e6d578e7ab44793fcb2b41189a7ba9af3))
- **demo->useRequest:** 更新useRequest 依赖 Effect 函数案例 ([#3460](https://github.com/vbenjs/vue-vben-admin/issues/3460)) ([b57d9fc](https://github.com/vbenjs/vue-vben-admin/commit/b57d9fc60dd113607cd381dff1f88c47671fc434))
- **demo:** hooks useRequest 异步数据管理 ([#3447](https://github.com/vbenjs/vue-vben-admin/issues/3447)) ([d6d1120](https://github.com/vbenjs/vue-vben-admin/commit/d6d1120d00a24b7a97bd37f6a0786c1265fa870d))
- **deps:** update vite version to 5.x ([#3508](https://github.com/vbenjs/vue-vben-admin/issues/3508)) ([e6c7b5f](https://github.com/vbenjs/vue-vben-admin/commit/e6c7b5f9282adbdd9429495d5918c1eafbffde7d))
- fix ellipsis bug ([#3644](https://github.com/vbenjs/vue-vben-admin/issues/3644)) ([9372f1d](https://github.com/vbenjs/vue-vben-admin/commit/9372f1d159bb3236810e469defe6986b924d2264))
- **Form:** 新增Transfer、CropperAvatar、BasicTitle 组件至Form中并添加至演示页面 ([#3362](https://github.com/vbenjs/vue-vben-admin/issues/3362)) ([f6147fa](https://github.com/vbenjs/vue-vben-admin/commit/f6147fa44985d149692b5c6053a49b76d24767cc))
- **Form:** 在Form将BasicTitle识做为Divider一样的处理 ([#3371](https://github.com/vbenjs/vue-vben-admin/issues/3371)) ([cd71e60](https://github.com/vbenjs/vue-vben-admin/commit/cd71e60dd16e87706deb2d06310bc507c55d6a99))
- Form增加ImageUpload组件 ([#3172](https://github.com/vbenjs/vue-vben-admin/issues/3172)) ([b776ac4](https://github.com/vbenjs/vue-vben-admin/commit/b776ac4cd8a4895804b554949f39c82c03382006))
- **hooks:** useWatermark添加水印防篡改功能([#3395](https://github.com/vbenjs/vue-vben-admin/issues/3395)) ([#3397](https://github.com/vbenjs/vue-vben-admin/issues/3397)) ([0a1a5ff](https://github.com/vbenjs/vue-vben-admin/commit/0a1a5ffedc58190529617c9267c6510dc7e17ca9))
- **IconPicker:** IconPicker could allowClear and readonly for form ([#3414](https://github.com/vbenjs/vue-vben-admin/issues/3414)) ([e23f294](https://github.com/vbenjs/vue-vben-admin/commit/e23f29464bd609d6bc7228a5940032d693b006aa))
- iframe expose postmessage function ([#3368](https://github.com/vbenjs/vue-vben-admin/issues/3368)) ([05bc4ac](https://github.com/vbenjs/vue-vben-admin/commit/05bc4acb9b2107bfad8200c0f1942a76367d7a00))
- **input:** add auto-trimming for vxe-table input components ([#3684](https://github.com/vbenjs/vue-vben-admin/issues/3684)) ([9882e8d](https://github.com/vbenjs/vue-vben-admin/commit/9882e8df86cc68373cf0f1fa4f4aa04a9773825e))
- **layout->tabs:** support insert new tab after current tab ([#3471](https://github.com/vbenjs/vue-vben-admin/issues/3471)) ([1e34d3e](https://github.com/vbenjs/vue-vben-admin/commit/1e34d3e9e4c79a62a16c6209639f5394dea61148))
- **layout:** move setting button to tabs when fold ([#3264](https://github.com/vbenjs/vue-vben-admin/issues/3264)) ([83426b5](https://github.com/vbenjs/vue-vben-admin/commit/83426b5c96a88c3a6aa399eb6100ea5fb494fd0e))
- **Menu:** Add custom images to menu ([#3158](https://github.com/vbenjs/vue-vben-admin/issues/3158)) ([b3a6ef6](https://github.com/vbenjs/vue-vben-admin/commit/b3a6ef63bb500d8103bde17d588b3c0c4c77efd6))
- **menu:** Restore side bar settings and added menu mouse move in mode light style ([#3295](https://github.com/vbenjs/vue-vben-admin/issues/3295)) ([003a951](https://github.com/vbenjs/vue-vben-admin/commit/003a951befb9ef2878a35fbe3054252d0bc8e77e))
- **MultipleTab:** add tabs auto collapse interaction in fold mode and setting ([#3256](https://github.com/vbenjs/vue-vben-admin/issues/3256)) ([191e809](https://github.com/vbenjs/vue-vben-admin/commit/191e809b6d696d6e0b72c67ba1c7e89c721f2642))
- pinia persist plugin custom serializer ([#3244](https://github.com/vbenjs/vue-vben-admin/issues/3244)) ([ea51c49](https://github.com/vbenjs/vue-vben-admin/commit/ea51c492c2ba56aa6693217e24f60dc143f124f1))
- RefForm页面新增只读功能按钮 ([#3346](https://github.com/vbenjs/vue-vben-admin/issues/3346)) ([97b76ea](https://github.com/vbenjs/vue-vben-admin/commit/97b76ea6bc902d00c87c5cbd1cb2d67aa9a88347))
- **search:** adjust the menu search function to recognize lowercase input ([#3736](https://github.com/vbenjs/vue-vben-admin/issues/3736)) ([96ac362](https://github.com/vbenjs/vue-vben-admin/commit/96ac362fa6a89af256cf8a84e4b667c195c6ea2e))
- **Table-> CustomerCell:** helpMessage支持传递 tsx 和 h函数的数据 ([c373ffd](https://github.com/vbenjs/vue-vben-admin/commit/c373ffd3bfb7db454e0501b2f7b138ed1a9ec657))
- table搜索表单值发生改变可以触发reload ([#3378](https://github.com/vbenjs/vue-vben-admin/issues/3378)) ([1ca3f7c](https://github.com/vbenjs/vue-vben-admin/commit/1ca3f7c2c0c0c00e8395e26c59796c875d34e12c))
- **treeTable:** add function collapseRows and demo ([#3375](https://github.com/vbenjs/vue-vben-admin/issues/3375)) ([e656b5d](https://github.com/vbenjs/vue-vben-admin/commit/e656b5d8dcde38deeedc73d713d2367e54d2893b))
- **type->api:** resultField推断api的返回值应该包含recordbale类型 ([#3699](https://github.com/vbenjs/vue-vben-admin/issues/3699)) ([c7ab4a5](https://github.com/vbenjs/vue-vben-admin/commit/c7ab4a52989256ccae996191cc249d9cbb36e6d6))
- **Upload:** file list add drag func ([#3227](https://github.com/vbenjs/vue-vben-admin/issues/3227)). resolve [#3179](https://github.com/vbenjs/vue-vben-admin/issues/3179) ([beed7f2](https://github.com/vbenjs/vue-vben-admin/commit/beed7f2e1172531fe691384a50c8b0457f3a80d8))
- **VirtualScroll:** 虚拟滚动增加滚动到顶部, 底部, 指定项方法 ([#3687](https://github.com/vbenjs/vue-vben-admin/issues/3687)) ([7c52f08](https://github.com/vbenjs/vue-vben-admin/commit/7c52f083db30f7e68c3e10a88cbc47d41cf9de20))
- vxeTable searchInfo demo ([#3223](https://github.com/vbenjs/vue-vben-admin/issues/3223)) close [#3011](https://github.com/vbenjs/vue-vben-admin/issues/3011) ([59145ad](https://github.com/vbenjs/vue-vben-admin/commit/59145ade255ee752a7c8d8995634ec172a7f60c8))
- **vxetable:** 新增 clearEdit 方法 ([#3369](https://github.com/vbenjs/vue-vben-admin/issues/3369)) ([522e892](https://github.com/vbenjs/vue-vben-admin/commit/522e892d7947807f7d500a2bace23880729df204))
- **watermark:** support custom style ([#3634](https://github.com/vbenjs/vue-vben-admin/issues/3634)) ([ca3ddd1](https://github.com/vbenjs/vue-vben-admin/commit/ca3ddd19f7811cbf32fd87b6c1cfd6681c08fc69))
### Performance Improvements
- 解决ts文件通过alias引入vue文件后, vscode调转不到正确vue文件路径 ([#3099](https://github.com/vbenjs/vue-vben-admin/issues/3099)) ([033d882](https://github.com/vbenjs/vue-vben-admin/commit/033d8828a9545770e98909291dcb6fd8db90ee41))
- 优化水印在控制台可以hide的问题 ([#3732](https://github.com/vbenjs/vue-vben-admin/issues/3732)) ([9784cdc](https://github.com/vbenjs/vue-vben-admin/commit/9784cdc840336d5c2bb006fa3ababfa7fa4056af))
- **BasicTree:** 获取treeData改写成函数 ([748b99b](https://github.com/vbenjs/vue-vben-admin/commit/748b99b18f5fc4e313add38ad457f0a5f064db70))
- **BasicTree:** 外部获取treeData不必通过treeDataRef.value ([#3353](https://github.com/vbenjs/vue-vben-admin/issues/3353)) ([943f500](https://github.com/vbenjs/vue-vben-admin/commit/943f50051ca80b6646ed44a2117b7c9ef632ed6d))
- **breakpointEnum:** 修改enum与breakpoint.less内一致 ([#3276](https://github.com/vbenjs/vue-vben-admin/issues/3276)) ([8932318](https://github.com/vbenjs/vue-vben-admin/commit/89323186b56b06b148664ae7483c490cf7eadefa))
- **component:** formItem: label支持函数渲染 ([#3504](https://github.com/vbenjs/vue-vben-admin/issues/3504)) ([e6a7e4c](https://github.com/vbenjs/vue-vben-admin/commit/e6a7e4c4fcdc5ad94f55c4f19000d6767773691e))
- **ConfigProvider:** 配置antdv主题色, 使其与modifyVars配置一致 ([#3219](https://github.com/vbenjs/vue-vben-admin/issues/3219)) ([bb3d5b8](https://github.com/vbenjs/vue-vben-admin/commit/bb3d5b8ae8e8ae0e91acb3022f51572daf3210c6))
- **darkMode:** 深色模式颜色定义以及切换方式优化 ([#3436](https://github.com/vbenjs/vue-vben-admin/issues/3436)) ([b008c44](https://github.com/vbenjs/vue-vben-admin/commit/b008c44246bec32def74c6ae1dd3522bf8c1ca2e))
- **darkMode:** 优化深色模式颜色切换相关方法; 增加根据主题更新自定义颜色方法和示例 ([#3216](https://github.com/vbenjs/vue-vben-admin/issues/3216)) ([e497721](https://github.com/vbenjs/vue-vben-admin/commit/e497721e9b3d03de07a61808012d0d6e04fd9663))
- **IconPicker:** input trigger popover by click ([#3278](https://github.com/vbenjs/vue-vben-admin/issues/3278)) ([2bbc2d2](https://github.com/vbenjs/vue-vben-admin/commit/2bbc2d28119c7f7cadbf5411b9ea886fb8965de0))
- **ImageUpload:** 根据官方示例设置图片回显格式 ([#3252](https://github.com/vbenjs/vue-vben-admin/issues/3252)) ([2991bb1](https://github.com/vbenjs/vue-vben-admin/commit/2991bb1670d44633d1f571374553d027e0dad8a2))
- Modify i18 file format to JSON ([#3171](https://github.com/vbenjs/vue-vben-admin/issues/3171)) ([c24e0ef](https://github.com/vbenjs/vue-vben-admin/commit/c24e0efd1d2c7148a3df9c8b12a2a500910a3590))
- **useForm:** If the args of the setFieldsValue is empty, it will not be executed. close [#3209](https://github.com/vbenjs/vue-vben-admin/issues/3209) ([8f90087](https://github.com/vbenjs/vue-vben-admin/commit/8f900871ace30895d9fee84c4eb9018c0ad0450e))
### Reverts
- Revert "chore(deps): update ant-design-vue version to 4.1.0. resolve #3495" ([f9fc369](https://github.com/vbenjs/vue-vben-admin/commit/f9fc369637d1588aa5eebf5fee1f3526de14e0cb)), closes [#3495](https://github.com/vbenjs/vue-vben-admin/issues/3495)
- Revert "feat: table搜索表单值发生改变可以触发reload (#3378)" (#3407) ([2828ed3](https://github.com/vbenjs/vue-vben-admin/commit/2828ed304a778bb16b52223607428dac926d73bf)), closes [#3378](https://github.com/vbenjs/vue-vben-admin/issues/3378) [#3407](https://github.com/vbenjs/vue-vben-admin/issues/3407)
- Revert "chore: update `unplugin-config` (#3116)" (#3117) ([f0550f2](https://github.com/vbenjs/vue-vben-admin/commit/f0550f20438a4c11f51fcf3e4a4286692bcf7d9f)), closes [#3116](https://github.com/vbenjs/vue-vben-admin/issues/3116) [#3117](https://github.com/vbenjs/vue-vben-admin/issues/3117)
- Revert "chore: Update Dependencies" ([ae09d3c](https://github.com/vbenjs/vue-vben-admin/commit/ae09d3cfd6b11689620565b57b506826626d09e9))
- Revert "refactor: use `unplugin-config` (#3106)" ([694dead](https://github.com/vbenjs/vue-vben-admin/commit/694dead3115a535782b7dd3a3c2dc4eaa9f32d76)), closes [#3106](https://github.com/vbenjs/vue-vben-admin/issues/3106)
## [2.8.0](https://github.com/anncwb/vue-vben-admin/compare/v2.7.2...v2.8.0) (2021-11-03)
### Bug Fixes

File diff suppressed because it is too large Load Diff

1
CNAME
View File

@@ -1 +0,0 @@
vben.vvbin.cn

View File

@@ -1,25 +0,0 @@
# node 构建
FROM node:16-alpine as build-stage
# 署名
MAINTAINER Adoin 'adoin@qq.com'
WORKDIR /app
COPY . ./
# 设置 node 阿里镜像
RUN npm config set registry https://registry.npmmirror.com
# 设置--max-old-space-size
ENV NODE_OPTIONS=--max-old-space-size=16384
# 设置阿里镜像、pnpm、依赖、编译
RUN npm install pnpm -g && \
pnpm install --frozen-lockfile && \
pnpm build:docker
# node部分结束
RUN echo "🎉 编 🎉 译 🎉 成 🎉 功 🎉"
# nginx 部署
FROM nginx:1.23.3-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html/dist
COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
## 将/usr/share/nginx/html/dist/assets/index.js 和/usr/share/nginx/html/dist/_app.config.js中的"$vg_base_url"替换为环境变量中的VG_BASE_URL,$vg_sub_domain 替换成VG_SUB_DOMAIN$vg_default_user替换成VG_DEFAULT_USER$vg_default_password替换成VG_DEFAULT_PASSWORD 而后启动nginx
CMD sed -i "s|__vg_base_url|$VG_BASE_URL|g" /usr/share/nginx/html/dist/assets/entry/index-*.js /usr/share/nginx/html/dist/_app.config.js && \
nginx -g 'daemon off;'
RUN echo "🎉 架 🎉 设 🎉 成 🎉 功 🎉"

186
README.md
View File

@@ -5,174 +5,96 @@
<h1>Vue vben admin</h1>
</div>
**English** | [中文](./README.zh-CN.md)
## 简介
## Introduction
精简 Vue Vben Admin。
Vue Vben Admin is a free and open source middle platform/back-end template. Using the latest `vue3`, `vite4`, `TypeScript` and other mainstream technology, Vben is the out-of-the-box front-end solution for both production and learning purpose.
## 特性
## Features
- **最新技术栈**:使用 Vue3/vite2 等前端前沿技术开发
- **TypeScript**: 应用程序级 JavaScript 的语言
- **主题**:可配置的主题
- **国际化**:内置完善的国际化方案
- **Mock 数据** 内置 Mock 数据方案
- **权限** 内置完善的动态路由权限生成方案
- **组件** 二次封装了多个常用的组件
- **State-of-art Techinical Stack**Using the latest and popular front-end technology such as Vue3/vite2
- **TypeScript**: Application-level JavaScript language
- **Theming**: Configurable themes
- **International**Built-in i18n support
- **Response Mock**: Built-in response mock ability
- **Authority**: Built-in permission system based on dynamic routes.
- **Component**: Extracted and encapsulated components for various scenarios.
## 预览
## Preview
- [vue-vben-admin](https://vvbin.cn/next/) - 完整版中文站点
- [vue-vben-admin-gh-pages](https://anncwb.github.io/vue-vben-admin/) - 完整版 github 站点
- [vben-admin-thin-next](https://vvbin.cn/thin/next/) - 简化版中文站点
- [vben-admin-thin-gh-pages](https://anncwb.github.io/vben-admin-thin-next/) - 简化版 github 站点
- [vue-vben-admin](https://vben.vvbin.cn/) - Full version (Chinese)
- [vue-vben-admin-gh-pages](https://anncwb.github.io/vue-vben-admin/) - Full version (github hosted)
- [vben-admin-thin-next](https://vben.vvbin.cn/thin/next/) - Simplified Version (Chinese)
- [vben-admin-thin-gh-pages](https://anncwb.github.io/vben-admin-thin-next/) -Simplified Version (github hosted)
## 准备
Test account: vben/123456
- [node](http://nodejs.org/) 和 [git](https://git-scm.com/) -项目开发环境
- [Vite](https://vitejs.dev/) - 熟悉 vite 特性
- [Vue3](https://v3.vuejs.org/) - 熟悉 Vue 基础语法
- [TypeScript](https://www.typescriptlang.org/) - 熟悉`TypeScript`基本语法
- [Es6+](http://es6.ruanyifeng.com/) - 熟悉 es6 基本语法
- [Vue-Router-Next](https://next.router.vuejs.org/) - 熟悉 vue-router 基本使用
- [Ant-Design-Vue](https://2x.antdv.com/docs/vue/introduce-cn/) - ui 基本使用
- [Mock.js](https://github.com/nuysoft/Mock) - mockjs 基本语法
<p align="center">
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview1.png">
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview2.png">
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview3.png">
</p>
## 安装使用
### Use Gitpod
Open the project in Gitpod (free online dev environment for GitHub) and start coding immediately.
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/anncwb/vue-vben-admin)
## Documentation
[Document](https://doc.vvbin.cn/)
## Preparation
- [node](http://nodejs.org/) and [git](https://git-scm.com/) - Project development environment
- [Vite](https://vitejs.dev/) - Familiar with vite features
- [Vue3](https://v3.vuejs.org/) - Familiar with Vue basic syntax
- [TypeScript](https://www.typescriptlang.org/) - Familiar with the basic syntax of `TypeScript`
- [Es6+](http://es6.ruanyifeng.com/) - Familiar with es6 basic syntax
- [Vue-Router-Next](https://next.router.vuejs.org/) - Familiar with the basic use of vue-router
- [Ant-Design-Vue](https://antdv.com/docs/vue/introduce-cn/) - ui basic use
- [Mock.js](https://github.com/nuysoft/Mock) - mockjs basic syntax
## Install and use
- Get the project code
- 获取项目代码
```bash
git clone https://github.com/anncwb/vue-vben-admin.git
```
- Install dependencies
- 安装依赖
```bash
cd vue-vben-admin
git checkout thin
pnpm install
```
- run
- 运行
```bash
pnpm serve
```
- build
- 打包
```bash
pnpm build
```
- docker
## Git 贡献提交规范
### The dockerFile is located in the project root directory and supports differential deployment
- 参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
#### build image
- `feat` 增加新功能
- `fix` 修复问题/BUG
- `style` 代码风格相关无影响运行结果的
- `perf` 优化/性能提升
- `refactor` 重构
- `revert` 撤销修改
- `test` 测试相关
- `docs` 文档/注释
- `chore` 依赖更新/脚手架配置修改等
- `workflow` 工作流改进
- `ci` 持续集成
- `types` 类型定义文件更改
- `wip` 开发中
```bash
docker build -t vue-vben-admin .
```
## 相关仓库
#### Use environment variables to achieve differentiated container deployment. Specify service endpoint by assigning `VG_BASE_URL`. In the following example, `http://localhost:3333` is used as the back-end service address and the container is mapped to port `6666`:
如果这些插件对你有帮助,可以给一个 star 支持下
```bash
docker run --name vue-vben-admin -d -p 6666:80 -e VG_BASE_URL=http://localhost:3333 vue-vben-admin
```
Then you can navigate to `http://localhost:6666`
## Change Log
[CHANGELOG](./CHANGELOG.zh_CN.md)
## Project
- [vue-vben-admin](https://github.com/anncwb/vue-vben-admin) - full version
- [vue-vben-admin-thin-next](https://github.com/anncwb/vben-admin-thin-next) - Simplified version
## How to contribute
You are very welcome to join[Raise an issue](https://github.com/anncwb/vue-vben-admin/issues/new/choose) or submit a Pull Request。
**Pull Request:**
1. Fork code!
2. Create your own branch: `git checkout -b feat/xxxx`
3. Submit your changes: `git commit -am 'feat(function): add xxxxx'`
4. Push your branch: `git push origin feat/xxxx`
5. submit`pull request`
## Git Contribution submission specification
- reference [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) specification ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
- `feat` Add new features
- `fix` Fix the problem/BUG
- `style` Modify the code style/format that does not affect the feature
- `perf` Optimization/performance improvement
- `refactor` Refactor
- `revert` Undo edit
- `test` Test related
- `docs` Documentation/notes
- `chore` Dependency update/scaffolding configuration modification etc.
- `workflow` Workflow improvements
- `ci` Continuous integration
- `types` Type definition file changes
- `wip` In development
## Related warehouse
If these plugins are helpful to you, you can show support by leaving a star!
- [vite-plugin-mock](https://github.com/anncwb/vite-plugin-mock) - Used for local and development environment data mock
- [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - Used for html template conversion and compression
- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - Used to pack input .gz|.brotil files
- [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - Used to quickly generate svg sprite
## Browser support
The `Chrome 80+` browser is recommended for local development
Support modern browsers, doesn't include 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/)</br>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/)</br>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/)</br>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/)</br>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/)</br>Safari |
| :-: | :-: | :-: | :-: | :-: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
## Maintainer
[@Vben](https://github.com/anncwb) [@Jinmao](https://github.com/jinmao88)
## Thanks
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" alt="JetBrains Logo (Main) logo." height="120">
## Star History Chart
[![Star History Chart](https://api.star-history.com/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.com/#vbenjs/vue-vben-admin&Date)
- [vite-plugin-mock](https://github.com/anncwb/vite-plugin-mock) - 用于本地及开发环境数据 mock
- [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - 用于 html 模版转换及压缩
- [vite-plugin-style-import](https://github.com/anncwb/vite-plugin-style-import) - 用于组件库样式按需引入
- [vite-plugin-theme](https://github.com/anncwb/vite-plugin-theme) - 用于在线切换主题色等颜色相关配置
- [vite-plugin-imagemin](https://github.com/anncwb/vite-plugin-imagemin) - 用于打包压缩图片资源
- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - 用于打包输出.gz|.brotil 文件
- [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - 用于快速生成 svg 雪碧图
## License

View File

@@ -1,190 +0,0 @@
<div align="center"> <a href="https://github.com/anncwb/vue-vben-admin"> <img alt="VbenAdmin Logo" width="200" height="200" src="https://anncwb.github.io/anncwb/images/logo.png"> </a> <br> <br>
[![license](https://img.shields.io/github/license/anncwb/vue-vben-admin.svg)](LICENSE)
<h1>Vue vben admin</h1>
</div>
**中文** | [English](./README.md)
## 简介
Vue Vben Admin 是一个免费开源的中后台模版。使用了最新的`vue3`,`vite5`,`TypeScript`等主流技术开发,开箱即用的中后台前端解决方案,也可用于学习参考。
## 特性
- **最新技术栈**:使用 Vue3/vite5 等前端前沿技术开发
- **TypeScript**: 应用程序级 JavaScript 的语言
- **主题**:可配置的主题
- **国际化**:内置完善的国际化方案
- **Mock 数据** 内置 Mock 数据方案
- **权限** 内置完善的动态路由权限生成方案
- **组件** 二次封装了多个常用的组件
## 预览
- [vue-vben-admin](https://vben.vvbin.cn/) - 完整版中文站点
- [vue-vben-admin-gh-pages](https://anncwb.github.io/vue-vben-admin/) - 完整版 github 站点
- [vben-admin-thin-next](https://vben.vvbin.cn/thin/next/) - 简化版中文站点
- [vben-admin-thin-gh-pages](https://anncwb.github.io/vben-admin-thin-next/) - 简化版 github 站点
测试账号: vben/123456
<p align="center">
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview1.png">
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview2.png">
<img alt="VbenAdmin Logo" width="100%" src="https://anncwb.github.io/anncwb/images/preview3.png">
</p>
### 使用 Gitpod
在 Gitpod适用于 GitHub 的免费在线开发环境)中打开项目,并立即开始编码.
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/anncwb/vue-vben-admin)
## 文档
[文档地址](https://doc.vvbin.cn/)
## 准备
- [node](http://nodejs.org/) 和 [git](https://git-scm.com/) -项目开发环境
- [Vite](https://vitejs.dev/) - 熟悉 vite 特性
- [Vue3](https://v3.vuejs.org/) - 熟悉 Vue 基础语法
- [TypeScript](https://www.typescriptlang.org/) - 熟悉`TypeScript`基本语法
- [Es6+](http://es6.ruanyifeng.com/) - 熟悉 es6 基本语法
- [Vue-Router-Next](https://next.router.vuejs.org/) - 熟悉 vue-router 基本使用
- [Ant-Design-Vue](https://antdv.com/docs/vue/introduce-cn/) - ui 基本使用
- [Mock.js](https://github.com/nuysoft/Mock) - mockjs 基本语法
## 安装使用
- 获取项目代码
```bash
git clone https://github.com/anncwb/vue-vben-admin.git
```
- 安装依赖
```bash
cd vue-vben-admin
pnpm install
```
- 运行
```bash
pnpm serve
```
- 打包
```bash
pnpm build
```
- docker
### dockerFile 位于项目根目录下 并且支持差异化部署
#### 构建镜像
```bash
docker build -t vue-vben-admin .
```
#### 动态使用环境变量实现容器差异化部署,通过不同的 VG_BASE_URL 环境变量,指向不同的后端服务地址,下面例子使用 http://localhost:3333 作为后端服务地址,并且将容器映射到 6666 端口
```bash
docker run --name vue-vben-admin -d -p 6666:80 -e VG_BASE_URL=http://localhost:3333 vue-vben-admin
```
而后可以打开 http://localhost:6666 访问
## 更新日志
[CHANGELOG](./CHANGELOG.zh_CN.md)
## 项目地址
- [vue-vben-admin](https://github.com/anncwb/vue-vben-admin) - 完整版
- [vue-vben-admin-thin-next](https://github.com/anncwb/vben-admin-thin-next) - 简化版
## 如何贡献
非常欢迎你的加入![提一个 Issue](https://github.com/anncwb/vue-vben-admin/issues/new/choose) 或者提交一个 Pull Request。
**Pull Request:**
1. Fork 代码!
2. 创建自己的分支: `git checkout -b feat/xxxx`
3. 提交你的修改: `git commit -am 'feat(function): add xxxxx'`
4. 推送您的分支: `git push origin feat/xxxx`
5. 提交`pull request`
## Git 贡献提交规范
- 参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
- `feat` 增加新功能
- `fix` 修复问题/BUG
- `style` 代码风格相关无影响运行结果的
- `perf` 优化/性能提升
- `refactor` 重构
- `revert` 撤销修改
- `test` 测试相关
- `docs` 文档/注释
- `chore` 依赖更新/脚手架配置修改等
- `workflow` 工作流改进
- `ci` 持续集成
- `types` 类型定义文件更改
- `wip` 开发中
## 浏览器支持
本地开发推荐使用`Chrome 80+` 浏览器
支持现代浏览器, 不支持 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/)</br>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/)</br>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/)</br>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/)</br>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/)</br>Safari |
| :-: | :-: | :-: | :-: | :-: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
## 相关仓库
如果这些插件对你有帮助,可以给一个 star 支持下
- [vite-plugin-mock](https://github.com/anncwb/vite-plugin-mock) - 用于本地及开发环境数据 mock
- [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - 用于 html 模版转换及压缩
- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - 用于打包输出.gz|.brotil 文件
- [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - 用于快速生成 svg 雪碧图
## 后台整合示例
- [lamp-cloud](https://github.com/zuihou/lamp-cloud) - 基于 SpringCloud Alibaba 的微服务中后台快速开发平台
- [matecloud](https://github.com/matevip/matecloud) - MateCloud 微服务脚手架,基于 Spring Cloud 2020.0.3、SpringBoot 2.5.3 的全开源平台
## 维护者
[@Vben](https://github.com/anncwb) [@Jinmao](https://github.com/jinmao88)
## 感谢
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" alt="JetBrains Logo (Main) logo." height='120'>
## 交流
`Vue-vben-Admin` 是完全开源免费的项目,在帮助开发者更方便地进行中大型管理系统开发,同时也提供 QQ 交流群使用问题欢迎在群内提问。
- QQ 群 `569291866`
## Star 历史
[![Star History Chart](https://api.star-history.com/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.com/#vbenjs/vue-vben-admin&Date)
## License
[MIT © Vben-2020](./LICENSE)

View File

@@ -1,15 +0,0 @@
# Test Server
It is used to start the test interface service, which can test the upload, websocket, login and other interfaces.
## Usage
```bash
cd ./test/server
pnpm install
pnpm run start
```

View File

@@ -1,18 +0,0 @@
import FileService from '../service/FileService';
class FileController {
private service: FileService = new FileService();
upload = async (ctx) => {
const files = ctx.request.files.file;
console.log(files);
if (files.length === undefined) {
this.service.upload(ctx, files, false);
} else {
this.service.upload(ctx, files, true);
}
};
}
export default new FileController();

View File

@@ -1,15 +0,0 @@
import UserService from '../service/UserService';
class UserController {
private service: UserService = new UserService();
login = async (ctx) => {
ctx.body = await this.service.login();
};
getUserInfoById = async (ctx) => {
ctx.body = await this.service.getUserInfoById();
};
}
export default new UserController();

View File

@@ -1,18 +0,0 @@
const { name } = require('./package.json');
const path = require('path');
module.exports = {
apps: [
{
name,
script: path.resolve(__dirname, './dist/index.js'),
instances: require('os').cpus().length,
autorestart: true,
watch: true,
env_production: {
NODE_ENV: 'production',
PORT: 8080,
},
},
],
};

View File

@@ -1,63 +0,0 @@
import Koa from 'koa';
import path from 'path';
import Router from 'koa-router';
import body from 'koa-body';
import cors from 'koa2-cors';
import koaStatic from 'koa-static';
import websockify from 'koa-websocket';
import route from 'koa-route';
import AppRoutes from './routes';
const PORT = 3300;
const app = websockify(new Koa());
app.ws.use(function (ctx, next) {
ctx.websocket.send('connection succeeded!');
return next(ctx);
});
app.ws.use(
route.all('/test', function (ctx) {
// ctx.websocket.send('Hello World');
ctx.websocket.on('message', function (message) {
// do something with the message from client
if (message !== 'ping') {
const data = JSON.stringify({
id: Math.ceil(Math.random() * 1000),
time: new Date().getTime(),
res: `${message}`,
});
ctx.websocket.send(data);
}
console.log(message);
});
}),
);
const router = new Router();
// router
AppRoutes.forEach((route) => router[route.method](route.path, route.action));
app.use(cors());
app.use(
body({
encoding: 'gzip',
multipart: true,
formidable: {
// uploadDir: path.join(__dirname, '/upload/'), // 设置文件上传目录
keepExtensions: true,
maxFieldsSize: 20 * 1024 * 1024,
},
}),
);
app.use(router.routes());
app.use(router.allowedMethods());
app.use(koaStatic(path.join(__dirname)));
app.listen(PORT, () => {
console.log(`Application started successfully: http://localhost:${PORT}`);
});

View File

@@ -1,8 +0,0 @@
{
"watch": ["src"],
"ext": "ts",
"exec": "ts-node -r tsconfig-paths/register index.ts",
"events": {
"restart": "clear"
}
}

View File

@@ -1,36 +0,0 @@
{
"name": "server",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"compile": "rimraf ./dist && tsup ./index.ts --dts --format cjs,esm ",
"prod": "npx pm2 start ecosystem.config.cjs --env production",
"restart": "pm2 restart ecosystem.config.cjs --env production",
"start": "nodemon",
"stop": "npx pm2 stop ecosystem.config.cjs"
},
"dependencies": {
"fs-extra": "^11.1.1",
"koa": "^2.14.2",
"koa-body": "^6.0.1",
"koa-bodyparser": "^4.4.1",
"koa-route": "^3.2.0",
"koa-router": "^12.0.0",
"koa-static": "^5.0.0",
"koa-websocket": "^7.0.0",
"koa2-cors": "^2.0.6"
},
"devDependencies": {
"@types/koa": "^2.13.6",
"@types/koa-bodyparser": "^5.0.2",
"@types/koa-router": "^7.4.4",
"@types/node": "^20.4.0",
"nodemon": "^2.0.22",
"pm2": "^5.3.0",
"rimraf": "^5.0.1",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"tsup": "^7.1.0",
"typescript": "^5.1.6"
}
}

View File

@@ -1,23 +0,0 @@
import UserController from './controller/UserController';
import FileController from './controller/FileController';
export default [
// user
{
path: '/login',
method: 'post',
action: UserController.login,
},
{
path: '/getUserInfoById',
method: 'get',
action: UserController.getUserInfoById,
},
// file
{
path: '/upload',
method: 'post',
action: FileController.upload,
},
];

View File

@@ -1,54 +0,0 @@
import path from 'path';
import fs from 'fs-extra';
const uploadUrl = 'http://localhost:3300/static/upload';
const filePath = path.join(__dirname, '../static/upload/');
fs.ensureDir(filePath);
export default class FileService {
async upload(ctx, files, isMultiple) {
let fileReader, fileResource, writeStream;
const fileFunc = function (file) {
fileReader = fs.createReadStream(file.filepath);
fileResource = filePath + `/${file.originalFilename}`;
console.log(fileResource);
writeStream = fs.createWriteStream(fileResource);
fileReader.pipe(writeStream);
};
const returnFunc = function (flag) {
if (flag) {
let url = '';
for (let i = 0; i < files.length; i++) {
url += uploadUrl + `/${files[i].originalFilename},`;
}
url = url.replace(/,$/gi, '');
ctx.body = {
url: url,
code: 0,
message: 'upload Success!',
};
} else {
ctx.body = {
url: uploadUrl + `/${files.originalFilename}`,
code: 0,
message: 'upload Success!',
};
}
};
console.log(isMultiple, files.length);
if (isMultiple) {
for (let i = 0; i < files.length; i++) {
const f1 = files[i];
fileFunc(f1);
}
} else {
fileFunc(files);
}
fs.ensureDir(filePath);
returnFunc(isMultiple);
}
}

View File

@@ -1,25 +0,0 @@
import { Result } from '../utils';
const fakeUserInfo = {
userId: '1',
username: 'vben',
realName: 'Vben Admin',
desc: 'manager',
password: '123456',
token: 'fakeToken1',
roles: [
{
roleName: 'Super Admin',
value: 'super',
},
],
};
export default class UserService {
async login() {
return Result.success(fakeUserInfo);
}
async getUserInfoById() {
return Result.success(fakeUserInfo);
}
}

View File

@@ -1,7 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@vben/ts-config/node-server.json",
"compilerOptions": {
"noImplicitAny": false
}
}

View File

@@ -1,9 +0,0 @@
export class Result {
static success(data: any) {
return {
code: 0,
success: true,
result: data,
};
}
}

View File

@@ -0,0 +1,79 @@
import { generate } from '@ant-design/colors';
export const primaryColor = '#0960bd';
export const darkMode = 'light';
type Fn = (...arg: any) => any;
type GenerateTheme = 'default' | 'dark';
export interface GenerateColorsParams {
mixLighten: Fn;
mixDarken: Fn;
tinycolor: any;
color?: string;
}
export function generateAntColors(color: string, theme: GenerateTheme = 'default') {
return generate(color, {
theme,
});
}
export function getThemeColors(color?: string) {
const tc = color || primaryColor;
const lightColors = generateAntColors(tc);
const primary = lightColors[5];
const modeColors = generateAntColors(primary, 'dark');
return [...lightColors, ...modeColors];
}
export function generateColors({
color = primaryColor,
mixLighten,
mixDarken,
tinycolor,
}: GenerateColorsParams) {
const arr = new Array(19).fill(0);
const lightens = arr.map((_t, i) => {
return mixLighten(color, i / 5);
});
const darkens = arr.map((_t, i) => {
return mixDarken(color, i / 5);
});
const alphaColors = arr.map((_t, i) => {
return tinycolor(color)
.setAlpha(i / 20)
.toRgbString();
});
const shortAlphaColors = alphaColors.map((item) => item.replace(/\s/g, '').replace(/0\./g, '.'));
const tinycolorLightens = arr
.map((_t, i) => {
return tinycolor(color)
.lighten(i * 5)
.toHexString();
})
.filter((item) => item !== '#ffffff');
const tinycolorDarkens = arr
.map((_t, i) => {
return tinycolor(color)
.darken(i * 5)
.toHexString();
})
.filter((item) => item !== '#000000');
return [
...lightens,
...darkens,
...alphaColors,
...shortAlphaColors,
...tinycolorDarkens,
...tinycolorLightens,
].filter((item) => !item.includes('-'));
}

6
build/constant.ts Normal file
View File

@@ -0,0 +1,6 @@
/**
* The name of the configuration file entered in the production environment
*/
export const GLOB_CONFIG_FILE_NAME = '_app.config.js';
export const OUTPUT_DIR = 'dist';

View File

@@ -0,0 +1,37 @@
import { generateAntColors, primaryColor } from '../config/themeConfig';
import { getThemeVariables } from 'ant-design-vue/dist/theme';
import { resolve } from 'path';
/**
* less global variable
*/
export function generateModifyVars(dark = false) {
const palettes = generateAntColors(primaryColor);
const primary = palettes[5];
const primaryColorObj: Record<string, string> = {};
for (let index = 0; index < 10; index++) {
primaryColorObj[`primary-${index + 1}`] = palettes[index];
}
const modifyVars = getThemeVariables({ dark });
return {
...modifyVars,
// Used for global import to avoid the need to import each style file separately
// reference: Avoid repeated references
hack: `${modifyVars.hack} @import (reference) "${resolve('src/design/config.less')}";`,
'primary-color': primary,
...primaryColorObj,
'info-color': primary,
'processing-color': primary,
'success-color': '#55D187', // Success color
'error-color': '#ED6F6F', // False color
'warning-color': '#EFBD47', // Warning color
//'border-color-base': '#EEEEEE',
'font-size-base': '14px', // Main font size
'border-radius-base': '2px', // Component/float fillet
'link-color': primary, // Link color
'app-content-background': '#fafafa', // Link color
};
}

View File

@@ -0,0 +1,72 @@
import path from 'path';
import fs from 'fs-extra';
import inquirer from 'inquirer';
import colors from 'picocolors';
import pkg from '../../../package.json';
async function generateIcon() {
const dir = path.resolve(process.cwd(), 'node_modules/@iconify/json');
const raw = await fs.readJSON(path.join(dir, 'collections.json'));
const collections = Object.entries(raw).map(([id, v]) => ({
...(v as any),
id,
}));
const choices = collections.map((item) => ({ key: item.id, value: item.id, name: item.name }));
inquirer
.prompt([
{
type: 'list',
name: 'useType',
choices: [
{ key: 'local', value: 'local', name: 'Local' },
{ key: 'onLine', value: 'onLine', name: 'OnLine' },
],
message: 'How to use icons?',
},
{
type: 'list',
name: 'iconSet',
choices: choices,
message: 'Select the icon set that needs to be generated?',
},
{
type: 'input',
name: 'output',
message: 'Select the icon set that needs to be generated?',
default: 'src/components/Icon/data',
},
])
.then(async (answers) => {
const { iconSet, output, useType } = answers;
const outputDir = path.resolve(process.cwd(), output);
fs.ensureDir(outputDir);
const genCollections = collections.filter((item) => [iconSet].includes(item.id));
const prefixSet: string[] = [];
for (const info of genCollections) {
const data = await fs.readJSON(path.join(dir, 'json', `${info.id}.json`));
if (data) {
const { prefix } = data;
const isLocal = useType === 'local';
const icons = Object.keys(data.icons).map(
(item) => `${isLocal ? prefix + ':' : ''}${item}`,
);
await fs.writeFileSync(
path.join(output, `icons.data.ts`),
`export default ${isLocal ? JSON.stringify(icons) : JSON.stringify({ prefix, icons })}`,
);
prefixSet.push(prefix);
}
}
fs.emptyDir(path.join(process.cwd(), 'node_modules/.vite'));
console.log(
`${colors.cyan(`[${pkg.name}]`)}` + ' - Icon generated successfully:' + `[${prefixSet}]`,
);
});
}
generateIcon();

View File

@@ -0,0 +1,9 @@
/**
* Get the configuration file variable name
* @param env
*/
export const getConfigFileName = (env: Record<string, any>) => {
return `__PRODUCTION__${env.VITE_GLOB_APP_SHORT_NAME || '__APP'}__CONF__`
.toUpperCase()
.replace(/\s/g, '');
};

47
build/script/buildConf.ts Normal file
View File

@@ -0,0 +1,47 @@
/**
* Generate additional configuration files when used for packaging. The file can be configured with some global variables, so that it can be changed directly externally without repackaging
*/
import { GLOB_CONFIG_FILE_NAME, OUTPUT_DIR } from '../constant';
import fs, { writeFileSync } from 'fs-extra';
import colors from 'picocolors';
import { getEnvConfig, getRootPath } from '../utils';
import { getConfigFileName } from '../getConfigFileName';
import pkg from '../../package.json';
interface CreateConfigParams {
configName: string;
config: any;
configFileName?: string;
}
function createConfig(params: CreateConfigParams) {
const { configName, config, configFileName } = params;
try {
const windowConf = `window.${configName}`;
// Ensure that the variable will not be modified
let configStr = `${windowConf}=${JSON.stringify(config)};`;
configStr += `
Object.freeze(${windowConf});
Object.defineProperty(window, "${configName}", {
configurable: false,
writable: false,
});
`.replace(/\s/g, '');
fs.mkdirp(getRootPath(OUTPUT_DIR));
writeFileSync(getRootPath(`${OUTPUT_DIR}/${configFileName}`), configStr);
console.log(colors.cyan(`✨ [${pkg.name}]`) + ` - configuration file is build successfully:`);
console.log(colors.gray(OUTPUT_DIR + '/' + colors.green(configFileName)) + '\n');
} catch (error) {
console.log(colors.red('configuration file configuration file failed to package:\n' + error));
}
}
export function runBuildConfig() {
const config = getEnvConfig();
const configFileName = getConfigFileName(config);
createConfig({ config, configName: configFileName, configFileName: GLOB_CONFIG_FILE_NAME });
}

23
build/script/postBuild.ts Normal file
View File

@@ -0,0 +1,23 @@
// #!/usr/bin/env node
import { runBuildConfig } from './buildConf';
import colors from 'picocolors';
import pkg from '../../package.json';
export const runBuild = async () => {
try {
const argvList = process.argv.splice(2);
// Generate configuration file
if (!argvList.includes('disabled-config')) {
runBuildConfig();
}
console.log(`${colors.cyan(`[${pkg.name}]`)}` + ' - build successfully!');
} catch (error) {
console.log(colors.red('vite build error:\n' + error));
process.exit(1);
}
};
runBuild();

92
build/utils.ts Normal file
View File

@@ -0,0 +1,92 @@
import fs from 'fs';
import path from 'path';
import dotenv from 'dotenv';
export function isDevFn(mode: string): boolean {
return mode === 'development';
}
export function isProdFn(mode: string): boolean {
return mode === 'production';
}
/**
* Whether to generate package preview
*/
export function isReportMode(): boolean {
return process.env.REPORT === 'true';
}
// Read all environment variable configuration files to process.env
export function wrapperEnv(envConf: Recordable): ViteEnv {
const ret: any = {};
for (const envName of Object.keys(envConf)) {
let realName = envConf[envName].replace(/\\n/g, '\n');
realName = realName === 'true' ? true : realName === 'false' ? false : realName;
if (envName === 'VITE_PORT') {
realName = Number(realName);
}
if (envName === 'VITE_PROXY' && realName) {
try {
realName = JSON.parse(realName.replace(/'/g, '"'));
} catch (error) {
realName = '';
}
}
ret[envName] = realName;
if (typeof realName === 'string') {
process.env[envName] = realName;
} else if (typeof realName === 'object') {
process.env[envName] = JSON.stringify(realName);
}
}
return ret;
}
/**
* 获取当前环境下生效的配置文件名
*/
function getConfFiles() {
const script = process.env.npm_lifecycle_script;
const reg = new RegExp('--mode ([a-z_\\d]+)');
const result = reg.exec(script as string) as any;
if (result) {
const mode = result[1] as string;
return ['.env', `.env.${mode}`];
}
return ['.env', '.env.production'];
}
/**
* Get the environment variables starting with the specified prefix
* @param match prefix
* @param confFiles ext
*/
export function getEnvConfig(match = 'VITE_GLOB_', confFiles = getConfFiles()) {
let envConfig = {};
confFiles.forEach((item) => {
try {
const env = dotenv.parse(fs.readFileSync(path.resolve(process.cwd(), item)));
envConfig = { ...envConfig, ...env };
} catch (e) {
console.error(`Error in parsing ${item}`, e);
}
});
const reg = new RegExp(`^(${match})`);
Object.keys(envConfig).forEach((key) => {
if (!reg.test(key)) {
Reflect.deleteProperty(envConfig, key);
}
});
return envConfig;
}
/**
* Get user root directory
* @param dir file path
*/
export function getRootPath(...dir: string[]) {
return path.resolve(process.cwd(), ...dir);
}

View File

@@ -5,13 +5,10 @@
import type { PluginOption } from 'vite';
import compressPlugin from 'vite-plugin-compression';
export function configCompressPlugin({
compress,
export function configCompressPlugin(
compress: 'gzip' | 'brotli' | 'none',
deleteOriginFile = false,
}: {
compress: string;
deleteOriginFile?: boolean;
}): PluginOption[] {
): PluginOption | PluginOption[] {
const compressList = compress.split(',');
const plugins: PluginOption[] = [];

40
build/vite/plugin/html.ts Normal file
View File

@@ -0,0 +1,40 @@
/**
* Plugin to minimize and use ejs template syntax in index.html.
* https://github.com/anncwb/vite-plugin-html
*/
import type { PluginOption } from 'vite';
import { createHtmlPlugin } from 'vite-plugin-html';
import pkg from '../../../package.json';
import { GLOB_CONFIG_FILE_NAME } from '../../constant';
export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) {
const { VITE_GLOB_APP_TITLE, VITE_PUBLIC_PATH } = env;
const path = VITE_PUBLIC_PATH.endsWith('/') ? VITE_PUBLIC_PATH : `${VITE_PUBLIC_PATH}/`;
const getAppConfigSrc = () => {
return `${path || '/'}${GLOB_CONFIG_FILE_NAME}?v=${pkg.version}-${new Date().getTime()}`;
};
const htmlPlugin: PluginOption[] = createHtmlPlugin({
minify: isBuild,
inject: {
// Inject data into ejs template
data: {
title: VITE_GLOB_APP_TITLE,
},
// Embed the generated app.config.js file
tags: isBuild
? [
{
tag: 'script',
attrs: {
src: getAppConfigSrc(),
},
},
]
: [],
},
});
return htmlPlugin;
}

View File

@@ -0,0 +1,34 @@
// Image resource files used to compress the output of the production environment
// https://github.com/anncwb/vite-plugin-imagemin
import viteImagemin from 'vite-plugin-imagemin';
export function configImageminPlugin() {
const plugin = viteImagemin({
gifsicle: {
optimizationLevel: 7,
interlaced: false,
},
optipng: {
optimizationLevel: 7,
},
mozjpeg: {
quality: 20,
},
pngquant: {
quality: [0.8, 0.9],
speed: 4,
},
svgo: {
plugins: [
{
name: 'removeViewBox',
},
{
name: 'removeEmptyAttrs',
active: false,
},
],
},
});
return plugin;
}

View File

@@ -0,0 +1,82 @@
import { PluginOption } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import legacy from '@vitejs/plugin-legacy'
import purgeIcons from 'vite-plugin-purge-icons'
import windiCSS from 'vite-plugin-windicss'
import VitePluginCertificate from 'vite-plugin-mkcert'
//import vueSetupExtend from 'vite-plugin-vue-setup-extend';
import { configHtmlPlugin } from './html'
import { configPwaConfig } from './pwa'
import { configMockPlugin } from './mock'
import { configCompressPlugin } from './compress'
import { configStyleImportPlugin } from './styleImport'
import { configVisualizerConfig } from './visualizer'
import { configThemePlugin } from './theme'
import { configImageminPlugin } from './imagemin'
import { configSvgIconsPlugin } from './svgSprite'
export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
const {
VITE_USE_IMAGEMIN,
VITE_USE_MOCK,
VITE_LEGACY,
VITE_BUILD_COMPRESS,
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE,
} = viteEnv
const vitePlugins: (PluginOption | PluginOption[])[] = [
// have to
vue(),
// have to
vueJsx(),
// support name
//vueSetupExtend(),
VitePluginCertificate({
source: 'coding',
}),
]
// vite-plugin-windicss
vitePlugins.push(windiCSS())
// @vitejs/plugin-legacy
VITE_LEGACY && isBuild && vitePlugins.push(legacy())
// vite-plugin-html
vitePlugins.push(configHtmlPlugin(viteEnv, isBuild))
// vite-plugin-svg-icons
vitePlugins.push(configSvgIconsPlugin(isBuild))
// vite-plugin-mock
VITE_USE_MOCK && vitePlugins.push(configMockPlugin(isBuild))
// vite-plugin-purge-icons
vitePlugins.push(purgeIcons())
// vite-plugin-style-import
vitePlugins.push(configStyleImportPlugin(isBuild))
// rollup-plugin-visualizer
vitePlugins.push(configVisualizerConfig())
// vite-plugin-theme
vitePlugins.push(configThemePlugin(isBuild))
// The following plugins only work in the production environment
if (isBuild) {
// vite-plugin-imagemin
VITE_USE_IMAGEMIN && vitePlugins.push(configImageminPlugin())
// rollup-plugin-gzip
vitePlugins.push(
configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE),
)
// vite-plugin-pwa
vitePlugins.push(configPwaConfig(viteEnv))
}
return vitePlugins
}

View File

@@ -4,9 +4,9 @@
*/
import { viteMockServe } from 'vite-plugin-mock';
export function configMockPlugin({ isBuild }: { isBuild: boolean }) {
export function configMockPlugin(isBuild: boolean) {
return viteMockServe({
ignore: /^_/,
ignore: /^\_/,
mockPath: 'mock',
localEnabled: !isBuild,
prodEnabled: isBuild,

33
build/vite/plugin/pwa.ts Normal file
View File

@@ -0,0 +1,33 @@
/**
* Zero-config PWA for Vite
* https://github.com/antfu/vite-plugin-pwa
*/
import { VitePWA } from 'vite-plugin-pwa';
export function configPwaConfig(env: ViteEnv) {
const { VITE_USE_PWA, VITE_GLOB_APP_TITLE, VITE_GLOB_APP_SHORT_NAME } = env;
if (VITE_USE_PWA) {
// vite-plugin-pwa
const pwaPlugin = VitePWA({
manifest: {
name: VITE_GLOB_APP_TITLE,
short_name: VITE_GLOB_APP_SHORT_NAME,
icons: [
{
src: './resource/img/pwa-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: './resource/img/pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
},
],
},
});
return pwaPlugin;
}
return [];
}

View File

@@ -0,0 +1,81 @@
/**
* Introduces component library styles on demand.
* https://github.com/anncwb/vite-plugin-style-import
*/
import { createStyleImportPlugin } from 'vite-plugin-style-import'
export function configStyleImportPlugin(_isBuild: boolean) {
if (!_isBuild) {
return []
}
const styleImportPlugin = createStyleImportPlugin({
libs: [
{
libraryName: 'ant-design-vue',
esModule: true,
resolveStyle: (name) => {
// 这里是无需额外引入样式文件的“子组件”列表
const ignoreList = [
'anchor-link',
'sub-menu',
'menu-item',
'menu-divider',
'menu-item-group',
'breadcrumb-item',
'breadcrumb-separator',
'form-item',
'step',
'select-option',
'select-opt-group',
'card-grid',
'card-meta',
'collapse-panel',
'descriptions-item',
'list-item',
'list-item-meta',
'table-column',
'table-column-group',
'tab-pane',
'tab-content',
'timeline-item',
'tree-node',
'skeleton-input',
'skeleton-avatar',
'skeleton-title',
'skeleton-paragraph',
'skeleton-image',
'skeleton-button',
]
// 这里是需要额外引入样式的子组件列表
// 单独引入子组件时需引入组件样式,否则会在打包后导致子组件样式丢失
const replaceList = {
'typography-text': 'typography',
'typography-title': 'typography',
'typography-paragraph': 'typography',
'typography-link': 'typography',
'dropdown-button': 'dropdown',
'input-password': 'input',
'input-search': 'input',
'input-group': 'input',
'radio-group': 'radio',
'checkbox-group': 'checkbox',
'layout-sider': 'layout',
'layout-content': 'layout',
'layout-footer': 'layout',
'layout-header': 'layout',
'month-picker': 'date-picker',
'range-picker': 'date-picker',
'image-preview-group': 'image',
}
return ignoreList.includes(name)
? ''
: replaceList.hasOwnProperty(name)
? `ant-design-vue/es/${replaceList[name]}/style/index`
: `ant-design-vue/es/${name}/style/index`
},
},
],
})
return styleImportPlugin
}

View File

@@ -0,0 +1,17 @@
/**
* Vite Plugin for fast creating SVG sprites.
* https://github.com/anncwb/vite-plugin-svg-icons
*/
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
import path from 'path';
export function configSvgIconsPlugin(isBuild: boolean) {
const svgIconsPlugin = createSvgIconsPlugin({
iconDirs: [path.resolve(process.cwd(), 'src/assets/icons')],
svgoOptions: isBuild,
// default
symbolId: 'icon-[dir]-[name]',
});
return svgIconsPlugin;
}

View File

@@ -0,0 +1,89 @@
/**
* Vite plugin for website theme color switching
* https://github.com/anncwb/vite-plugin-theme
*/
import type { PluginOption } from 'vite';
import path from 'path';
import {
viteThemePlugin,
antdDarkThemePlugin,
mixLighten,
mixDarken,
tinycolor,
} from 'vite-plugin-theme';
import { getThemeColors, generateColors } from '../../config/themeConfig';
import { generateModifyVars } from '../../generate/generateModifyVars';
export function configThemePlugin(isBuild: boolean): PluginOption[] {
const colors = generateColors({
mixDarken,
mixLighten,
tinycolor,
});
const plugin = [
viteThemePlugin({
resolveSelector: (s) => {
s = s.trim();
switch (s) {
case '.ant-steps-item-process .ant-steps-item-icon > .ant-steps-icon':
return '.ant-steps-item-icon > .ant-steps-icon';
case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)':
case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover':
case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active':
return s;
case '.ant-steps-item-icon > .ant-steps-icon':
return s;
case '.ant-select-item-option-selected:not(.ant-select-item-option-disabled)':
return s;
default:
if (s.indexOf('.ant-btn') >= -1) {
// 按钮被重新定制过需要过滤掉class防止覆盖
return s;
}
}
return s.startsWith('[data-theme') ? s : `[data-theme] ${s}`;
},
colorVariables: [...getThemeColors(), ...colors],
}),
antdDarkThemePlugin({
preloadFiles: [
path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/antd.less'),
//path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/antd.dark.less'),
path.resolve(process.cwd(), 'src/design/index.less'),
],
filter: (id) => (isBuild ? !id.endsWith('antd.less') : true),
// extractCss: false,
darkModifyVars: {
...generateModifyVars(true),
'text-color': '#c9d1d9',
'primary-1': 'rgb(255 255 255 / 8%)',
'text-color-base': '#c9d1d9',
'component-background': '#151515',
'heading-color': 'rgb(255 255 255 / 65%)',
// black: '#0e1117',
// #8b949e
'text-color-secondary': '#8b949e',
'border-color-base': '#303030',
// 'border-color-split': '#30363d',
'item-active-bg': '#111b26',
'app-content-background': '#1e1e1e',
'tree-node-selected-bg': '#11263c',
'alert-success-border-color': '#274916',
'alert-success-bg-color': '#162312',
'alert-success-icon-color': '#49aa19',
'alert-info-border-color': '#153450',
'alert-info-bg-color': '#111b26',
'alert-info-icon-color': '#177ddc',
'alert-warning-border-color': '#594214',
'alert-warning-bg-color': '#2b2111',
'alert-warning-icon-color': '#d89614',
'alert-error-border-color': '#58181c',
'alert-error-bg-color': '#2a1215',
'alert-error-icon-color': '#a61d24',
},
}),
];
return plugin as unknown as PluginOption[];
}

View File

@@ -0,0 +1,17 @@
/**
* Package file volume analysis
*/
import visualizer from 'rollup-plugin-visualizer';
import { isReportMode } from '../../utils';
export function configVisualizerConfig() {
if (isReportMode()) {
return visualizer({
filename: './node_modules/.cache/visualizer/stats.html',
open: true,
gzipSize: true,
brotliSize: true,
}) as Plugin;
}
return [];
}

34
build/vite/proxy.ts Normal file
View File

@@ -0,0 +1,34 @@
/**
* Used to parse the .env.development proxy configuration
*/
import type { ProxyOptions } from 'vite';
type ProxyItem = [string, string];
type ProxyList = ProxyItem[];
type ProxyTargetList = Record<string, ProxyOptions>;
const httpsRE = /^https:\/\//;
/**
* Generate proxy
* @param list
*/
export function createProxy(list: ProxyList = []) {
const ret: ProxyTargetList = {};
for (const [prefix, target] of list) {
const isHttps = httpsRE.test(target);
// https://github.com/http-party/node-http-proxy#options
ret[prefix] = {
target: target,
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(new RegExp(`^${prefix}`), ''),
// https is require secure=false
...(isHttps ? { secure: false } : {}),
};
}
return ret;
}

View File

@@ -1,11 +1,11 @@
const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');
const fs = require('fs')
const path = require('path')
const { execSync } = require('child_process')
const scopes = fs
.readdirSync(path.resolve(__dirname, 'src'), { withFileTypes: true })
.filter((dirent) => dirent.isDirectory())
.map((dirent) => dirent.name.replace(/s$/, ''));
.map((dirent) => dirent.name.replace(/s$/, ''))
// precomputed scope
const scopeComplete = execSync('git status --porcelain || true')
@@ -15,7 +15,7 @@ const scopeComplete = execSync('git status --porcelain || true')
.find((r) => ~r.indexOf('M src'))
?.replace(/(\/)/g, '%%')
?.match(/src%%((\w|-)*)/)?.[1]
?.replace(/s$/, '');
?.replace(/s$/, '')
/** @type {import('cz-git').UserConfig} */
module.exports = {
@@ -51,7 +51,7 @@ module.exports = {
],
},
prompt: {
/** @use `pnpm commit :f` */
/** @use `yarn commit :f` */
alias: {
f: 'docs: fix typos',
r: 'docs: update README',
@@ -104,4 +104,4 @@ module.exports = {
// emptyScopesAlias: 'empty: 不填写',
// customScopesAlias: 'custom: 自定义',
},
};
}

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html lang="zh" id="htmlRoot">
<!DOCTYPE html>
<html lang="zh-cn" id="htmlRoot">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
@@ -8,17 +8,22 @@
name="viewport"
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
/>
<title><%= VITE_GLOB_APP_TITLE %></title>
<title><%= title %></title>
<link rel="icon" href="/favicon.ico" />
</head>
<body>
<script>
;(() => {
var htmlRoot = document.getElementById('htmlRoot')
var theme = window.localStorage.getItem('__APP__DARK__MODE__')
if (htmlRoot && theme) {
htmlRoot.setAttribute('data-theme', theme)
theme = htmlRoot = null
}
})()
</script>
<div id="app">
<style>
html {
/* same as ant-design-vue/dist/reset.css setting, avoid the title line-height changed */
line-height: 1.15;
}
html[data-theme='dark'] .app-loading {
background-color: #2c344a;
}
@@ -29,39 +34,39 @@
.app-loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: #f4f7f9;
}
.app-loading .app-loading-wrap {
display: flex;
position: absolute;
top: 50%;
left: 50%;
flex-direction: column;
align-items: center;
justify-content: center;
display: flex;
transform: translate3d(-50%, -50%, 0);
justify-content: center;
align-items: center;
flex-direction: column;
}
.app-loading .dots {
display: flex;
align-items: center;
justify-content: center;
padding: 98px;
justify-content: center;
align-items: center;
}
.app-loading .app-loading-title {
display: flex;
align-items: center;
justify-content: center;
margin-top: 30px;
color: rgb(0 0 0 / 85%);
font-size: 30px;
color: rgb(0 0 0 / 85%);
justify-content: center;
align-items: center;
}
.app-loading .app-loading-logo {
@@ -72,28 +77,28 @@
}
.dot {
display: inline-block;
position: relative;
box-sizing: border-box;
display: inline-block;
width: 48px;
height: 48px;
margin-top: 30px;
transform: rotate(45deg);
animation: ant-rotate 1.2s infinite linear;
font-size: 32px;
transform: rotate(45deg);
box-sizing: border-box;
animation: antRotate 1.2s infinite linear;
}
.dot i {
display: block;
position: absolute;
display: block;
width: 20px;
height: 20px;
transform: scale(0.75);
transform-origin: 50% 50%;
animation: ant-spin-move 1s infinite linear alternate;
border-radius: 100%;
opacity: 0.3;
background-color: #0065cc;
border-radius: 100%;
opacity: 30%;
transform: scale(0.75);
animation: antSpinMove 1s infinite linear alternate;
transform-origin: 50% 50%;
}
.dot i:nth-child(1) {
@@ -118,26 +123,34 @@
left: 0;
animation-delay: 1.2s;
}
@keyframes ant-rotate {
@keyframes antRotate {
to {
transform: rotate(405deg);
}
}
@keyframes ant-spin-move {
@keyframes antRotate {
to {
opacity: 1;
transform: rotate(405deg);
}
}
@keyframes antSpinMove {
to {
opacity: 100%;
}
}
@keyframes antSpinMove {
to {
opacity: 100%;
}
}
</style>
<div class="app-loading">
<div class="app-loading-wrap">
<img src="/logo.png" class="app-loading-logo" alt="Logo" />
<img src="/resource/img/logo.png" class="app-loading-logo" alt="Logo" />
<div class="app-loading-dots">
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
</div>
<div class="app-loading-title"><%= VITE_GLOB_APP_TITLE %></div>
<div class="app-loading-title"><%= title %></div>
</div>
</div>
</div>

View File

@@ -1,9 +0,0 @@
*.sh
node_modules
*.md
*.woff
*.ttf
.turbo
dist
package.json

View File

@@ -1,4 +0,0 @@
module.exports = {
root: true,
extends: ['@vben/eslint-config/strict'],
};

View File

@@ -1,10 +0,0 @@
import { defineBuildConfig } from 'unbuild';
export default defineBuildConfig({
clean: true,
entries: ['src/index', 'src/strict'],
declaration: true,
rollup: {
emitCJS: true,
},
});

View File

@@ -1,50 +0,0 @@
{
"name": "@vben/eslint-config",
"version": "1.0.0",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": {
"url": "https://github.com/vbenjs/vue-vben-admin/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vbenjs/vue-vben-admin.git",
"directory": "internal/eslint-config"
},
"license": "MIT",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./strict": {
"types": "./dist/strict.d.ts",
"import": "./dist/strict.mjs",
"require": "./dist/strict.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"clean": "pnpm rimraf .turbo node_modules dist",
"lint": "pnpm eslint .",
"stub": "pnpm unbuild --stub"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-vue": "^9.21.1",
"vue-eslint-parser": "^9.4.2"
}
}

View File

@@ -1,57 +0,0 @@
export default {
extends: ['@vben'],
plugins: ['simple-import-sort'],
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': 'allow-with-description',
'ts-nocheck': 'allow-with-description',
'ts-check': false,
},
],
/**
* 【强制】关键字前后有一个空格
* @link https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md
*/
'keyword-spacing': 'off',
'@typescript-eslint/keyword-spacing': [
'error',
{
before: true,
after: true,
overrides: {
return: { after: true },
throw: { after: true },
case: { after: true },
},
},
],
/**
* 禁止出现空函数,普通函数(非 async/await/generator、箭头函数、类上的方法除外
* @link https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md
*/
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': [
'error',
{
allow: ['arrowFunctions', 'functions', 'methods'],
},
],
/**
* 优先使用 interface 而不是 type 定义对象类型
* @link https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/consistent-type-definitions.md
*/
'@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
'vue/attributes-order': 'error',
'vue/require-default-prop': 'error',
},
};

View File

@@ -1,5 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@vben/ts-config/node.json",
"include": ["src"]
}

View File

@@ -1,9 +0,0 @@
*.sh
node_modules
*.md
*.woff
*.ttf
.turbo
dist
package.json

View File

@@ -1,4 +0,0 @@
module.exports = {
root: true,
extends: ['@vben/eslint-config/strict'],
};

View File

@@ -1,10 +0,0 @@
import { defineBuildConfig } from 'unbuild';
export default defineBuildConfig({
clean: true,
entries: ['src/index'],
declaration: true,
rollup: {
emitCJS: true,
},
});

View File

@@ -1,49 +0,0 @@
{
"name": "@vben/stylelint-config",
"version": "1.0.0",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": {
"url": "https://github.com/vbenjs/vue-vben-admin/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vbenjs/vue-vben-admin.git",
"directory": "internal/stylelint-config"
},
"license": "MIT",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"clean": "pnpm rimraf .turbo node_modules dist",
"lint": "pnpm eslint .",
"stub": "pnpm unbuild --stub"
},
"devDependencies": {
"postcss": "^8.4.38",
"postcss-html": "^1.6.0",
"postcss-less": "^6.0.0",
"postcss-scss": "^4.0.9",
"prettier": "^3.2.5",
"stylelint": "^16.3.1",
"stylelint-config-property-sort-order-smacss": "^10.0.0",
"stylelint-config-recommended-scss": "^14.0.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^36.0.0",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-order": "^6.0.4",
"stylelint-prettier": "^5.0.0"
}
}

View File

@@ -1,5 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@vben/ts-config/node.json",
"include": ["src"]
}

View File

@@ -1,27 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Base",
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"declaration": true,
"noImplicitOverride": true,
"noUnusedLocals": true,
"esModuleInterop": true,
"useUnknownInCatchVariables": false,
"composite": false,
"declarationMap": false,
"forceConsistentCasingInFileNames": true,
"inlineSources": false,
"isolatedModules": true,
"skipLibCheck": true,
"noUnusedParameters": false,
"preserveWatchOutput": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
"removeComments": true
},
"exclude": ["**/node_modules/**", "**/dist/**"]
}

View File

@@ -1,18 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node Server Config",
"extends": "./base.json",
"compilerOptions": {
"module": "commonjs",
"declaration": false,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es6",
"sourceMap": false,
"esModuleInterop": true,
"outDir": "./dist",
"baseUrl": "./"
},
"exclude": ["node_modules"]
}

View File

@@ -1,12 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node Config",
"extends": "./base.json",
"compilerOptions": {
"lib": ["ESNext"],
"noImplicitAny": true,
"sourceMap": true,
"noEmit": true,
"baseUrl": "./"
}
}

View File

@@ -1,26 +0,0 @@
{
"name": "@vben/ts-config",
"version": "1.0.0",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": {
"url": "https://github.com/vbenjs/vue-vben-admin/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vbenjs/vue-vben-admin.git",
"directory": "internal/ts-config"
},
"license": "MIT",
"type": "module",
"files": [
"base.json",
"node.json",
"vue-app.json",
"node-server.json"
],
"dependencies": {
"@types/node": "^20.12.7",
"vite": "^5.2.9"
}
}

View File

@@ -1,10 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Vue Application",
"extends": "./base.json",
"compilerOptions": {
"jsx": "preserve",
"lib": ["ESNext", "DOM"],
"noImplicitAny": false
}
}

View File

@@ -1,9 +0,0 @@
*.sh
node_modules
*.md
*.woff
*.ttf
.turbo
dist
package.json

View File

@@ -1,4 +0,0 @@
module.exports = {
root: true,
extends: ['@vben/eslint-config/strict'],
};

View File

@@ -1,10 +0,0 @@
import { defineBuildConfig } from 'unbuild';
export default defineBuildConfig({
clean: true,
entries: ['src/index'],
declaration: true,
rollup: {
emitCJS: true,
},
});

View File

@@ -1,59 +0,0 @@
{
"name": "@vben/vite-config",
"version": "1.0.0",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": {
"url": "https://github.com/vbenjs/vue-vben-admin/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vbenjs/vue-vben-admin.git",
"directory": "internal/vite-config"
},
"license": "MIT",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"clean": "pnpm rimraf .turbo node_modules dist",
"lint": "pnpm eslint .",
"stub": "pnpm unbuild --stub"
},
"dependencies": {
"@ant-design/colors": "^7.0.2",
"vite": "^5.2.9"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"ant-design-vue": "^4.1.2",
"dayjs": "^1.11.10",
"dotenv": "^16.4.5",
"fs-extra": "^11.2.0",
"less": "^4.2.0",
"picocolors": "^1.0.0",
"pkg-types": "^1.0.3",
"rollup-plugin-visualizer": "^5.12.0",
"sass": "^1.75.0",
"unocss": "0.59.4",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-dts": "^3.8.3",
"vite-plugin-html": "^3.2.2",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-purge-icons": "^0.10.0",
"vite-plugin-svg-icons": "^2.0.1"
}
}

View File

@@ -1,109 +0,0 @@
import { resolve } from 'node:path';
import dayjs from 'dayjs';
import { readPackageJSON } from 'pkg-types';
import { defineConfig, loadEnv, mergeConfig, type UserConfig } from 'vite';
import { createPlugins } from '../plugins';
import { generateModifyVars } from '../utils/modifyVars';
import { commonConfig } from './common';
interface DefineOptions {
overrides?: UserConfig;
options?: {
//
};
}
function defineApplicationConfig(defineOptions: DefineOptions = {}) {
const { overrides = {} } = defineOptions;
return defineConfig(async ({ command, mode }) => {
const root = process.cwd();
const isBuild = command === 'build';
const { VITE_PUBLIC_PATH, VITE_USE_MOCK, VITE_BUILD_COMPRESS, VITE_ENABLE_ANALYZE } = loadEnv(
mode,
root,
);
const defineData = await createDefineData(root);
const plugins = await createPlugins({
isBuild,
root,
enableAnalyze: VITE_ENABLE_ANALYZE === 'true',
enableMock: VITE_USE_MOCK === 'true',
compress: VITE_BUILD_COMPRESS,
});
const pathResolve = (pathname: string) => resolve(root, '.', pathname);
const timestamp = new Date().getTime();
const applicationConfig: UserConfig = {
base: VITE_PUBLIC_PATH,
resolve: {
alias: [
{
find: 'vue-i18n',
replacement: 'vue-i18n/dist/vue-i18n.cjs.js',
},
// @/xxxx => src/xxxx
{
find: /@\//,
replacement: pathResolve('src') + '/',
},
// #/xxxx => types/xxxx
{
find: /#\//,
replacement: pathResolve('types') + '/',
},
],
},
define: defineData,
build: {
target: 'es2015',
cssTarget: 'chrome80',
rollupOptions: {
output: {
// 入口文件名
entryFileNames: `assets/entry/[name]-[hash]-${timestamp}.js`,
manualChunks: {
vue: ['vue', 'pinia', 'vue-router'],
antd: ['ant-design-vue', '@ant-design/icons-vue'],
},
},
},
},
css: {
preprocessorOptions: {
less: {
modifyVars: generateModifyVars(),
javascriptEnabled: true,
},
},
},
plugins,
};
const mergedConfig = mergeConfig(commonConfig(mode), applicationConfig);
return mergeConfig(mergedConfig, overrides);
});
}
async function createDefineData(root: string) {
try {
const pkgJson = await readPackageJSON(root);
const { dependencies, devDependencies, name, version } = pkgJson;
const __APP_INFO__ = {
pkg: { dependencies, devDependencies, name, version },
lastBuildTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
};
return {
__APP_INFO__: JSON.stringify(__APP_INFO__),
};
} catch (error) {
return {};
}
}
export { defineApplicationConfig };

View File

@@ -1,22 +0,0 @@
import UnoCSS from 'unocss/vite';
import { type UserConfig } from 'vite';
const commonConfig: (mode: string) => UserConfig = (mode) => ({
server: {
host: true,
},
esbuild: {
drop: mode === 'production' ? ['console', 'debugger'] : [],
},
build: {
reportCompressedSize: false,
chunkSizeWarningLimit: 1500,
rollupOptions: {
// TODO: Prevent memory overflow
maxParallelFileOps: 3,
},
},
plugins: [UnoCSS()],
});
export { commonConfig };

View File

@@ -1,42 +0,0 @@
import { readPackageJSON } from 'pkg-types';
import { defineConfig, mergeConfig, type UserConfig } from 'vite';
import dts from 'vite-plugin-dts';
import { commonConfig } from './common';
interface DefineOptions {
overrides?: UserConfig;
options?: {
//
};
}
function definePackageConfig(defineOptions: DefineOptions = {}) {
const { overrides = {} } = defineOptions;
const root = process.cwd();
return defineConfig(async ({ mode }) => {
const { dependencies = {}, peerDependencies = {} } = await readPackageJSON(root);
const packageConfig: UserConfig = {
build: {
lib: {
entry: 'src/index.ts',
formats: ['es'],
fileName: () => 'index.mjs',
},
rollupOptions: {
external: [...Object.keys(dependencies), ...Object.keys(peerDependencies)],
},
},
plugins: [
dts({
logLevel: 'error',
}),
],
};
const mergedConfig = mergeConfig(commonConfig(mode), packageConfig);
return mergeConfig(mergedConfig, overrides);
});
}
export { definePackageConfig };

View File

@@ -1,2 +0,0 @@
export * from './config/application';
export * from './config/package';

View File

@@ -1,104 +0,0 @@
import colors from 'picocolors';
import { readPackageJSON } from 'pkg-types';
import { type PluginOption } from 'vite';
import { getEnvConfig } from '../utils/env';
import { createContentHash } from '../utils/hash';
const GLOBAL_CONFIG_FILE_NAME = '_app.config.js';
const PLUGIN_NAME = 'app-config';
async function createAppConfigPlugin({
root,
isBuild,
}: {
root: string;
isBuild: boolean;
}): Promise<PluginOption> {
let publicPath: string;
let source: string;
if (!isBuild) {
return {
name: PLUGIN_NAME,
};
}
const { version = '' } = await readPackageJSON(root);
return {
name: PLUGIN_NAME,
async configResolved(_config) {
const appTitle = _config?.env?.VITE_GLOB_APP_TITLE ?? '';
// appTitle = appTitle.replace(/\s/g, '_').replace(/-/g, '_');
publicPath = _config.base;
source = await getConfigSource(appTitle);
},
async transformIndexHtml(html) {
publicPath = publicPath.endsWith('/') ? publicPath : `${publicPath}/`;
const appConfigSrc = `${
publicPath || '/'
}${GLOBAL_CONFIG_FILE_NAME}?v=${version}-${createContentHash(source)}`;
return {
html,
tags: [
{
tag: 'script',
attrs: {
src: appConfigSrc,
},
},
],
};
},
async generateBundle() {
try {
this.emitFile({
type: 'asset',
fileName: GLOBAL_CONFIG_FILE_NAME,
source,
});
console.log(colors.cyan(`✨configuration file is build successfully!`));
} catch (error) {
console.log(
colors.red('configuration file configuration file failed to package:\n' + error),
);
}
},
};
}
/**
* Get the configuration file variable name
* @param env
*/
const getVariableName = (title: string) => {
function strToHex(str: string) {
const result: string[] = [];
for (let i = 0; i < str.length; ++i) {
const hex = str.charCodeAt(i).toString(16);
result.push(('000' + hex).slice(-4));
}
return result.join('').toUpperCase();
}
return `__PRODUCTION__${strToHex(title) || '__APP'}__CONF__`.toUpperCase().replace(/\s/g, '');
};
async function getConfigSource(appTitle: string) {
const config = await getEnvConfig();
const variableName = getVariableName(appTitle);
const windowVariable = `window.${variableName}`;
// Ensure that the variable will not be modified
let source = `${windowVariable}=${JSON.stringify(config)};`;
source += `
Object.freeze(${windowVariable});
Object.defineProperty(window, "${variableName}", {
configurable: false,
writable: false,
});
`.replace(/\s/g, '');
return source;
}
export { createAppConfigPlugin };

View File

@@ -1,13 +0,0 @@
/**
* Plugin to minimize and use ejs template syntax in index.html.
* https://github.com/anncwb/vite-plugin-html
*/
import type { PluginOption } from 'vite';
import { createHtmlPlugin } from 'vite-plugin-html';
export function configHtmlPlugin({ isBuild }: { isBuild: boolean }) {
const htmlPlugin: PluginOption[] = createHtmlPlugin({
minify: isBuild,
});
return htmlPlugin;
}

View File

@@ -1,59 +0,0 @@
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import { type PluginOption } from 'vite';
import purgeIcons from 'vite-plugin-purge-icons';
import { createAppConfigPlugin } from './appConfig';
import { configCompressPlugin } from './compress';
import { configHtmlPlugin } from './html';
import { configMockPlugin } from './mock';
import { configSvgIconsPlugin } from './svgSprite';
import { configVisualizerConfig } from './visualizer';
interface Options {
isBuild: boolean;
root: string;
compress: string;
enableMock?: boolean;
enableAnalyze?: boolean;
}
async function createPlugins({ isBuild, root, enableMock, compress, enableAnalyze }: Options) {
const vitePlugins: (PluginOption | PluginOption[])[] = [vue(), vueJsx()];
const appConfigPlugin = await createAppConfigPlugin({ root, isBuild });
vitePlugins.push(appConfigPlugin);
// vite-plugin-html
vitePlugins.push(configHtmlPlugin({ isBuild }));
// vite-plugin-svg-icons
vitePlugins.push(configSvgIconsPlugin({ isBuild }));
// vite-plugin-purge-icons
vitePlugins.push(purgeIcons());
// The following plugins only work in the production environment
if (isBuild) {
// rollup-plugin-gzip
vitePlugins.push(
configCompressPlugin({
compress,
}),
);
}
// rollup-plugin-visualizer
if (enableAnalyze) {
vitePlugins.push(configVisualizerConfig());
}
// vite-plugin-mock
if (enableMock) {
vitePlugins.push(configMockPlugin({ isBuild }));
}
return vitePlugins;
}
export { createPlugins };

View File

@@ -1,17 +0,0 @@
/**
* Vite Plugin for fast creating SVG sprites.
* https://github.com/anncwb/vite-plugin-svg-icons
*/
import { resolve } from 'node:path';
import type { PluginOption } from 'vite';
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
export function configSvgIconsPlugin({ isBuild }: { isBuild: boolean }) {
const svgIconsPlugin = createSvgIconsPlugin({
iconDirs: [resolve(process.cwd(), 'src/assets/icons')],
svgoOptions: isBuild,
});
return svgIconsPlugin as PluginOption;
}

View File

@@ -1,14 +0,0 @@
/**
* Package file volume analysis
*/
import visualizer from 'rollup-plugin-visualizer';
import { type PluginOption } from 'vite';
export function configVisualizerConfig() {
return visualizer({
filename: './node_modules/.cache/visualizer/stats.html',
open: true,
gzipSize: true,
brotliSize: true,
}) as PluginOption;
}

View File

@@ -1,49 +0,0 @@
import { join } from 'node:path';
import dotenv from 'dotenv';
import { readFile } from 'fs-extra';
/**
* 获取当前环境下生效的配置文件名
*/
function getConfFiles() {
const script = process.env.npm_lifecycle_script as string;
const reg = new RegExp('--mode ([a-z_\\d]+)');
const result = reg.exec(script);
if (result) {
const mode = result[1];
return ['.env', `.env.${mode}`];
}
return ['.env', '.env.production'];
}
/**
* Get the environment variables starting with the specified prefix
* @param match prefix
* @param confFiles ext
*/
export async function getEnvConfig(
match = 'VITE_GLOB_',
confFiles = getConfFiles(),
): Promise<{
[key: string]: string;
}> {
let envConfig = {};
for (const confFile of confFiles) {
try {
const envPath = await readFile(join(process.cwd(), confFile), { encoding: 'utf8' });
const env = dotenv.parse(envPath);
envConfig = { ...envConfig, ...env };
} catch (e) {
console.error(`Error in parsing ${confFile}`, e);
}
}
const reg = new RegExp(`^(${match})`);
Object.keys(envConfig).forEach((key) => {
if (!reg.test(key)) {
Reflect.deleteProperty(envConfig, key);
}
});
return envConfig;
}

View File

@@ -1,16 +0,0 @@
import { createHash } from 'node:crypto';
function createContentHash(content: string, hashLSize = 12) {
const hash = createHash('sha256').update(content);
return hash.digest('hex').slice(0, hashLSize);
}
function strToHex(str: string) {
const result: string[] = [];
for (let i = 0; i < str.length; ++i) {
const hex = str.charCodeAt(i).toString(16);
result.push(('000' + hex).slice(-4));
}
return result.join('').toUpperCase();
}
export { createContentHash, strToHex };

View File

@@ -1,47 +0,0 @@
import { resolve } from 'node:path';
import { generate } from '@ant-design/colors';
// @ts-ignore: typo
/* import { getThemeVariables } from 'ant-design-vue/dist/theme'; */
import { theme } from 'ant-design-vue/lib';
import convertLegacyToken from 'ant-design-vue/lib/theme/convertLegacyToken';
const { defaultAlgorithm, defaultSeed } = theme;
const primaryColor = '#0960bd';
function generateAntColors(color: string, theme: 'default' | 'dark' = 'default') {
return generate(color, {
theme,
});
}
/**
* less global variable
*/
export function generateModifyVars() {
const palettes = generateAntColors(primaryColor);
const primary = palettes[5];
const primaryColorObj: Record<string, string> = {};
for (let index = 0; index < 10; index++) {
primaryColorObj[`primary-${index + 1}`] = palettes[index];
}
// const modifyVars = getThemeVariables();
const mapToken = defaultAlgorithm(defaultSeed);
const v3Token = convertLegacyToken(mapToken);
return {
...v3Token,
// reference: Avoid repeated references
hack: `true; @import (reference) "${resolve('src/design/config.less')}";`,
'primary-color': primary,
...primaryColorObj,
'info-color': primary,
'processing-color': primary,
'success-color': '#55D187', // Success color
'error-color': '#ED6F6F', // False color
'warning-color': '#EFBD47', // Warning color
'font-size-base': '14px', // Main font size
'border-radius-base': '2px', // Component/float fillet
'link-color': primary, // Link color
};
}

View File

@@ -1,5 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@vben/ts-config/node.json",
"include": ["src"]
}

View File

@@ -1,29 +1,13 @@
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer';
// 问题描述
// 1. `import.meta.globEager` 已被弃用, 需要升级vite版本,有兼容问题
// 2. `vite-plugin-mock` 插件问题 https://github.com/vbenjs/vite-plugin-mock/issues/56
// const modules: Record<string, any> = import.meta.glob("./**/*.ts", {
// import: "default",
// eager: true,
// });
// const mockModules = Object.keys(modules).reduce((pre, key) => {
// if (!key.includes("/_")) {
// pre.push(...modules[key]);
// }
// return pre;
// }, [] as any[]);
const modules = import.meta.glob('./**/*.ts', { eager: true });
const modules = import.meta.globEager('./**/*.ts');
const mockModules: any[] = [];
Object.keys(modules).forEach((key) => {
if (key.includes('/_')) {
return;
}
mockModules.push(...(modules as Recordable)[key].default);
mockModules.push(...modules[key].default);
});
/**

Some files were not shown because too many files have changed in this diff Show More