diff --git a/.env.test b/.env.test new file mode 100644 index 00000000..469b307d --- /dev/null +++ b/.env.test @@ -0,0 +1,36 @@ +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 + +# 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= + +# Whether to enable image compression +VITE_USE_IMAGEMIN= true + +# use pwa +VITE_USE_PWA = false + +# Is it compatible with older browsers +VITE_LEGACY = false diff --git a/.eslintrc.js b/.eslintrc.js index d4c9c6cb..5fcac9eb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,6 +25,7 @@ module.exports = defineConfig({ 'plugin:jest/recommended', ], rules: { + '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', diff --git a/.github/ISSUE_TEMPLATE/3-bug-cn.md b/.github/ISSUE_TEMPLATE/3-bug-cn.md new file mode 100644 index 00000000..fade42ad --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3-bug-cn.md @@ -0,0 +1,28 @@ +--- +name: 🐛 Bug 报告 +about: 向我们报告一个Bug以帮助我们改进 +title: '' +labels: 'bug: pending triage' +assignees: '' +--- + +**⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭** + +- [ ] 已阅读 [文档](https://anncwb.github.io/vue-vben-admin-doc/). +- [ ] 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复) +- [ ] 已在 Issues 中搜索了相关的关键词 +- [ ] 不是 ant design vue 组件库的 Bug + +### 描述 Bug + +请清晰地描述此 Bug 的具体表现。 + +### 复现 Bug + +请描述在演示页面中复现 Bug 的详细步骤,以确保我们可以理解并定位问题。部分 Bug 如果未在 Demo 中涉及,请务必提供关键代码 + +## 系统信息 + +- 操作系统: +- Node 版本: +- 包管理器 (npm/yarn/pnpm) 及其版本: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a332270e..b974f5ef 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -68,10 +68,10 @@ jobs: sed -i "s#VITE_BUILD_COMPRESS\s*=.*#VITE_BUILD_COMPRESS = 'gzip'#g" ./.env.production cat ./.env.production - - name: use Node.js 14 + - name: use Node.js 16 uses: actions/setup-node@v2.1.2 with: - node-version: '14.x' + node-version: '16.x' - name: Get yarn cache id: yarn-cache diff --git a/.github/workflows/ftp-schedule.yml b/.github/workflows/ftp-schedule.yml new file mode 100644 index 00000000..6db8dc8b --- /dev/null +++ b/.github/workflows/ftp-schedule.yml @@ -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 diff --git a/.gitignore b/.gitignore index 2f4e6611..a4b670db 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,8 @@ dist .npmrc .cache -test/server/static +tests/server/static +tests/server/static/upload .local # local env files diff --git a/.husky/.gitignore b/.husky/.gitignore deleted file mode 100644 index 31354ec1..00000000 --- a/.husky/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_ diff --git a/.vscode/launch.json b/.vscode/launch.json index 384f3bec..72e95d0d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,6 +8,6 @@ "url": "http://localhost:3100", "webRoot": "${workspaceFolder}/src", "sourceMaps": true - }, + } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 86ae5732..e0ed52f3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -117,6 +117,7 @@ "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}", "i18n-ally.enabledParsers": ["ts"], "i18n-ally.sourceLanguage": "en", + "i18n-ally.displayLanguage": "zh-CN", "i18n-ally.enabledFrameworks": ["vue", "react"], "cSpell.words": [ "vben", @@ -129,6 +130,26 @@ "qrcode", "sider", "pinia", + "sider", + "nprogress", + "INTLIFY", + "stylelint", + "esno", + "vitejs", + "sortablejs", + "mockjs", + "codemirror", + "iconify", + "commitlint", + "vditor", + "echarts", + "cropperjs", + "logicflow", + "vueuse", + "zxcvbn", + "lintstagedrc", + "brotli", + "tailwindcss", "sider" ] } diff --git a/CHANGELOG.en_US.md b/CHANGELOG.en_US.md index ae3619a8..93ad8468 100644 --- a/CHANGELOG.en_US.md +++ b/CHANGELOG.en_US.md @@ -1,3 +1,250 @@ +## 2.7.2(2021-09-14) + +### ✨ Features + +- **BasicForm** New `Divider` in the form component for dividing the area of longer forms +- **BasicTable** + - Cell editor adds submit callback, which will decide whether to submit data to the form based on the result returned by the callback function + - Add check method for row editing, allowing only check but not submit value, so asynchronously save data successfully before submit to table + - Fix the problem that the `rowClassName` property cannot be used at the same time as `striped`. +- New component **MarkdownViewer** for displaying rich text in Markdown format + +### 🐛 Bug Fixes + +- **CodeEditor** Fix JSON editor throwing exception when formatting invalid JSON text +- **Tinymce** fixes an issue where inline mode throws an exception in some scenarios +- **BasicTable** + - Repair the problem that the editing icon is not displayed when the content of editable cell is empty + - Repair the problem that the total row at the end of the table sometimes fails to align with the columns in the main part of the table. +- **MarkDown** Repair the problem that the value of initial value property does not work. +- **BasicUpload** Repair the problem that `accept` property does not support `MIME` and suffix name starting with dot. +- **ApiSelect** Fix the problem of type definition of `value` property. +- **Other** + - Repair the problem that some wrapper components give error when using slots. + - Repair the problem that `theme` parameter of `useECharts` does not work. + - Repair the problem that when `Token` is invalid, pressing F5 to refresh the page may cause abnormal page loading. + - Repair the problem that the improper call of `useRedo` may lead to `path` redirection abnormality. + - Repair the problem that `vite` custom mode name does not support underscore. + +## 2.7.1(2021-08-16) + +- Upgrade vue 3.2, if the operation fails, delete node_modules and reinstall it + +### ✨ Features + +- **BasicTree** Add search function related properties and methods +- **BasicForm** added `alwaysShowLines` to set the number of lines kept displayed when folding + +### 🐛 Bug Fixes + +- **Cropper** Fix the problem of failure to destroy in time +- **BasicTable** + - Fix the problem that `CellFormat` cannot use `Map` type data + - Fixed an issue where the editable cell failed to display the `0` value correctly + - Fixed the issue that selection-change event failed to trigger correctly when unchecked + - Fix the problem that the background color of the full screen state under the light theme is incorrect + - Fix the problem of obtaining complete data when `getSelectRows` does not support remote data cross-page selection + - Fix the issue that the `size` property provided for editing components in `editComponentProps` is invalid +- **Qrcode** Fixed the problem that the QR code component could not be drawn in time when it was created +- **BasicModal** Fix the problem that the `helpMessage` property does not work +- **BasicButton** Fix the problem that the button style performance is inconsistent with the official antd +- **Others** Fix the problem that `useRedo` (reload the current route) will lose route `params` data + +## 2.7.0(2021-08-03) + +## (Breaking changes) Breaking changes + +- Restore the project `tailwindcss` back to `windicss`, tried `tailwindcss`, there may be a lot of problems, first switch back to `windicss` to improve development efficiency and lower switching costs. + - There are currently incompatible areas of the project + - The wording of `xl:!m-4` needs to be changed to `!xl:m-4`, note that only `!` is incompatible. If you don’t use it, you don’t need to change it. + - The memory overflow problem may still exist (low frequency, just restart, restart vite faster) + +### ✨ Features + +- **Preview** Add new properties and events +- **Dark Theme** added support for tailwindcss night mode +- **Others** add setTip method for useLoading + +### 🐛 Bug Fixes + +- **ApiTreeSelect** Fixed the problem of failing to monitor `params` changes correctly +- **ImgRotateDragVerify** Fix the problem that the component `resume` method cannot be called +- **TableAction** Fix the problem that the stopButtonPropagation property does not work in some cases +- **PageWrapper** Fix the problem of invalid `class` attribute +- **BasicTree** Fix the problem that the `checkAll` method will affect the `disabled` state node +- **BasicTable** + - Fix the issue that editable cells do not support `ellipsis` configuration + - Fixed the problem that the pop-up layer of sub-components (popconfirm and edit components such as select and treeSelect) cannot be seen in full-screen mode + - Fixed an issue where when `expandRowByClick` is enabled, clicking non-expandable rows may cause style errors + - Fix the problem that the dynamic change of `pagination` property does not take effect + - Fix the problem that `getSelectRows` does not support the child data of the tree table -**Dark Theme** Fix the color matching problem under the dark theme + - Fix the background color of the selected node of the `Tree` component + - Fix the color configuration of the `Alert` component + - Fix the problem of the button color of `link` type in the disabled state + - Fix the style problem of checked checkboxes in `Tree` -**Others** Fix the problem that useScript failed to automatically remove the script node + +## 2.6.1(2021-07-19) + +### ✨ Features + +- **NoticeList** Add pagination, auto omit for overlength, title click event, title strikethrough, etc. +- **MixSider** Optimize the style of the bottom collapse button in the Mix menu layout to be consistent with the style of other menu layouts +- **ApiTreeSelect** Extend `TreeSelect` component of `antdv` to support remote data source, similar to `ApiSelect`. +- **BasicTable** New `ApiTreeSelect` editing component +- Different backend home pages can be specified for different users. + - Add `homePath` field (optional) to the user information returned by the `getUserInfo` interface to customize the home page path for the current user + +### 🐛 Bug Fixes + +- **BasicTable** + - Fix scrollbar style issue (removed scroll style patch) + - Fix the alignment problem of cells with expanded icons in tree tables + - Add `headerTop` slot. + - Fix the color display of the operation column button in disabled state. + - Repair the problem that the values of editable cells cannot be updated by modifying `dataSource` directly. + - Repair the problem of data replay when using `ApiSelect` to edit components. + - Repair the problem that editing components may report `onXXX` type error in some scenarios. +- **TableAction** + - Create Tooltip component only if `action.tooltip` exists. + - Fix the problem that the content of the round button inside the component is not centered +- **AppSearch** Fix the problem that the hidden menu may be searched. +- **BasicUpload** Repair the problem of error when handling non-`array` values. +- **Form** Repair the `suffix` slot style problem of `FormItem`. +- **Menu** + - Repair the hovering trigger logic of the left mixed menu + - Repair the problem that the top bar menu is wrong when displaying menu items that need to be hidden. + - Fix the left mixed menu in hover trigger mode will jump to route directly when there is no submenu and it is activated +- **Breadcrumb** Repair the problem that the menu with redirection cannot be jumped when clicked +- **Markdown** fixes an initialization exception and an issue where value was not set dynamically correctly +- **Modal** Make sure props are passed correctly +- **MultipleTab** fixes an issue that could accidentally create login route tabs +- **BasicTree** Fix the problem that the search function may cause `checkedKeys` to be lost +- **CodeEditor** Fix the problem that value does not support v-model usage. +- **CountdownInput** Fix the problem that `input` slot is not supported. +- **ApiSelect** Fix the problem that the `options-change` event parameter is not the standard `options` data used by `select +- **Other** + - Fix the problem that the configuration of default menu collapse does not work + - Repair the problem that `safari` browser reports an error and the website cannot be opened. + - Repair the problem that eslint keeps error due to endOfLine after pulling the code on window. + - Fix `Vue Router warn` caused by dynamic routing + +### 🎫 Chores + +- Add test environment test command + +## 2.6.0(2021-07-04) + +### ✨ Features + +- **Axios** New `withToken` configuration to control whether the request carries a token or not +- **BasicUpload** + - New `preview-delete` event triggered when deleting a file in preview `Modal`. + - `value` supports `v-model` usage +- **Route configuration** + - Add `ignoreRoute` to generate menu only in `ROUTE_MAPPING` or `BACK` permission mode + - Add `hidePathForChildren` configuration to ignore this level `path` when generating menus for child items +- **TableAction** Add `tooltip` configuration to add tooltip hint for button +- **CropperAvatar** + - Added `value` to set the current avatar + - Added `onChange` to accept avatar cropping and upload success event + - New `btnText`, `btnProps` for customizing the text and properties of the upload button + - Add tooltips to the action buttons in `Modal` for cropping +- **Modal** Add tooltip for action button in top right corner + +### 🐛 Bug Fixes + +- **Modal** + - Fix the problem that the mask cannot be closed by clicking on it. + - Fix `setModalProps` does not support setting `defaultFullscreen`. +- **Table** + - Fix the problem that `editComponentProps` doesn't support `onChange`. + - Fix the problem that `selection-change` event is not triggered when `clickToRowSelect` is enabled. + - Fix the problem that global configuration `fetchSetting` may be accidentally modified by local configuration. + - Fix the problem that the parameter of `handleSearchInfoFn` contains redundant blank keys. + - Repair the problem that when rowSelection.onChange is provided for table, the selected items of table cannot be changed manually. + - Fix the problem that the scrollbar continues to be displayed even when it is not needed to be displayed. +- **Icon** Repair the problem that SvgIcon is missing some styles. +- **Menu** + - Repair the problem that single-level menu refreshing will not be activated in route mapping mode. + - Repair the problem that the collapse customization at the bottom of the side menu is invalid. +- **Form** Repair the type definition of `submitButtonOptions` and `resetButtonOptions`. +- **PopConfirmButton** Remove the redundant `title` on `Button`. +- **Axios** Fix the problem that `params` and `data` data cannot be submitted at the same time when non-`GET` requests are made +- **Other** + - Repair the problem that the lock screen function can skip the lock state by refreshing the page or copying the URL to open a new browser tab + - Repair the problem that `Token` won't be synchronized when multiple windows open pages at the same time. + - Repair the problem that `hasPermission` does not work in `ROLE` permission mode. +- **Table** Repair the problem that the parameter of `handleSearchInfoFn` contains extra blank keys. +- **Tailwindcss** Remove console warning + +## 2.5.2(2021-06-27) + +### ⚡ Performance Improvements + +- **Icon** Remove the global registration of Icon components to prevent hot update issues under certain circumstances + +### ✨ Features + +- **Menu** Added `permissionMode=PermissionModeEnum.ROUTE_MAPPING` mode + - The project is changed to this mode by default, and the original menu file is deleted + - If you have written the menu before, you can change to `PermissionModeEnum.ROLE` mode + +## 2.5.1(2021-06-26) + +### ⚡ Performance Improvements + +- Upgrade `vue` and `ant-design-vue` versions to solve compatibility issues +- **Tree** Performance optimization + +### 🐛 Bug Fixes + +- **Table** Fix page jitter problem +- **Upload** Make sure to carry custom parameters +- **Dropdown** Fix the icon display problem of popConfirm +- **Table** Fix the problem that the editing event of the tree table is abnormal +- **Table** Fix the problem that when the table data is empty, the value returned by getDataSource is not the data source used by the table + +## 2.5.0(2021-06-20) + +## (Breaking changes) Breaking changes + +- Change the project `windicss` to `tailwindcss` to solve the memory overflow problem + - There are currently incompatible areas of the project + - The wording of `!xl:m-4` needs to be changed to `xl:!m-4`, note that only `!` is incompatible. If you don’t use it, you don’t need to change it. + - The new features of `windicss` itself need to be adjusted, for example, `Attribute` mode is not compatible + +### ✨ Refactor + +- Remove `useExpose` and use `expose` provided by the component itself instead + +### ⚡ Performance Improvements + +- **Locale** merge multi-language files to reduce the number of files +- **Utils** Mitt default export is changed from `Class` to `Function` +- **Axios** `isTransformRequestResult` is renamed to `isTransformResponse` + +### ✨ Features + +- **CropperImage** `Cropper` Avatar cropping adds circular cropping function +- **CropperAvatar** Added avatar upload component +- **Drawer** `useDrawer` added `closeDrawer` function +- **Preview** Added `createImgPreview` picture preview function +- **Setup** New guide page example +- **Tests** Add jest test suite, Vue component single test is not currently supported +- **Axios** Added `authenticationScheme` configuration to specify the authentication scheme +- **Setting** Added `sessionTimeoutProcessing` project configuration item, used to configure how to deal with session timeout + +### 🐛 Bug Fixes + +- **Modal** fix full screen height calculation error +- **Modal** Fix the problem that the shutdown event is triggered multiple times +- **PageWrapper** fix the height calculation problem +- **FlowChart** Repair drag and drop menu missing +- Fixed Iframe routing error in background mode +- **PageWrapper** Fix the height calculation problem when footer and global footer are opened at the same time +- **Menu** Fix the jitter problem of menu folding animation +- **Store** fixed type error after pinia version upgrade + ## 2.4.2(2021-06-10) ### ✨ Refactor diff --git a/CHANGELOG.md b/CHANGELOG.md index cc1b6c5d..873027d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,692 @@ +## [2.7.2](https://github.com/anncwb/vue-vben-admin/compare/v2.7.1...v2.7.2) (2021-09-13) + +### Bug Fixes + +- fixed token clear error ([9640484](https://github.com/anncwb/vue-vben-admin/commit/96404848955f84d57b88dd240ab3a57b7017103c)) +- improve type introduction, fix [#1196](https://github.com/anncwb/vue-vben-admin/issues/1196) ([2820d5a](https://github.com/anncwb/vue-vben-admin/commit/2820d5a627260bb8eddfcd25df1cd7d1196932e8)) +- **api-select:** fixed `value` prop define ([f87b0f2](https://github.com/anncwb/vue-vben-admin/commit/f87b0f2f5efe4e9977c4cc0742dbcaefbad2ca02)), closes [#1175](https://github.com/anncwb/vue-vben-admin/issues/1175) +- **card-list:** fixed build error ([628e820](https://github.com/anncwb/vue-vben-admin/commit/628e820684ce5d81f130548505efe83e8d516131)) +- **code-editor:** fixed formatting error ([e7c9636](https://github.com/anncwb/vue-vben-admin/commit/e7c96363a1963b7733a9ee498403eb6a062160e6)) +- **echarts:** theme setting supported ([93812f7](https://github.com/anncwb/vue-vben-admin/commit/93812f734ec85529aa27fc3100a2eaef8c7a6df5)), closes [#1095](https://github.com/anncwb/vue-vben-admin/issues/1095) +- **markdown:** the hierarchy of markDown components after full screen ([c8017b1](https://github.com/anncwb/vue-vben-admin/commit/c8017b1365ea49f95a26148a539f8c30d8a8631f)) +- **markdown:** `value` not worked on init ([0bb9c03](https://github.com/anncwb/vue-vben-admin/commit/0bb9c035f77588c58d36b3fd45d89b9730cd70d7)) +- **modal:** avoid style pollution to the whole world ([#1128](https://github.com/anncwb/vue-vben-admin/issues/1128)) ([6e7f6f8](https://github.com/anncwb/vue-vben-admin/commit/6e7f6f82ed2819e02e2b3114884e665d0762d7e9)) +- **table:** `rowClassName` not worked with `striped` ([044e2e4](https://github.com/anncwb/vue-vben-admin/commit/044e2e4e866dd5b120daab03c47aba1ca1f9140a)), closes [#1167](https://github.com/anncwb/vue-vben-admin/issues/1167) +- **table:** 修复表格背景颜色再深色模式下会被穿透问题 ([#1133](https://github.com/anncwb/vue-vben-admin/issues/1133)) ([30fa4cf](https://github.com/anncwb/vue-vben-admin/commit/30fa4cfa2ab6229efc67224fd082e32da0a95d49)) +- **table:** editable icon not show with empty cell ([edc3096](https://github.com/anncwb/vue-vben-admin/commit/edc30965653831b4572c5d5e067f556f4757ce75)), closes [#1103](https://github.com/anncwb/vue-vben-admin/issues/1103) +- **table:** fix table footer style ([a426b90](https://github.com/anncwb/vue-vben-admin/commit/a426b9027ef524f9033d510d0c74cd17b2ad5bcf)), closes [#1112](https://github.com/anncwb/vue-vben-admin/issues/1112) +- **table:** Solve the bug of setting ifshow to false in table column ([#1166](https://github.com/anncwb/vue-vben-admin/issues/1166)) ([5fa730c](https://github.com/anncwb/vue-vben-admin/commit/5fa730c49ae46fa448d49d597dc7b2b6a019b268)) +- **table-action:** `divider` not work as expected ([7593ef6](https://github.com/anncwb/vue-vben-admin/commit/7593ef6a4f081ed800658b70316ab2f1e3ee631d)) +- **tinymce:** fixed `inline` mode ([8e01377](https://github.com/anncwb/vue-vben-admin/commit/8e01377481a34cda221de6bbb01fc7d5b2824c82)), closes [#1092](https://github.com/anncwb/vue-vben-admin/issues/1092) +- **upload:** `accept` not work as expected ([656ee4e](https://github.com/anncwb/vue-vben-admin/commit/656ee4e5c9b363b6ab59aa071915414e5ee95de4)) +- `getUserinfo` is compatible with empty roles data ([1ddfc31](https://github.com/anncwb/vue-vben-admin/commit/1ddfc31c3c4c792c5f741f6d0f0754ffc9a6613c)) +- `slots` worked in `basicTable` and `basicModal` ([5138e44](https://github.com/anncwb/vue-vben-admin/commit/5138e447e74ef01309457d22f44129c8b1b2f815)) +- `useRedo` called duplicate may cause exception ([1235978](https://github.com/anncwb/vue-vben-admin/commit/1235978ab23740dfb11e3de7ac26a7d10a4899dc)), closes [#1121](https://github.com/anncwb/vue-vben-admin/issues/1121) +- 修复 `apiSelect` 绑定值 `attrs` 的问题 ([#1172](https://github.com/anncwb/vue-vben-admin/issues/1172)) ([c753d94](https://github.com/anncwb/vue-vben-admin/commit/c753d945e08f72cab5bc8a585601cab6a0523fca)) +- 修复弹窗全屏按钮异常关闭的问题([#1177](https://github.com/anncwb/vue-vben-admin/issues/1177)) ([#1182](https://github.com/anncwb/vue-vben-admin/issues/1182)) ([9e9ea3f](https://github.com/anncwb/vue-vben-admin/commit/9e9ea3f43d8c4b88649c1998bf89186b5f7ee6a2)) +- 修改 axios 中 urlPrefix 字段不生效问题 ([#1170](https://github.com/anncwb/vue-vben-admin/issues/1170)) ([7df9b51](https://github.com/anncwb/vue-vben-admin/commit/7df9b513447d8deab2fd8e86fa23c807adb6d440)) +- add loss action for userStore ([a36825a](https://github.com/anncwb/vue-vben-admin/commit/a36825a6d423aae9aaf1936ce55947ba8c2104b0)) +- fix all types of errors, compatible with volar plugin ([e15b4f1](https://github.com/anncwb/vue-vben-admin/commit/e15b4f14db51812effd55670b3d2da7b082e00a7)) +- fixed build warning for style of `intro.js` ([d27633f](https://github.com/anncwb/vue-vben-admin/commit/d27633fb31824e92cbeb24f8d626d8e33ce7179e)), closes [#1130](https://github.com/anncwb/vue-vben-admin/issues/1130) +- Improve content height calculation ([#1136](https://github.com/anncwb/vue-vben-admin/issues/1136)) ([6717fe6](https://github.com/anncwb/vue-vben-admin/commit/6717fe654e88e6a939a16c523832870388ec1886)) +- name of vite `mode` support more characters ([9f68229](https://github.com/anncwb/vue-vben-admin/commit/9f6822991c4b2da78e0a5d0c7d6e0288f0d9d1cb)), closes [#1115](https://github.com/anncwb/vue-vben-admin/issues/1115) +- refresh failed while token invalid ([3a5d1a5](https://github.com/anncwb/vue-vben-admin/commit/3a5d1a5757c0a2be17e6dd370cbb023ddbb30d5e)), closes [#1101](https://github.com/anncwb/vue-vben-admin/issues/1101) +- warning in logout action ([b3307fe](https://github.com/anncwb/vue-vben-admin/commit/b3307fe2836fb6f9806d602d5bdb7e540c49f1b0)) +- **tinymce:** fixed `tinymce` destory method ([fb43fad](https://github.com/anncwb/vue-vben-admin/commit/fb43fad555b093af23194bdb3670bc1347c0010f)) + +### Features + +- **demo:** add `JsonPreview` demo ([83c1683](https://github.com/anncwb/vue-vben-admin/commit/83c1683bfdcf4ea33de771895b46e41f276969e8)), closes [#1146](https://github.com/anncwb/vue-vben-admin/issues/1146) +- **form:** add `Divider` for schema component type ([47a448b](https://github.com/anncwb/vue-vben-admin/commit/47a448b8aea572e54dac97dc4f9fb6c1c005685a)) +- **form:** component `Divider` support `helpMessage` ([a5ff592](https://github.com/anncwb/vue-vben-admin/commit/a5ff59237f2eb6ea4c1770acc594c75bf1f6e95f)) +- **markdown-viewer:** add new component ([73dc492](https://github.com/anncwb/vue-vben-admin/commit/73dc492b2a49793d945ccdae7f5c429c874f298c)), closes [#1181](https://github.com/anncwb/vue-vben-admin/issues/1181) +- **table:** 添加和支持动态删除和插入数据 ([#1152](https://github.com/anncwb/vue-vben-admin/issues/1152)) ([59a9087](https://github.com/anncwb/vue-vben-admin/commit/59a90877287a289f746eec97d12c2d3a1d5476b0)) +- **table:** add `beforeEditSubmit` for editable cell ([2c867b3](https://github.com/anncwb/vue-vben-admin/commit/2c867b3d636d57cdc526a4ca600af7d747b7d833)) +- **table:** add `onValid` for editRow ([ee7c31d](https://github.com/anncwb/vue-vben-admin/commit/ee7c31db44fd8f99f0d26da368e1d82b5630f309)) +- **tree:** 1. 添加自定义数据过滤判断方法 2. 添加搜索完成自动展开结果选项 3. 添加搜索完成自动选中结果选项 4. 树节点数据变化时强制搜索(同步 searchData 避免展示错误) ([#1132](https://github.com/anncwb/vue-vben-admin/issues/1132)) ([e00578c](https://github.com/anncwb/vue-vben-admin/commit/e00578c40a585a4a35f235c0228aebaf62cea1ba)) +- add CardList component ([0f5ddbf](https://github.com/anncwb/vue-vben-admin/commit/0f5ddbf1ec777fc238a94bd037d37ea787316757)) + +### Performance Improvements + +- **tree:** 优化 Tree 搜索功能,添加搜索高亮功能,优化样式表现 ([#1153](https://github.com/anncwb/vue-vben-admin/issues/1153)) ([3b6b4f7](https://github.com/anncwb/vue-vben-admin/commit/3b6b4f73033e8757fd3a032f0910dfcc30dee151)) +- not waiting for router.isReady ([2884e86](https://github.com/anncwb/vue-vben-admin/commit/2884e863ce826cd92cd782f40cdee31588bc6d32)) +- optimize css volume ([466d4ed](https://github.com/anncwb/vue-vben-admin/commit/466d4edcd02fc91e2b4cdbbc3c501bfd2fde7a3d)) + +## [2.7.1](https://github.com/anncwb/vue-vben-admin/compare/v2.6.1...v2.7.1) (2021-08-16) + +### Bug Fixes + +- `slots` working in components ([b1f3176](https://github.com/anncwb/vue-vben-admin/commit/b1f31762e3c86a432a8d559ab957444eaf5525ad)) +- add axios error info from response ([#1083](https://github.com/anncwb/vue-vben-admin/issues/1083)) ([72634ff](https://github.com/anncwb/vue-vben-admin/commit/72634ffe6e6649d36ee41f7633c8ee2ab80cf25e)) +- auto remove script dom in `useScript` ([a544dd3](https://github.com/anncwb/vue-vben-admin/commit/a544dd3e589329339177dad3d5c1f75dd6e6f0ca)) +- fixed `useRedo` may loss route params ([2dd3d85](https://github.com/anncwb/vue-vben-admin/commit/2dd3d8544866231895d23dba63785b683ae0062e)), closes [#1079](https://github.com/anncwb/vue-vben-admin/issues/1079) +- fixed basicButton ghost style ([3ba8a67](https://github.com/anncwb/vue-vben-admin/commit/3ba8a67647d35fb9639a5af66f33d43eff493d15)) +- fixed basicButton primary style ([1b57792](https://github.com/anncwb/vue-vben-admin/commit/1b577922e752c02fe7c033c53be37ef81e4e9b8e)) +- fixed basicButton style ([beb4ae9](https://github.com/anncwb/vue-vben-admin/commit/beb4ae92c190780bbd3bc6bc7547d52e2ccf8cf1)) +- **cropper:** cropper not destroy in time ([3819430](https://github.com/anncwb/vue-vben-admin/commit/381943078fd55123fde3d5555e04f279d7f1c407)), closes [#1027](https://github.com/anncwb/vue-vben-admin/issues/1027) +- **demo:** fix form style in modal ([30c5fc6](https://github.com/anncwb/vue-vben-admin/commit/30c5fc63c8600cfb03f917d79e56c0a7e7ff64e0)), closes [#1076](https://github.com/anncwb/vue-vben-admin/issues/1076) +- **i18n:** add i18n translate data ([1f55c41](https://github.com/anncwb/vue-vben-admin/commit/1f55c4180f9c0cf48e3796a77d6f0bfd46107272)) +- **locales:** fix that vscode extension i18n-Ally detect zh-CN as zh ([#1044](https://github.com/anncwb/vue-vben-admin/issues/1044)) ([b2d49cb](https://github.com/anncwb/vue-vben-admin/commit/b2d49cbbf81cb15e75905deb95bdf7ac4af4e599)) +- **modal:** `helpMessage` doesn't work ([953bfc6](https://github.com/anncwb/vue-vben-admin/commit/953bfc6f1a559309ea2b1114b8ede911a3751cc7)) +- **page-wrapper:** fix `class` not working ([8879ae8](https://github.com/anncwb/vue-vben-admin/commit/8879ae8d773e8dc4c252c4234eefeab9bc135a30)) +- **qrcode:** qrcode not displayed properly ([26f251e](https://github.com/anncwb/vue-vben-admin/commit/26f251e1ed5bfd79c8615fb552ca302f917cc588)), closes [#1026](https://github.com/anncwb/vue-vben-admin/issues/1026) +- **route:** the whitelist should include basicRoutes ([#1048](https://github.com/anncwb/vue-vben-admin/issues/1048)) ([1bb5156](https://github.com/anncwb/vue-vben-admin/commit/1bb51569236fd9bcc55dd9f237f51f218956b258)) +- **table:** `0` is not shown in editable cell ([33a335a](https://github.com/anncwb/vue-vben-admin/commit/33a335a3f52aead522b3fbee0d558e2e797580ff)), closes [#1039](https://github.com/anncwb/vue-vben-admin/issues/1039) +- **table:** `cellFormat` support `Map` ([1214b7c](https://github.com/anncwb/vue-vben-admin/commit/1214b7c32c425750a4d0202a9b235eb9e45a6f47)), closes [#1031](https://github.com/anncwb/vue-vben-admin/issues/1031) +- **table:** `getSelectRows` support multi-page ([4b6025c](https://github.com/anncwb/vue-vben-admin/commit/4b6025cb9a3ef067680201ec3052bc651e0a0c1b)), closes [#914](https://github.com/anncwb/vue-vben-admin/issues/914) +- **table:** `selection-change` not triggered in unchecking ([019555b](https://github.com/anncwb/vue-vben-admin/commit/019555be0c88edc673cae382023d647e78959b30)), closes [#1053](https://github.com/anncwb/vue-vben-admin/issues/1053) +- **table:** `size` not worked in `editComponentProps` ([7971896](https://github.com/anncwb/vue-vben-admin/commit/7971896383296c155b7ab16b5beb3544f34ee525)), closes [#1074](https://github.com/anncwb/vue-vben-admin/issues/1074) +- **table:** fix `getSelectRows` for treeTable ([f2b8bb4](https://github.com/anncwb/vue-vben-admin/commit/f2b8bb43a0b9172b9ef9ced8e83bf91143a091d9)), closes [#1003](https://github.com/anncwb/vue-vben-admin/issues/1003) +- **table:** fix `injection not found` warning ([53e79a2](https://github.com/anncwb/vue-vben-admin/commit/53e79a2d94df19c0e1aa7399d5ce4c27834e0350)) +- **types:** fix some type errors ([9035fd1](https://github.com/anncwb/vue-vben-admin/commit/9035fd191e4e8d954f42b3a4cd1e80ec70b7cbb6)) +- The Style of tableTitle slot ([#1023](https://github.com/anncwb/vue-vben-admin/issues/1023)) ([02e7756](https://github.com/anncwb/vue-vben-admin/commit/02e77560624cc4a95a5a20ffd5e0601f1f88c6f4)) +- fix build handler & misc ([#1060](https://github.com/anncwb/vue-vben-admin/issues/1060)) ([66feb77](https://github.com/anncwb/vue-vben-admin/commit/66feb779a8645a93760c784c510512118c4c6efa)) +- **table:** recursive updateTableDataRecord ([#1024](https://github.com/anncwb/vue-vben-admin/issues/1024)) ([72f953c](https://github.com/anncwb/vue-vben-admin/commit/72f953c8d3413a7f5482793258503017a81cc759)) +- **table:** wrong bg-color in fullscreen mode ([2052eb5](https://github.com/anncwb/vue-vben-admin/commit/2052eb5a65be38c44165efecdb15266de4638667)) +- **type:** fix ant-design-vue -> ([#1043](https://github.com/anncwb/vue-vben-admin/issues/1043)) ([6d5388a](https://github.com/anncwb/vue-vben-admin/commit/6d5388aaf143ac76bac0b68d56a3ab6b5993e807)) +- fix iframe heigth error ([#1012](https://github.com/anncwb/vue-vben-admin/issues/1012)) ([d76cfd7](https://github.com/anncwb/vue-vben-admin/commit/d76cfd7f809ba48880c950a64cb43a5c9c44176c)) +- Fix the invalid hot update of BasicButton when changing style outside ([#1016](https://github.com/anncwb/vue-vben-admin/issues/1016)) ([be2d11d](https://github.com/anncwb/vue-vben-admin/commit/be2d11d5d344a508e94abe3534726c80e1f1f271)) +- the position of tinymce upload image is wrong ([#1015](https://github.com/anncwb/vue-vben-admin/issues/1015)) ([2fd0fd2](https://github.com/anncwb/vue-vben-admin/commit/2fd0fd281e65d6d2551478c5f19250347dc14062)) +- **tree:** fix `checkAll` effects `disabled` node ([ddd1893](https://github.com/anncwb/vue-vben-admin/commit/ddd1893b113e13786037522341abb2e75f8f9d5b)) +- style property of actionColOpt is invalid ([#997](https://github.com/anncwb/vue-vben-admin/issues/997)) ([225bd4c](https://github.com/anncwb/vue-vben-admin/commit/225bd4c39de377d93c605f33bfdf3d8fd565f12b)) +- typo ([#980](https://github.com/anncwb/vue-vben-admin/issues/980)) ([7e6a89f](https://github.com/anncwb/vue-vben-admin/commit/7e6a89ffeb8c63467908d5807d3d7c4761620ee3)) +- **api-tree-select:** auto reload while `params` changed ([c734f68](https://github.com/anncwb/vue-vben-admin/commit/c734f6858daea6d11cd517463b06fcce58744947)) +- **dark-theme:** alert color in dark-theme ([9b7ede0](https://github.com/anncwb/vue-vben-admin/commit/9b7ede09b9efe4d5a15ab0cdeadac480a29c0f62)) +- **dark-theme:** bgcolor of `selected tree node` in dark theme ([8cf004a](https://github.com/anncwb/vue-vben-admin/commit/8cf004a5f59895e2487c3a350c83000e585b897e)), closes [#949](https://github.com/anncwb/vue-vben-admin/issues/949) +- **dark-theme:** disabled link `button` color ([4281216](https://github.com/anncwb/vue-vben-admin/commit/42812162c46832ce4d3e332bd579c042309115bc)) +- **dark-theme:** fixed `TreeSelect` & `DatePicker` theme ([d1e0e8b](https://github.com/anncwb/vue-vben-admin/commit/d1e0e8bcea1c168631222989969e14f7d0d1b6a4)), closes [#955](https://github.com/anncwb/vue-vben-admin/issues/955) +- **dark-theme:** style for checked tree nodes ([662b576](https://github.com/anncwb/vue-vben-admin/commit/662b576ac2088247cb58e295378f228462508a37)) +- **demo:** account page form validation ([8702965](https://github.com/anncwb/vue-vben-admin/commit/87029650570e470431fb94d35a273c5d07a73135)) +- **demo:** fix roles mock data ([c375e32](https://github.com/anncwb/vue-vben-admin/commit/c375e32305eae5128e09ad1bda39ce0cc6afd790)) +- **form:** remove console error for `setFieldsValue` ([8d185bb](https://github.com/anncwb/vue-vben-admin/commit/8d185bb5841c83eb49c78e8342e65067aa6f9b80)), closes [#952](https://github.com/anncwb/vue-vben-admin/issues/952) +- **table:** fix `pagination` props working ([e327893](https://github.com/anncwb/vue-vben-admin/commit/e32789373eb5b1b531572b59692bf552dac365dc)) +- expandIcon slot of BasicTable component is invalid ([#975](https://github.com/anncwb/vue-vben-admin/issues/975)) ([98c206d](https://github.com/anncwb/vue-vben-admin/commit/98c206d9c9661a18dde4ec7782cbe1eb6e62ebeb)) +- **demo:** menu `error-log` link to 404 page ([341bd63](https://github.com/anncwb/vue-vben-admin/commit/341bd633d8ed38a5a357db8f97166c2eba2895d3)) +- **demo:** multi-modal used with dynamic component ([e1c4723](https://github.com/anncwb/vue-vben-admin/commit/e1c47233edf7675aede6d5f023726945a510ddf7)) +- **echarts:** fix graphic config cannot be used in echarts options ([#959](https://github.com/anncwb/vue-vben-admin/issues/959)) ([525484e](https://github.com/anncwb/vue-vben-admin/commit/525484e7a409b032d22231f90a92e700ef4290ae)) +- **form:** fix `validate` promise catch ([571f281](https://github.com/anncwb/vue-vben-admin/commit/571f28138f782553eb39cda2d632e5ac1aa1e145)) +- **img-rotate-drag-verify:** fix `resume` method support ([32d64db](https://github.com/anncwb/vue-vben-admin/commit/32d64dbe816a0afda6ee9e91863199afb3e7b48e)), closes [#946](https://github.com/anncwb/vue-vben-admin/issues/946) +- **login:** fix `auto fill` style in dark-theme ([cebc6a5](https://github.com/anncwb/vue-vben-admin/commit/cebc6a590e1a19af7380a55aed43b23af274df0a)) +- **perm-guard:** Fix the problem that the routing query is lost after refreshing the page ([#941](https://github.com/anncwb/vue-vben-admin/issues/941)) ([9c4889f](https://github.com/anncwb/vue-vben-admin/commit/9c4889f0859bc60decf0ef40c383c1946de1d68a)) +- **qrcode:** Fix the problem that the QR code cannot be dynamically generated ([#974](https://github.com/anncwb/vue-vben-admin/issues/974)) ([fe4eae3](https://github.com/anncwb/vue-vben-admin/commit/fe4eae37146068f01ba08f033e0c2e8bd03e48b5)) +- **style:** fix checkbox-checked css in dark mode ([d3f08e3](https://github.com/anncwb/vue-vben-admin/commit/d3f08e37c5b6e46f33d525e9ef4b4c235d77a192)) +- **table:** component shown in `fullscreen` mode ([a07ab6d](https://github.com/anncwb/vue-vben-admin/commit/a07ab6d7aa1060f856649a9bdbec9dfa50b14f26)) +- **table:** editable cell display with validation ([202aa42](https://github.com/anncwb/vue-vben-admin/commit/202aa42b8d5a94e84ad386bcf7feab96926c70dd)), closes [#953](https://github.com/anncwb/vue-vben-admin/issues/953) +- **table:** fix `dataPicker` show in `fullscreen` mode ([a5a9b3f](https://github.com/anncwb/vue-vben-admin/commit/a5a9b3fb34c64b6ea9c9ab3d58045f6e5963952b)) +- **table:** fix expand style ([14fb21d](https://github.com/anncwb/vue-vben-admin/commit/14fb21d0b7b9ac69c7b3c463de6d709bd5713d14)), closes [#969](https://github.com/anncwb/vue-vben-admin/issues/969) +- **table:** fix tableSettings popup in fullscreen mode ([dce3fb0](https://github.com/anncwb/vue-vben-admin/commit/dce3fb0f20516aaf4817281f5d08109e53a73ecb)) +- **table-action:** stopButtonPropagation not working ([9b8f165](https://github.com/anncwb/vue-vben-admin/commit/9b8f165a365758d001e6d86ae7afe4ae3316d485)) +- Fix vite profile hot update error reporting ([#968](https://github.com/anncwb/vue-vben-admin/issues/968)) ([956ed2e](https://github.com/anncwb/vue-vben-admin/commit/956ed2e3f770cc9cf822ce80f71b1e7f179792fb)) +- **utils:** The date function gets a non-date when the parameter is null ([#954](https://github.com/anncwb/vue-vben-admin/issues/954)) ([350c85a](https://github.com/anncwb/vue-vben-admin/commit/350c85accf5033cc5a21b71bc36d5b7a74eb2573)) +- fixed moment locale config ([27207a7](https://github.com/anncwb/vue-vben-admin/commit/27207a78caccb04372e0275c5cee526ec460de0e)) +- typo for utils/env ([#1004](https://github.com/anncwb/vue-vben-admin/issues/1004)) ([e8eefd1](https://github.com/anncwb/vue-vben-admin/commit/e8eefd1bca41c181ec6395bf1d087d2018e2b1f1)) +- **table:** fix editable cell not support `ellipsis` ([4bb506f](https://github.com/anncwb/vue-vben-admin/commit/4bb506fb1f6ac7d246f8792d29f337ec003ff426)), closes [#944](https://github.com/anncwb/vue-vben-admin/issues/944) + +### Features + +- add `updatePath` for `useTabs` ([bcfa338](https://github.com/anncwb/vue-vben-admin/commit/bcfa33822736b761757a2673d977f752cb5c4f7c)), closes [#1068](https://github.com/anncwb/vue-vben-admin/issues/1068) +- always refresh userinfo when page reload ([cc46935](https://github.com/anncwb/vue-vben-admin/commit/cc46935a8296dae62ecfc753a956338ba433927e)) +- **demo:** add `async-validator` demo ([8b4b767](https://github.com/anncwb/vue-vben-admin/commit/8b4b767f4ca78f7c6f7586d8ba662552c2b7bb51)) +- **form:** add `alwaysShowLines` prop ([93f9a19](https://github.com/anncwb/vue-vben-admin/commit/93f9a19aa16a3e9cb95338417c52d9a398e3f70b)), closes [#1051](https://github.com/anncwb/vue-vben-admin/issues/1051) +- **preview:** add more features ([e23bd26](https://github.com/anncwb/vue-vben-admin/commit/e23bd2696da945291a9b652f1af39ad1936f376b)) +- **table:** add getRawDataSource() function ([#1029](https://github.com/anncwb/vue-vben-admin/issues/1029)) ([f3cf162](https://github.com/anncwb/vue-vben-admin/commit/f3cf162af1fa5634d4e562fa5239939af6f26093)) +- **tree:** add searchable function ([60577d6](https://github.com/anncwb/vue-vben-admin/commit/60577d6720fd3f8d4d1a88b20ab902d6161a0eec)), closes [#1057](https://github.com/anncwb/vue-vben-admin/issues/1057) +- **use-loading:** add `setTip` method ([26d9476](https://github.com/anncwb/vue-vben-admin/commit/26d9476caff41cc355190604af42e0bd2ef0a353)) +- Added support for tailwindcss night mode mechanism ([#998](https://github.com/anncwb/vue-vben-admin/issues/998)) ([189bc6f](https://github.com/anncwb/vue-vben-admin/commit/189bc6feb3f2860be8c531dd1ca996f3a2cff018)) + +### Performance Improvements + +- **table:** fixed code style ([da12da9](https://github.com/anncwb/vue-vben-admin/commit/da12da9d8caeba0e7732551cfbad9b0da3baaac4)), closes [#1070](https://github.com/anncwb/vue-vben-admin/issues/1070) +- improve legacy compatibility ([e2664f6](https://github.com/anncwb/vue-vben-admin/commit/e2664f60029f03642f8b1a6afa9b1998705fce37)) + +# [2.7.0](https://github.com/anncwb/vue-vben-admin/compare/v2.5.9...v2.7.0) (2021-08-03) + +### Bug Fixes + +- The Style of tableTitle slot ([#1023](https://github.com/anncwb/vue-vben-admin/issues/1023)) ([02e7756](https://github.com/anncwb/vue-vben-admin/commit/02e77560624cc4a95a5a20ffd5e0601f1f88c6f4)) +- **api-select:** ensure that the onchange function parameters are correct ([fa64fc8](https://github.com/anncwb/vue-vben-admin/commit/fa64fc8a622832b87fdf672965d55d543b5929a2)) +- **app-search:** exclude hidden items ([faf5c9f](https://github.com/anncwb/vue-vben-admin/commit/faf5c9fd7ea40c407419a5a5c473f9b0c32c2a53)) +- **app-search:** exclude items by `hideChildrenInMenu` ([02d3dca](https://github.com/anncwb/vue-vben-admin/commit/02d3dca57efedc1322ae38e3f432cf1f6c2cf839)) +- **axios:** option `withToken` not work ([d509e89](https://github.com/anncwb/vue-vben-admin/commit/d509e897be5753c852e912112e70dac6247ba467)) +- **breadcrumb:** `redirect` not worked ([f5e31fe](https://github.com/anncwb/vue-vben-admin/commit/f5e31febbd18372a34166cac390b1d9b914fe80e)) +- **comp-tree:** support comp-tree-foreach stop,add insertNodesByKey ([#818](https://github.com/anncwb/vue-vben-admin/issues/818)) ([d97aa92](https://github.com/anncwb/vue-vben-admin/commit/d97aa927417bf45a7c127ecfa9b8e835b6b68855)) +- **CountTo:** Fix displaying empty string when the value is 0 ([#864](https://github.com/anncwb/vue-vben-admin/issues/864)) ([82eb72b](https://github.com/anncwb/vue-vben-admin/commit/82eb72bbced931ba7f50069211f9511035ad09f4)) +- **demo:** `setup` page route config ([d5d5c4b](https://github.com/anncwb/vue-vben-admin/commit/d5d5c4b4bfb3e3a5e54f9993966adc46a09a8b90)) +- **demo:** account list fetch loss param ([424b171](https://github.com/anncwb/vue-vben-admin/commit/424b171e0db727f5e0157cbcfd5460f15f8ea609)), closes [#830](https://github.com/anncwb/vue-vben-admin/issues/830) +- **demo:** add mock data `account detail` route ([993e19d](https://github.com/anncwb/vue-vben-admin/commit/993e19dcc319e2b4c68df2ab76174b7b4d7b0428)), closes [#858](https://github.com/anncwb/vue-vben-admin/issues/858) +- **demo:** fix async tree demo, fixed: [#823](https://github.com/anncwb/vue-vben-admin/issues/823) ([5637588](https://github.com/anncwb/vue-vben-admin/commit/5637588fce880b01137191cc82c73e0fce621e8c)) +- **demo:** form pages support `keepAlive` ([9228282](https://github.com/anncwb/vue-vben-admin/commit/9228282ae27daaa246f42e441e27b1b05eb30464)) +- **demo:** resolve `key not exist` warnings ([45a94e4](https://github.com/anncwb/vue-vben-admin/commit/45a94e41c1397b84d08373f84f766204d2488714)) +- **demo:** style error,fix [#806](https://github.com/anncwb/vue-vben-admin/issues/806) ([a2d8be3](https://github.com/anncwb/vue-vben-admin/commit/a2d8be3ab29da88126f3ba971f6893cb12327759)) +- **demo-form:** add fieldMapToTime example,fix [#807](https://github.com/anncwb/vue-vben-admin/issues/807) ([a2a75a0](https://github.com/anncwb/vue-vben-admin/commit/a2a75a097ff6c9df12471eff0d62d44d2b88cfff)) +- **design:** correct tailwind configuration,fix [#800](https://github.com/anncwb/vue-vben-admin/issues/800) ([aec230c](https://github.com/anncwb/vue-vben-admin/commit/aec230ca19d541079b64c54ba00596ef9cd92ca0)) +- **drawer:** openDrawer is not normal in some cases ([941ad59](https://github.com/anncwb/vue-vben-admin/commit/941ad59759cbd5a5e39bcdf29783d8eea85caf72)) +- **dropdown:** icon and trigger work unexpected ([60b80c9](https://github.com/anncwb/vue-vben-admin/commit/60b80c96e82da9101d56b2e195e9e7571de11f0a)), closes [#796](https://github.com/anncwb/vue-vben-admin/issues/796) [#787](https://github.com/anncwb/vue-vben-admin/issues/787) +- **form:** fix `suffix` slot style ([a9bbed1](https://github.com/anncwb/vue-vben-admin/commit/a9bbed19739376ab2bf67a14b04e872f14ca84cc)) +- **form:** fix some prop declaration ([b5046f0](https://github.com/anncwb/vue-vben-admin/commit/b5046f07a27e8ca7fc8b961b74fa5e1b0d715149)) +- **lock-screen:** ensure lock info is saved ([d38ff66](https://github.com/anncwb/vue-vben-admin/commit/d38ff6670a37478b31447f8058e786c4b044e218)) +- **lock-screen:** fix lock-screen can skip on new window ([d7b84c7](https://github.com/anncwb/vue-vben-admin/commit/d7b84c78744f7d0077a779b232e1358040b50383)) +- **markdown:** resolving markdown exceptions ([d95815b](https://github.com/anncwb/vue-vben-admin/commit/d95815b5031984e224140eb1b1d46e2dbf80abc1)) +- **markdown:** set `value` error ([35e1347](https://github.com/anncwb/vue-vben-admin/commit/35e1347029e29a83a9648b6b398e6863cc40fca9)) +- **menu:** display error when contains hidden items ([5ceeefd](https://github.com/anncwb/vue-vben-admin/commit/5ceeefd17d9ddc0e8844b900069b100f24d9c00e)) +- **menu:** fix mix-menu incorrect jumping in `hover` mode ([cad021c](https://github.com/anncwb/vue-vben-admin/commit/cad021c34b71fa109640af75a0c2b72179e9e257)) +- **menu:** make sure the menu is activated correctly ([cdb10cc](https://github.com/anncwb/vue-vben-admin/commit/cdb10cc4ac5e5e8f9cce3ff18d8fbd29ef10c86f)) +- **mix-sider:** fix mix-sider hover logic ([0595a72](https://github.com/anncwb/vue-vben-admin/commit/0595a72da9c666af81a0916663e8e6a014e6fa69)) +- **modal:** `setModalProps` support `defaultFullscreen` ([c7de65e](https://github.com/anncwb/vue-vben-admin/commit/c7de65ebba53941771153f18b184d3d4d31c0dbf)) +- **modal:** maskClosable not work ([f750ff4](https://github.com/anncwb/vue-vben-admin/commit/f750ff435fee06acee78d6b9633e6e18d91685f8)) +- **modal:** remove console log ([3dbbde2](https://github.com/anncwb/vue-vben-admin/commit/3dbbde2662352780377a9b216598d9348522f6ba)) +- **pop-confirm:** fix event working unexpected ([a6ef771](https://github.com/anncwb/vue-vben-admin/commit/a6ef771fcce14c3644c965afaa69b3a17d0a7087)) +- **popconfirm-button:** remove button excess `title` ([73654b7](https://github.com/anncwb/vue-vben-admin/commit/73654b7862c59d623d6d5dc7dcf6ff2704564d9a)) +- **sider:** bottom trigger not work ([1bde404](https://github.com/anncwb/vue-vben-admin/commit/1bde4041211229d5d9d01ce0ca806fa99356b6de)), closes [#820](https://github.com/anncwb/vue-vben-admin/issues/820) +- **sider:** custom trigger does not take effect ([5005e6e](https://github.com/anncwb/vue-vben-admin/commit/5005e6e56b1cc7763a1cc23e1162dfb49452013b)) +- **svg-icon:** fix SvgIcon style ([99829c7](https://github.com/anncwb/vue-vben-admin/commit/99829c79ab41a2319f40c5595a7d82d9e406ba18)) +- **table:** fix index column style ([c7c0a7e](https://github.com/anncwb/vue-vben-admin/commit/c7c0a7e4c88a895000b1621981e4d4b2020c64b1)) +- **table:** auto hide unnecessary scrollbar ([735028c](https://github.com/anncwb/vue-vben-admin/commit/735028c43055e8e80ebc7344af0cd0f51c744f98)) +- **table:** editComponentProps support onChange ([829b366](https://github.com/anncwb/vue-vben-admin/commit/829b366cb2abf27e69d9665e5be022b3d3f15655)) +- **table:** event editCancel loss params ([8d22231](https://github.com/anncwb/vue-vben-admin/commit/8d22231a5fa4afed19201a4a4e5c29d674498516)) +- **table:** fix rowSelection.onChange not work ([df0f000](https://github.com/anncwb/vue-vben-admin/commit/df0f00085c1113eddd7a15954818ccece3538068)), closes [#825](https://github.com/anncwb/vue-vben-admin/issues/825) +- **table:** fix table jitter problem ([8eba7fb](https://github.com/anncwb/vue-vben-admin/commit/8eba7fb52786d1977e4cb7b67673d74c91c5c827)) +- **table:** fix tree node align ([1e61da6](https://github.com/anncwb/vue-vben-admin/commit/1e61da644f65a79ce10fde98ee017aba7d36be10)), closes [#829](https://github.com/anncwb/vue-vben-admin/issues/829) +- **table:** getDataSource not worked on empty data ([e78af6f](https://github.com/anncwb/vue-vben-admin/commit/e78af6f228e25f052dc4c5a1859a6db50e0b112e)), closes [#752](https://github.com/anncwb/vue-vben-admin/issues/752) +- **table:** global configuration accidentally modified ([b4a3f93](https://github.com/anncwb/vue-vben-admin/commit/b4a3f936cd19bf1fff3a331bacad60e79d2d6c22)) +- **table:** param of `handleSearchInfoFn` ([791b323](https://github.com/anncwb/vue-vben-admin/commit/791b323dbd30acd7fabfe9c3fb6e528916311ffd)) +- **table:** recursive updateTableDataRecord ([#1024](https://github.com/anncwb/vue-vben-admin/issues/1024)) ([72f953c](https://github.com/anncwb/vue-vben-admin/commit/72f953c8d3413a7f5482793258503017a81cc759)) +- auto remove script dom in `useScript` ([a544dd3](https://github.com/anncwb/vue-vben-admin/commit/a544dd3e589329339177dad3d5c1f75dd6e6f0ca)) +- fix iframe heigth error ([#1012](https://github.com/anncwb/vue-vben-admin/issues/1012)) ([d76cfd7](https://github.com/anncwb/vue-vben-admin/commit/d76cfd7f809ba48880c950a64cb43a5c9c44176c)) +- Fix the invalid hot update of BasicButton when changing style outside ([#1016](https://github.com/anncwb/vue-vben-admin/issues/1016)) ([be2d11d](https://github.com/anncwb/vue-vben-admin/commit/be2d11d5d344a508e94abe3534726c80e1f1f271)) +- style property of actionColOpt is invalid ([#997](https://github.com/anncwb/vue-vben-admin/issues/997)) ([225bd4c](https://github.com/anncwb/vue-vben-admin/commit/225bd4c39de377d93c605f33bfdf3d8fd565f12b)) +- the position of tinymce upload image is wrong ([#1015](https://github.com/anncwb/vue-vben-admin/issues/1015)) ([2fd0fd2](https://github.com/anncwb/vue-vben-admin/commit/2fd0fd281e65d6d2551478c5f19250347dc14062)) +- **api-select:** fix `options-change` event data ([897bed9](https://github.com/anncwb/vue-vben-admin/commit/897bed97295a0b9101d33102340749689a4368de)) +- **api-tree-select:** auto load data if necessary ([1b3058f](https://github.com/anncwb/vue-vben-admin/commit/1b3058f8253effe974feaf08a12250a111ab58c0)) +- **api-tree-select:** auto reload while `params` changed ([c734f68](https://github.com/anncwb/vue-vben-admin/commit/c734f6858daea6d11cd517463b06fcce58744947)) +- **api-tree-select:** fix `event` checked in form ([d9d0071](https://github.com/anncwb/vue-vben-admin/commit/d9d00714011fa7914c61f990ce1159351ee21a1a)) +- **basic-tree:** `checkedKeys` not worked with `search` ([b06a7ab](https://github.com/anncwb/vue-vben-admin/commit/b06a7ab77b99abee63dd55770ffd55b594ee42f9)), closes [#915](https://github.com/anncwb/vue-vben-admin/issues/915) +- **code-editor:** `value` not support use as `v-model` ([8832a07](https://github.com/anncwb/vue-vben-admin/commit/8832a074dceb44f057c87289d3a99feef58c08fd)), closes [#933](https://github.com/anncwb/vue-vben-admin/issues/933) +- **countdown-input:** add `slots` support ([a764a95](https://github.com/anncwb/vue-vben-admin/commit/a764a95ae9a6cff831f75aa97b00724cadc48e92)) +- **dark-theme:** alert color in dark-theme ([9b7ede0](https://github.com/anncwb/vue-vben-admin/commit/9b7ede09b9efe4d5a15ab0cdeadac480a29c0f62)) +- **dark-theme:** bgcolor of `selected tree node` in dark theme ([8cf004a](https://github.com/anncwb/vue-vben-admin/commit/8cf004a5f59895e2487c3a350c83000e585b897e)), closes [#949](https://github.com/anncwb/vue-vben-admin/issues/949) +- **dark-theme:** disabled link `button` color ([4281216](https://github.com/anncwb/vue-vben-admin/commit/42812162c46832ce4d3e332bd579c042309115bc)) +- **dark-theme:** fixed `TreeSelect` & `DatePicker` theme ([d1e0e8b](https://github.com/anncwb/vue-vben-admin/commit/d1e0e8bcea1c168631222989969e14f7d0d1b6a4)), closes [#955](https://github.com/anncwb/vue-vben-admin/issues/955) +- **dark-theme:** style for checked tree nodes ([662b576](https://github.com/anncwb/vue-vben-admin/commit/662b576ac2088247cb58e295378f228462508a37)) +- **demo:** account page form validation ([8702965](https://github.com/anncwb/vue-vben-admin/commit/87029650570e470431fb94d35a273c5d07a73135)) +- **demo:** fix display problem of editable table with `apiSelect` ([535bddd](https://github.com/anncwb/vue-vben-admin/commit/535bdddf91785e20295c18cf80c8a22cc2172681)) +- **demo:** fix roles mock data ([c375e32](https://github.com/anncwb/vue-vben-admin/commit/c375e32305eae5128e09ad1bda39ce0cc6afd790)) +- **demo:** menu `error-log` link to 404 page ([341bd63](https://github.com/anncwb/vue-vben-admin/commit/341bd633d8ed38a5a357db8f97166c2eba2895d3)) +- **demo:** multi-modal used with dynamic component ([e1c4723](https://github.com/anncwb/vue-vben-admin/commit/e1c47233edf7675aede6d5f023726945a510ddf7)) +- **echarts:** fix graphic config cannot be used in echarts options ([#959](https://github.com/anncwb/vue-vben-admin/issues/959)) ([525484e](https://github.com/anncwb/vue-vben-admin/commit/525484e7a409b032d22231f90a92e700ef4290ae)) +- **form:** fix `validate` promise catch ([571f281](https://github.com/anncwb/vue-vben-admin/commit/571f28138f782553eb39cda2d632e5ac1aa1e145)) +- **form:** remove console error for `setFieldsValue` ([8d185bb](https://github.com/anncwb/vue-vben-admin/commit/8d185bb5841c83eb49c78e8342e65067aa6f9b80)), closes [#952](https://github.com/anncwb/vue-vben-admin/issues/952) +- **formItem:** Fix labelcol type mismatch ([#903](https://github.com/anncwb/vue-vben-admin/issues/903)) ([03b17a8](https://github.com/anncwb/vue-vben-admin/commit/03b17a8f8bdb50322aa10e3b614bcc40b9e9dcc8)) +- **img-rotate-drag-verify:** fix `resume` method support ([32d64db](https://github.com/anncwb/vue-vben-admin/commit/32d64dbe816a0afda6ee9e91863199afb3e7b48e)), closes [#946](https://github.com/anncwb/vue-vben-admin/issues/946) +- **login:** fix `auto fill` style in dark-theme ([cebc6a5](https://github.com/anncwb/vue-vben-admin/commit/cebc6a590e1a19af7380a55aed43b23af274df0a)) +- **modal:** ensure that props are passed correctly,fix [#897](https://github.com/anncwb/vue-vben-admin/issues/897) ([ae7821e](https://github.com/anncwb/vue-vben-admin/commit/ae7821e29690bea8934ea724bfd0ae4e2cf30c77)) +- **modal:** fixed `fullscreen` not worked ([5baaa58](https://github.com/anncwb/vue-vben-admin/commit/5baaa58581f22a915cda9fa39e4cb9f094254d3b)), closes [#918](https://github.com/anncwb/vue-vben-admin/issues/918) +- **model:** auto validate on value change ([f844017](https://github.com/anncwb/vue-vben-admin/commit/f8440175f35076073c9f53483cf6c0164d427ff4)), closes [#920](https://github.com/anncwb/vue-vben-admin/issues/920) +- **multiple-tab:** ignore login page ([1e63379](https://github.com/anncwb/vue-vben-admin/commit/1e63379088e1d7c823f29f607ab49d62ca22cb25)) +- **page-wrapper:** fix `class` not working ([8879ae8](https://github.com/anncwb/vue-vben-admin/commit/8879ae8d773e8dc4c252c4234eefeab9bc135a30)) +- **perm-guard:** Fix the problem that the routing query is lost after refreshing the page ([#941](https://github.com/anncwb/vue-vben-admin/issues/941)) ([9c4889f](https://github.com/anncwb/vue-vben-admin/commit/9c4889f0859bc60decf0ef40c383c1946de1d68a)) +- **qrcode:** Fix the problem that the QR code cannot be dynamically generated ([#974](https://github.com/anncwb/vue-vben-admin/issues/974)) ([fe4eae3](https://github.com/anncwb/vue-vben-admin/commit/fe4eae37146068f01ba08f033e0c2e8bd03e48b5)) +- **style:** fix checkbox-checked css in dark mode ([d3f08e3](https://github.com/anncwb/vue-vben-admin/commit/d3f08e37c5b6e46f33d525e9ef4b4c235d77a192)) +- **table:** `value` show problem in editable cell ([61ce25b](https://github.com/anncwb/vue-vben-admin/commit/61ce25be1b40d7a0e26205ca6a6757c6c43fc21e)), closes [#922](https://github.com/anncwb/vue-vben-admin/issues/922) +- **table:** component shown in `fullscreen` mode ([a07ab6d](https://github.com/anncwb/vue-vben-admin/commit/a07ab6d7aa1060f856649a9bdbec9dfa50b14f26)) +- **table:** editable cell display with validation ([202aa42](https://github.com/anncwb/vue-vben-admin/commit/202aa42b8d5a94e84ad386bcf7feab96926c70dd)), closes [#953](https://github.com/anncwb/vue-vben-admin/issues/953) +- **table:** fix `dataPicker` show in `fullscreen` mode ([a5a9b3f](https://github.com/anncwb/vue-vben-admin/commit/a5a9b3fb34c64b6ea9c9ab3d58045f6e5963952b)) +- **table:** fix `getSelectRows` for treeTable ([f2b8bb4](https://github.com/anncwb/vue-vben-admin/commit/f2b8bb43a0b9172b9ef9ced8e83bf91143a091d9)), closes [#1003](https://github.com/anncwb/vue-vben-admin/issues/1003) +- **table:** fix `pagination` props working ([e327893](https://github.com/anncwb/vue-vben-admin/commit/e32789373eb5b1b531572b59692bf552dac365dc)) +- **table:** fix editable cell not support `ellipsis` ([4bb506f](https://github.com/anncwb/vue-vben-admin/commit/4bb506fb1f6ac7d246f8792d29f337ec003ff426)), closes [#944](https://github.com/anncwb/vue-vben-admin/issues/944) +- **table:** fix expand style ([14fb21d](https://github.com/anncwb/vue-vben-admin/commit/14fb21d0b7b9ac69c7b3c463de6d709bd5713d14)), closes [#969](https://github.com/anncwb/vue-vben-admin/issues/969) +- **table:** fix tableSettings popup in fullscreen mode ([dce3fb0](https://github.com/anncwb/vue-vben-admin/commit/dce3fb0f20516aaf4817281f5d08109e53a73ecb)) +- **tree:** fix `checkAll` effects `disabled` node ([ddd1893](https://github.com/anncwb/vue-vben-admin/commit/ddd1893b113e13786037522341abb2e75f8f9d5b)) +- ensure PAGE_NOT_FOUND_ROUTE exist ([87583c8](https://github.com/anncwb/vue-vben-admin/commit/87583c8b54d335ddf1c416859ef62bbde189c809)) +- expandIcon slot of BasicTable component is invalid ([#975](https://github.com/anncwb/vue-vben-admin/issues/975)) ([98c206d](https://github.com/anncwb/vue-vben-admin/commit/98c206d9c9661a18dde4ec7782cbe1eb6e62ebeb)) +- fix homePage affix error ([c117802](https://github.com/anncwb/vue-vben-admin/commit/c1178027f0fab2791d02efcd7c52beff5fc7dc25)) +- Fix vite profile hot update error reporting ([#968](https://github.com/anncwb/vue-vben-admin/issues/968)) ([956ed2e](https://github.com/anncwb/vue-vben-admin/commit/956ed2e3f770cc9cf822ce80f71b1e7f179792fb)) +- fixed moment locale config ([27207a7](https://github.com/anncwb/vue-vben-admin/commit/27207a78caccb04372e0275c5cee526ec460de0e)) +- infinite redirect in `BACK` mode ([4b46a84](https://github.com/anncwb/vue-vben-admin/commit/4b46a84c2b85e8da799426c54b3381ae93183db4)) +- resolving `Vue Router warn` ([237e65e](https://github.com/anncwb/vue-vben-admin/commit/237e65eac909368c4b4857da6c8deb1dc18e7684)) +- typo ([#980](https://github.com/anncwb/vue-vben-admin/issues/980)) ([7e6a89f](https://github.com/anncwb/vue-vben-admin/commit/7e6a89ffeb8c63467908d5807d3d7c4761620ee3)) +- typo for utils/env ([#1004](https://github.com/anncwb/vue-vben-admin/issues/1004)) ([e8eefd1](https://github.com/anncwb/vue-vben-admin/commit/e8eefd1bca41c181ec6395bf1d087d2018e2b1f1)) +- **table:** selection-change not triggered on row click ([6f845b5](https://github.com/anncwb/vue-vben-admin/commit/6f845b53bdc4c33fbca3e65f10f64c63166bed0e)) +- **table:** treeTable editable error ([4ae39c5](https://github.com/anncwb/vue-vben-admin/commit/4ae39c53b49532fc6c31086a31e30429d2e236ed)), closes [#811](https://github.com/anncwb/vue-vben-admin/issues/811) +- **table-action:** fix `circle` button style ([db7254a](https://github.com/anncwb/vue-vben-admin/commit/db7254a5e0ac6d10a7ea37334ad523b150facb19)) +- **table-action:** fixed icon `margin` without label ([dc51e6a](https://github.com/anncwb/vue-vben-admin/commit/dc51e6a8d4e4f2c97b387b37959944c9bb49d779)) +- **table-action:** incorrect button color of `disabled` state ([0f28e80](https://github.com/anncwb/vue-vben-admin/commit/0f28e803d0b65537216cd9f40ad5cad63c20db9b)), closes [#891](https://github.com/anncwb/vue-vben-admin/issues/891) +- **table-action:** stopButtonPropagation not working ([9b8f165](https://github.com/anncwb/vue-vben-admin/commit/9b8f165a365758d001e6d86ae7afe4ae3316d485)) +- **tree:** fixed `checkedKeys` with `search` mode ([f707541](https://github.com/anncwb/vue-vben-admin/commit/f707541dda78146bda89814ddccbb259d9f5d8a2)) +- **upload:** ensure the value type is correct ([05329ce](https://github.com/anncwb/vue-vben-admin/commit/05329ce9501eb899a0bbb45320e5807c83372317)) +- **useWatermark:** fix `func` call `createWatermark` call `clear` to resizeEvent removed ([#901](https://github.com/anncwb/vue-vben-admin/issues/901)) ([a1d956d](https://github.com/anncwb/vue-vben-admin/commit/a1d956d3697cd07e0ba8910768f2a73e55f18491)) +- `menuSetting` can not set collapsed to false as default ([808291b](https://github.com/anncwb/vue-vben-admin/commit/808291b503d59e3026f5f0b5e7a38b9c69bcc451)) +- ensure that safari is running properly, fix [#875](https://github.com/anncwb/vue-vben-admin/issues/875) ([dafcdd8](https://github.com/anncwb/vue-vben-admin/commit/dafcdd898caae57104f1155b0ec660ea333e7b19)) +- **table:** scrollbar style ([d8c3820](https://github.com/anncwb/vue-vben-admin/commit/d8c38207c08510d805a8dc66ffbba210e0cf4215)) +- **tailwindcss:** remove console warnings ([acacb32](https://github.com/anncwb/vue-vben-admin/commit/acacb32bb592345cd0a90b4bbeb60a9b6ab1ac3c)) +- `hasPermission` not work in `ROLE` Mode ([76a5f87](https://github.com/anncwb/vue-vben-admin/commit/76a5f87c0ce871cca48b9e4c32331353a796e7d2)) +- fix antdv console warning ([480cfb9](https://github.com/anncwb/vue-vben-admin/commit/480cfb914e78c06eb7784e33465ed91b7d4c3eee)) +- fix defHttp baseUrl work ([d5f9919](https://github.com/anncwb/vue-vben-admin/commit/d5f9919b60fdd7d5c435129e8db519c0bbd37529)) +- multi windows token sharing ([e5f3788](https://github.com/anncwb/vue-vben-admin/commit/e5f37885ffb32d04d244f0ef39ac660dda6b71e1)), closes [#761](https://github.com/anncwb/vue-vben-admin/issues/761) +- routes filter can't effective when permission mode set to ROUTE_MAPPING ([#836](https://github.com/anncwb/vue-vben-admin/issues/836)) ([3871204](https://github.com/anncwb/vue-vben-admin/commit/3871204d08d481b8984440cd60bbf2bacb58d063)) +- support various vite modes of build, not just production ([#832](https://github.com/anncwb/vue-vben-admin/issues/832)) ([95c16a5](https://github.com/anncwb/vue-vben-admin/commit/95c16a5d26f9fd9a1d11894afe1146ca495eee93)) +- user drop-down event key loss ([20d7a25](https://github.com/anncwb/vue-vben-admin/commit/20d7a25eb898a5c28351ff269b93bf104b8ac10e)) +- user dropdown event response failure ([c73694a](https://github.com/anncwb/vue-vben-admin/commit/c73694ab8b0b6242c4d5e0f30bc7ebe3d69b4e33)) +- **upload:** make sure to carry custom parameters, fix [#802](https://github.com/anncwb/vue-vben-admin/issues/802) ([c4b22a2](https://github.com/anncwb/vue-vben-admin/commit/c4b22a225d0088d87be0c0068f543366312521db)) +- **utils:** The date function gets a non-date when the parameter is null ([#954](https://github.com/anncwb/vue-vben-admin/issues/954)) ([350c85a](https://github.com/anncwb/vue-vben-admin/commit/350c85accf5033cc5a21b71bc36d5b7a74eb2573)) + +### Features + +- **use-loading:** add `setTip` method ([26d9476](https://github.com/anncwb/vue-vben-admin/commit/26d9476caff41cc355190604af42e0bd2ef0a353)) +- Added support for tailwindcss night mode mechanism ([#998](https://github.com/anncwb/vue-vben-admin/issues/998)) ([189bc6f](https://github.com/anncwb/vue-vben-admin/commit/189bc6feb3f2860be8c531dd1ca996f3a2cff018)) +- **api-select:** clear options before fetch ([9cf070d](https://github.com/anncwb/vue-vben-admin/commit/9cf070dd6305bb69a67ab6be85ef00bddc86fda0)) +- **api-tree-select:** add `api` options to tree-select ([d81db89](https://github.com/anncwb/vue-vben-admin/commit/d81db890dfeb533d60f378ddb86f8ac50a31252b)) +- **avatar-cropper:** add action tooltip ([6cbac4b](https://github.com/anncwb/vue-vben-admin/commit/6cbac4b7ece60a1a7c1fda931cfffce42dfe3e51)) +- **avatar-cropper:** more props added ([b96ea07](https://github.com/anncwb/vue-vben-admin/commit/b96ea0753bfd769693a368cf1e3d8316688c0dcb)) +- **axios:** add `withToken` option ([c99cf5e](https://github.com/anncwb/vue-vben-admin/commit/c99cf5e53f057cdc332ab6c0635adf9c2d27de29)) +- **axios:** use `defHttp` like `axios` ([49f39de](https://github.com/anncwb/vue-vben-admin/commit/49f39de7b40e3ec8343bdeaf3eb00fd79d395746)), closes [#850](https://github.com/anncwb/vue-vben-admin/issues/850) +- **basic-table:** add `ApiTreeSelect` edit component ([52af1dd](https://github.com/anncwb/vue-vben-admin/commit/52af1dd0d494e66c0af20f886dcc2b983cbb096f)) +- **basic-upload:** `value` support v-model ([16c5d32](https://github.com/anncwb/vue-vben-admin/commit/16c5d327f1209f7c7437acde2ab0fa031da6a641)) +- **basic-upload:** add preview-delete event ([49e72a8](https://github.com/anncwb/vue-vben-admin/commit/49e72a8e76b78fe54e19de9e23d7c72a19427f01)), closes [#835](https://github.com/anncwb/vue-vben-admin/issues/835) +- **demo:** add `async-validator` demo ([8b4b767](https://github.com/anncwb/vue-vben-admin/commit/8b4b767f4ca78f7c6f7586d8ba662552c2b7bb51)) +- **demo:** add basicTree with async data expand all ([5421211](https://github.com/anncwb/vue-vben-admin/commit/542121129eb5bf65f61e7b484835591756c80f04)) +- **demo:** add route multi tabs show ([0e414ba](https://github.com/anncwb/vue-vben-admin/commit/0e414ba3c10b4e47a85feb1a38cae66c815719d8)), closes [#817](https://github.com/anncwb/vue-vben-admin/issues/817) +- **demo:** add search demo for apiSelect ([41e6d94](https://github.com/anncwb/vue-vben-admin/commit/41e6d94b3b64dc0d40b7ec57ecfaa4d966f202ae)) +- **demo:** demo default expanded tree table ([5f1a6cd](https://github.com/anncwb/vue-vben-admin/commit/5f1a6cdc599d5840df2dfebdaad029aac093cd81)) +- **demo:** multi-modal in one page usage ([7a7dab0](https://github.com/anncwb/vue-vben-admin/commit/7a7dab0c4b3602b7bd3e9381408e4168d7494c52)) +- **menu:** the route is automatically mapped to the menu ([913c22c](https://github.com/anncwb/vue-vben-admin/commit/913c22c84fc9a4221fdfff6bae0e79a68fd09b17)) +- **modal:** add `tooltip` for action buttons ([c3b9076](https://github.com/anncwb/vue-vben-admin/commit/c3b907656a5fad7a9b241562179f7a0f6fe0e6f0)) +- **notice-list:** add `pagination` support ([c16be2c](https://github.com/anncwb/vue-vben-admin/commit/c16be2c499d90126dfa35d699da9294c21a4ab48)), closes [#894](https://github.com/anncwb/vue-vben-admin/issues/894) +- **preview:** add more features ([e23bd26](https://github.com/anncwb/vue-vben-admin/commit/e23bd2696da945291a9b652f1af39ad1936f376b)) +- customized user home page ([0a3683a](https://github.com/anncwb/vue-vben-admin/commit/0a3683a186ab55d34a12a5a3c6d794dfa1094ad4)) +- **param-menu:** feature: menu with params ([#845](https://github.com/anncwb/vue-vben-admin/issues/845)) ([48fcd76](https://github.com/anncwb/vue-vben-admin/commit/48fcd7684cabff66e8648b71527c6cb4ce7d03be)) +- **route:** add `hidePathForChildren` in `meta` ([d52b0de](https://github.com/anncwb/vue-vben-admin/commit/d52b0de83e69f7505c28e6f59ec84bbe526ecd0d)) +- **table:** add `headerTop` slot ([540423e](https://github.com/anncwb/vue-vben-admin/commit/540423ecf741a815d28d7a6baa1541ac884efe95)), closes [#881](https://github.com/anncwb/vue-vben-admin/issues/881) +- **table:** support asynchrony in beforeFetch and afterFetch ([#827](https://github.com/anncwb/vue-vben-admin/issues/827)) ([749ba5c](https://github.com/anncwb/vue-vben-admin/commit/749ba5c1daf459625518937c239787b756c0a780)) +- **table-action:** support `tooltip` option ([5fab267](https://github.com/anncwb/vue-vben-admin/commit/5fab267a69600fdf5d7a7f9e4d9fff859d09dede)), closes [#848](https://github.com/anncwb/vue-vben-admin/issues/848) +- **tree:** add `insertNodesByKey` method ([5a20df4](https://github.com/anncwb/vue-vben-admin/commit/5a20df45ad36b523d48bf7fe11bdb10a6d03df64)) +- add Tree LoadData demo ([9298b3c](https://github.com/anncwb/vue-vben-admin/commit/9298b3c988c10b81d83430ca31b9ce1d98a3fad9)) +- routers support `ignoreRoute` option ([72ac240](https://github.com/anncwb/vue-vben-admin/commit/72ac240f2858cd74cb62b7647ca89d63bb71d247)) + +### Performance Improvements + +- improve legacy compatibility ([e2664f6](https://github.com/anncwb/vue-vben-admin/commit/e2664f60029f03642f8b1a6afa9b1998705fce37)) +- **menu:** Optimize the style of the bottom collapse button in the Mix menu layout ([#896](https://github.com/anncwb/vue-vben-admin/issues/896)) ([6f83070](https://github.com/anncwb/vue-vben-admin/commit/6f830703a2607c33e5d25d6d17d0e453fc2fac2e)) +- image compression configuration optimization ([cf840e3](https://github.com/anncwb/vue-vben-admin/commit/cf840e3e73b9572de0ba7bf7b32d83f6a353a8ad)) +- **icon:** remove Icon component global registration ([59d3e8c](https://github.com/anncwb/vue-vben-admin/commit/59d3e8c80f72f029f2b90432b31901ad54ed1ee4)) +- **pagewrapper:** 优化 PageWrapper 的高度自适应表现使用 getViewportOffset 替代 useContentViewHeight ([#792](https://github.com/anncwb/vue-vben-admin/issues/792)) ([4d8e398](https://github.com/anncwb/vue-vben-admin/commit/4d8e39857ea59fff99e69832b4a8cabf3a424c24)) +- **router:** reduce the number of guard files ([327d71b](https://github.com/anncwb/vue-vben-admin/commit/327d71b8fb4907ae971d040f6b84bbecb0a6d897)) +- **scrollbar:** scrollbar update when slot changed ([e9e51b2](https://github.com/anncwb/vue-vben-admin/commit/e9e51b2fdc879a66d8df08504a0955c9c21e3e27)) + +### Reverts + +- **axios:** remove baseUrl config ([61d4efd](https://github.com/anncwb/vue-vben-admin/commit/61d4efd55a8b4f09990b5f1888e23ead43958164)) + +## [2.6.1](https://github.com/anncwb/vue-vben-admin/compare/v2.6.0...v2.6.1) (2021-07-19) + +### Bug Fixes + +- **api-select:** fix `options-change` event data ([897bed9](https://github.com/anncwb/vue-vben-admin/commit/897bed97295a0b9101d33102340749689a4368de)) +- **api-tree-select:** auto load data if necessary ([1b3058f](https://github.com/anncwb/vue-vben-admin/commit/1b3058f8253effe974feaf08a12250a111ab58c0)) +- **api-tree-select:** fix `event` checked in form ([d9d0071](https://github.com/anncwb/vue-vben-admin/commit/d9d00714011fa7914c61f990ce1159351ee21a1a)) +- **app-search:** exclude hidden items ([faf5c9f](https://github.com/anncwb/vue-vben-admin/commit/faf5c9fd7ea40c407419a5a5c473f9b0c32c2a53)) +- **app-search:** exclude items by `hideChildrenInMenu` ([02d3dca](https://github.com/anncwb/vue-vben-admin/commit/02d3dca57efedc1322ae38e3f432cf1f6c2cf839)) +- **basic-tree:** `checkedKeys` not worked with `search` ([b06a7ab](https://github.com/anncwb/vue-vben-admin/commit/b06a7ab77b99abee63dd55770ffd55b594ee42f9)), closes [#915](https://github.com/anncwb/vue-vben-admin/issues/915) +- **breadcrumb:** `redirect` not worked ([f5e31fe](https://github.com/anncwb/vue-vben-admin/commit/f5e31febbd18372a34166cac390b1d9b914fe80e)) +- **code-editor:** `value` not support use as `v-model` ([8832a07](https://github.com/anncwb/vue-vben-admin/commit/8832a074dceb44f057c87289d3a99feef58c08fd)), closes [#933](https://github.com/anncwb/vue-vben-admin/issues/933) +- **countdown-input:** add `slots` support ([a764a95](https://github.com/anncwb/vue-vben-admin/commit/a764a95ae9a6cff831f75aa97b00724cadc48e92)) +- **CountTo:** Fix displaying empty string when the value is 0 ([#864](https://github.com/anncwb/vue-vben-admin/issues/864)) ([82eb72b](https://github.com/anncwb/vue-vben-admin/commit/82eb72bbced931ba7f50069211f9511035ad09f4)) +- **demo:** `setup` page route config ([d5d5c4b](https://github.com/anncwb/vue-vben-admin/commit/d5d5c4b4bfb3e3a5e54f9993966adc46a09a8b90)) +- **demo:** add mock data `account detail` route ([993e19d](https://github.com/anncwb/vue-vben-admin/commit/993e19dcc319e2b4c68df2ab76174b7b4d7b0428)), closes [#858](https://github.com/anncwb/vue-vben-admin/issues/858) +- **demo:** fix display problem of editable table with `apiSelect` ([535bddd](https://github.com/anncwb/vue-vben-admin/commit/535bdddf91785e20295c18cf80c8a22cc2172681)) +- **demo:** form pages support `keepAlive` ([9228282](https://github.com/anncwb/vue-vben-admin/commit/9228282ae27daaa246f42e441e27b1b05eb30464)) +- **demo:** resolve `key not exist` warnings ([45a94e4](https://github.com/anncwb/vue-vben-admin/commit/45a94e41c1397b84d08373f84f766204d2488714)) +- **form:** fix `suffix` slot style ([a9bbed1](https://github.com/anncwb/vue-vben-admin/commit/a9bbed19739376ab2bf67a14b04e872f14ca84cc)) +- **formItem:** Fix labelcol type mismatch ([#903](https://github.com/anncwb/vue-vben-admin/issues/903)) ([03b17a8](https://github.com/anncwb/vue-vben-admin/commit/03b17a8f8bdb50322aa10e3b614bcc40b9e9dcc8)) +- **markdown:** resolving markdown exceptions ([d95815b](https://github.com/anncwb/vue-vben-admin/commit/d95815b5031984e224140eb1b1d46e2dbf80abc1)) +- **markdown:** set `value` error ([35e1347](https://github.com/anncwb/vue-vben-admin/commit/35e1347029e29a83a9648b6b398e6863cc40fca9)) +- **menu:** display error when contains hidden items ([5ceeefd](https://github.com/anncwb/vue-vben-admin/commit/5ceeefd17d9ddc0e8844b900069b100f24d9c00e)) +- **menu:** fix mix-menu incorrect jumping in `hover` mode ([cad021c](https://github.com/anncwb/vue-vben-admin/commit/cad021c34b71fa109640af75a0c2b72179e9e257)) +- **mix-sider:** fix mix-sider hover logic ([0595a72](https://github.com/anncwb/vue-vben-admin/commit/0595a72da9c666af81a0916663e8e6a014e6fa69)) +- **modal:** ensure that props are passed correctly,fix [#897](https://github.com/anncwb/vue-vben-admin/issues/897) ([ae7821e](https://github.com/anncwb/vue-vben-admin/commit/ae7821e29690bea8934ea724bfd0ae4e2cf30c77)) +- **modal:** fixed `fullscreen` not worked ([5baaa58](https://github.com/anncwb/vue-vben-admin/commit/5baaa58581f22a915cda9fa39e4cb9f094254d3b)), closes [#918](https://github.com/anncwb/vue-vben-admin/issues/918) +- **model:** auto validate on value change ([f844017](https://github.com/anncwb/vue-vben-admin/commit/f8440175f35076073c9f53483cf6c0164d427ff4)), closes [#920](https://github.com/anncwb/vue-vben-admin/issues/920) +- **table:** fix index column style ([c7c0a7e](https://github.com/anncwb/vue-vben-admin/commit/c7c0a7e4c88a895000b1621981e4d4b2020c64b1)) +- **table:** `value` show problem in editable cell ([61ce25b](https://github.com/anncwb/vue-vben-admin/commit/61ce25be1b40d7a0e26205ca6a6757c6c43fc21e)), closes [#922](https://github.com/anncwb/vue-vben-admin/issues/922) +- **table-action:** fixed icon `margin` without label ([dc51e6a](https://github.com/anncwb/vue-vben-admin/commit/dc51e6a8d4e4f2c97b387b37959944c9bb49d779)) +- **tree:** fixed `checkedKeys` with `search` mode ([f707541](https://github.com/anncwb/vue-vben-admin/commit/f707541dda78146bda89814ddccbb259d9f5d8a2)) +- fix homePage affix error ([c117802](https://github.com/anncwb/vue-vben-admin/commit/c1178027f0fab2791d02efcd7c52beff5fc7dc25)) +- **table-action:** fix `circle` button style ([db7254a](https://github.com/anncwb/vue-vben-admin/commit/db7254a5e0ac6d10a7ea37334ad523b150facb19)) +- `menuSetting` can not set collapsed to false as default ([808291b](https://github.com/anncwb/vue-vben-admin/commit/808291b503d59e3026f5f0b5e7a38b9c69bcc451)) +- ensure PAGE_NOT_FOUND_ROUTE exist ([87583c8](https://github.com/anncwb/vue-vben-admin/commit/87583c8b54d335ddf1c416859ef62bbde189c809)) +- ensure that safari is running properly, fix [#875](https://github.com/anncwb/vue-vben-admin/issues/875) ([dafcdd8](https://github.com/anncwb/vue-vben-admin/commit/dafcdd898caae57104f1155b0ec660ea333e7b19)) +- infinite redirect in `BACK` mode ([4b46a84](https://github.com/anncwb/vue-vben-admin/commit/4b46a84c2b85e8da799426c54b3381ae93183db4)) +- **multiple-tab:** ignore login page ([1e63379](https://github.com/anncwb/vue-vben-admin/commit/1e63379088e1d7c823f29f607ab49d62ca22cb25)) +- resolving `Vue Router warn` ([237e65e](https://github.com/anncwb/vue-vben-admin/commit/237e65eac909368c4b4857da6c8deb1dc18e7684)) +- **table:** fix tree node align ([1e61da6](https://github.com/anncwb/vue-vben-admin/commit/1e61da644f65a79ce10fde98ee017aba7d36be10)), closes [#829](https://github.com/anncwb/vue-vben-admin/issues/829) +- **table:** scrollbar style ([d8c3820](https://github.com/anncwb/vue-vben-admin/commit/d8c38207c08510d805a8dc66ffbba210e0cf4215)) +- **table-action:** incorrect button color of `disabled` state ([0f28e80](https://github.com/anncwb/vue-vben-admin/commit/0f28e803d0b65537216cd9f40ad5cad63c20db9b)), closes [#891](https://github.com/anncwb/vue-vben-admin/issues/891) +- **upload:** ensure the value type is correct ([05329ce](https://github.com/anncwb/vue-vben-admin/commit/05329ce9501eb899a0bbb45320e5807c83372317)) +- **useWatermark:** fix `func` call `createWatermark` call `clear` to resizeEvent removed ([#901](https://github.com/anncwb/vue-vben-admin/issues/901)) ([a1d956d](https://github.com/anncwb/vue-vben-admin/commit/a1d956d3697cd07e0ba8910768f2a73e55f18491)) + +### Features + +- **api-tree-select:** add `api` options to tree-select ([d81db89](https://github.com/anncwb/vue-vben-admin/commit/d81db890dfeb533d60f378ddb86f8ac50a31252b)) +- **basic-table:** add `ApiTreeSelect` edit component ([52af1dd](https://github.com/anncwb/vue-vben-admin/commit/52af1dd0d494e66c0af20f886dcc2b983cbb096f)) +- **demo:** multi-modal in one page usage ([7a7dab0](https://github.com/anncwb/vue-vben-admin/commit/7a7dab0c4b3602b7bd3e9381408e4168d7494c52)) +- customized user home page ([0a3683a](https://github.com/anncwb/vue-vben-admin/commit/0a3683a186ab55d34a12a5a3c6d794dfa1094ad4)) +- **api-select:** clear options before fetch ([9cf070d](https://github.com/anncwb/vue-vben-admin/commit/9cf070dd6305bb69a67ab6be85ef00bddc86fda0)) +- **demo:** add basicTree with async data expand all ([5421211](https://github.com/anncwb/vue-vben-admin/commit/542121129eb5bf65f61e7b484835591756c80f04)) +- **demo:** add search demo for apiSelect ([41e6d94](https://github.com/anncwb/vue-vben-admin/commit/41e6d94b3b64dc0d40b7ec57ecfaa4d966f202ae)) +- **demo:** demo default expanded tree table ([5f1a6cd](https://github.com/anncwb/vue-vben-admin/commit/5f1a6cdc599d5840df2dfebdaad029aac093cd81)) +- **notice-list:** add `pagination` support ([c16be2c](https://github.com/anncwb/vue-vben-admin/commit/c16be2c499d90126dfa35d699da9294c21a4ab48)), closes [#894](https://github.com/anncwb/vue-vben-admin/issues/894) +- **table:** add `headerTop` slot ([540423e](https://github.com/anncwb/vue-vben-admin/commit/540423ecf741a815d28d7a6baa1541ac884efe95)), closes [#881](https://github.com/anncwb/vue-vben-admin/issues/881) + +### Performance Improvements + +- **menu:** Optimize the style of the bottom collapse button in the Mix menu layout ([#896](https://github.com/anncwb/vue-vben-admin/issues/896)) ([6f83070](https://github.com/anncwb/vue-vben-admin/commit/6f830703a2607c33e5d25d6d17d0e453fc2fac2e)) +- image compression configuration optimization ([cf840e3](https://github.com/anncwb/vue-vben-admin/commit/cf840e3e73b9572de0ba7bf7b32d83f6a353a8ad)) + +# [2.6.0](https://github.com/anncwb/vue-vben-admin/compare/v2.5.2...v2.6.0) (2021-07-04) + +### Bug Fixes + +- **axios:** option `withToken` not work ([d509e89](https://github.com/anncwb/vue-vben-admin/commit/d509e897be5753c852e912112e70dac6247ba467)) +- **demo:** account list fetch loss param ([424b171](https://github.com/anncwb/vue-vben-admin/commit/424b171e0db727f5e0157cbcfd5460f15f8ea609)), closes [#830](https://github.com/anncwb/vue-vben-admin/issues/830) +- **demo:** fix async tree demo, fixed: [#823](https://github.com/anncwb/vue-vben-admin/issues/823) ([5637588](https://github.com/anncwb/vue-vben-admin/commit/5637588fce880b01137191cc82c73e0fce621e8c)) +- **form:** fix some prop declaration ([b5046f0](https://github.com/anncwb/vue-vben-admin/commit/b5046f07a27e8ca7fc8b961b74fa5e1b0d715149)) +- **lock-screen:** ensure lock info is saved ([d38ff66](https://github.com/anncwb/vue-vben-admin/commit/d38ff6670a37478b31447f8058e786c4b044e218)) +- **lock-screen:** fix lock-screen can skip on new window ([d7b84c7](https://github.com/anncwb/vue-vben-admin/commit/d7b84c78744f7d0077a779b232e1358040b50383)) +- **menu:** make sure the menu is activated correctly ([cdb10cc](https://github.com/anncwb/vue-vben-admin/commit/cdb10cc4ac5e5e8f9cce3ff18d8fbd29ef10c86f)) +- **modal:** `setModalProps` support `defaultFullscreen` ([c7de65e](https://github.com/anncwb/vue-vben-admin/commit/c7de65ebba53941771153f18b184d3d4d31c0dbf)) +- **modal:** maskClosable not work ([f750ff4](https://github.com/anncwb/vue-vben-admin/commit/f750ff435fee06acee78d6b9633e6e18d91685f8)) +- **modal:** remove console log ([3dbbde2](https://github.com/anncwb/vue-vben-admin/commit/3dbbde2662352780377a9b216598d9348522f6ba)) +- **popconfirm-button:** remove button excess `title` ([73654b7](https://github.com/anncwb/vue-vben-admin/commit/73654b7862c59d623d6d5dc7dcf6ff2704564d9a)) +- **sider:** bottom trigger not work ([1bde404](https://github.com/anncwb/vue-vben-admin/commit/1bde4041211229d5d9d01ce0ca806fa99356b6de)), closes [#820](https://github.com/anncwb/vue-vben-admin/issues/820) +- **sider:** custom trigger does not take effect ([5005e6e](https://github.com/anncwb/vue-vben-admin/commit/5005e6e56b1cc7763a1cc23e1162dfb49452013b)) +- **svg-icon:** fix SvgIcon style ([99829c7](https://github.com/anncwb/vue-vben-admin/commit/99829c79ab41a2319f40c5595a7d82d9e406ba18)) +- **table:** auto hide unnecessary scrollbar ([735028c](https://github.com/anncwb/vue-vben-admin/commit/735028c43055e8e80ebc7344af0cd0f51c744f98)) +- **table:** global configuration accidentally modified ([b4a3f93](https://github.com/anncwb/vue-vben-admin/commit/b4a3f936cd19bf1fff3a331bacad60e79d2d6c22)) +- **table:** param of `handleSearchInfoFn` ([791b323](https://github.com/anncwb/vue-vben-admin/commit/791b323dbd30acd7fabfe9c3fb6e528916311ffd)) +- **tailwindcss:** remove console warnings ([acacb32](https://github.com/anncwb/vue-vben-admin/commit/acacb32bb592345cd0a90b4bbeb60a9b6ab1ac3c)) +- `hasPermission` not work in `ROLE` Mode ([76a5f87](https://github.com/anncwb/vue-vben-admin/commit/76a5f87c0ce871cca48b9e4c32331353a796e7d2)) +- routes filter can't effective when permission mode set to ROUTE_MAPPING ([#836](https://github.com/anncwb/vue-vben-admin/issues/836)) ([3871204](https://github.com/anncwb/vue-vben-admin/commit/3871204d08d481b8984440cd60bbf2bacb58d063)) +- **table:** selection-change not triggered on row click ([6f845b5](https://github.com/anncwb/vue-vben-admin/commit/6f845b53bdc4c33fbca3e65f10f64c63166bed0e)) +- multi windows token sharing ([e5f3788](https://github.com/anncwb/vue-vben-admin/commit/e5f37885ffb32d04d244f0ef39ac660dda6b71e1)), closes [#761](https://github.com/anncwb/vue-vben-admin/issues/761) +- support various vite modes of build, not just production ([#832](https://github.com/anncwb/vue-vben-admin/issues/832)) ([95c16a5](https://github.com/anncwb/vue-vben-admin/commit/95c16a5d26f9fd9a1d11894afe1146ca495eee93)) +- **table:** editComponentProps support onChange ([829b366](https://github.com/anncwb/vue-vben-admin/commit/829b366cb2abf27e69d9665e5be022b3d3f15655)) +- **table:** fix rowSelection.onChange not work ([df0f000](https://github.com/anncwb/vue-vben-admin/commit/df0f00085c1113eddd7a15954818ccece3538068)), closes [#825](https://github.com/anncwb/vue-vben-admin/issues/825) + +### Features + +- **avatar-cropper:** add action tooltip ([6cbac4b](https://github.com/anncwb/vue-vben-admin/commit/6cbac4b7ece60a1a7c1fda931cfffce42dfe3e51)) +- **avatar-cropper:** more props added ([b96ea07](https://github.com/anncwb/vue-vben-admin/commit/b96ea0753bfd769693a368cf1e3d8316688c0dcb)) +- **axios:** add `withToken` option ([c99cf5e](https://github.com/anncwb/vue-vben-admin/commit/c99cf5e53f057cdc332ab6c0635adf9c2d27de29)) +- **axios:** use `defHttp` like `axios` ([49f39de](https://github.com/anncwb/vue-vben-admin/commit/49f39de7b40e3ec8343bdeaf3eb00fd79d395746)), closes [#850](https://github.com/anncwb/vue-vben-admin/issues/850) +- **basic-upload:** `value` support v-model ([16c5d32](https://github.com/anncwb/vue-vben-admin/commit/16c5d327f1209f7c7437acde2ab0fa031da6a641)) +- **basic-upload:** add preview-delete event ([49e72a8](https://github.com/anncwb/vue-vben-admin/commit/49e72a8e76b78fe54e19de9e23d7c72a19427f01)), closes [#835](https://github.com/anncwb/vue-vben-admin/issues/835) +- **modal:** add `tooltip` for action buttons ([c3b9076](https://github.com/anncwb/vue-vben-admin/commit/c3b907656a5fad7a9b241562179f7a0f6fe0e6f0)) +- **param-menu:** feature: menu with params ([#845](https://github.com/anncwb/vue-vben-admin/issues/845)) ([48fcd76](https://github.com/anncwb/vue-vben-admin/commit/48fcd7684cabff66e8648b71527c6cb4ce7d03be)) +- **route:** add `hidePathForChildren` in `meta` ([d52b0de](https://github.com/anncwb/vue-vben-admin/commit/d52b0de83e69f7505c28e6f59ec84bbe526ecd0d)) +- **table:** support asynchrony in beforeFetch and afterFetch ([#827](https://github.com/anncwb/vue-vben-admin/issues/827)) ([749ba5c](https://github.com/anncwb/vue-vben-admin/commit/749ba5c1daf459625518937c239787b756c0a780)) +- **table-action:** support `tooltip` option ([5fab267](https://github.com/anncwb/vue-vben-admin/commit/5fab267a69600fdf5d7a7f9e4d9fff859d09dede)), closes [#848](https://github.com/anncwb/vue-vben-admin/issues/848) +- **tree:** add `insertNodesByKey` method ([5a20df4](https://github.com/anncwb/vue-vben-admin/commit/5a20df45ad36b523d48bf7fe11bdb10a6d03df64)) +- routers support `ignoreRoute` option ([72ac240](https://github.com/anncwb/vue-vben-admin/commit/72ac240f2858cd74cb62b7647ca89d63bb71d247)) + +### Performance Improvements + +- **scrollbar:** scrollbar update when slot changed ([e9e51b2](https://github.com/anncwb/vue-vben-admin/commit/e9e51b2fdc879a66d8df08504a0955c9c21e3e27)) + +## [2.5.1](https://github.com/anncwb/vue-vben-admin/compare/v2.4.0...v2.5.1) (2021-06-26) + +### Bug Fixes + +- **comp-tree:** support comp-tree-foreach stop,add insertNodesByKey ([#818](https://github.com/anncwb/vue-vben-admin/issues/818)) ([d97aa92](https://github.com/anncwb/vue-vben-admin/commit/d97aa927417bf45a7c127ecfa9b8e835b6b68855)) +- fix antdv console warning ([480cfb9](https://github.com/anncwb/vue-vben-admin/commit/480cfb914e78c06eb7784e33465ed91b7d4c3eee)) +- fix defHttp baseUrl work ([d5f9919](https://github.com/anncwb/vue-vben-admin/commit/d5f9919b60fdd7d5c435129e8db519c0bbd37529)) +- **api:** select api type error ([b387681](https://github.com/anncwb/vue-vben-admin/commit/b387681c00ac018f5bc6a9251009ddffe37acae6)) +- **api-select:** ensure that the onchange function parameters are correct ([fa64fc8](https://github.com/anncwb/vue-vben-admin/commit/fa64fc8a622832b87fdf672965d55d543b5929a2)) +- **api-select:** loss option data on event callback ([c5f2577](https://github.com/anncwb/vue-vben-admin/commit/c5f2577f515e7ae96b27b509e5dd4b3317fcb7b4)), closes [#733](https://github.com/anncwb/vue-vben-admin/issues/733) +- **ApiSelect demo:** add demo about ApiSelect's use ([#757](https://github.com/anncwb/vue-vben-admin/issues/757)) ([a03d3cc](https://github.com/anncwb/vue-vben-admin/commit/a03d3cc60c770eba644c1f3837850a2c1c015029)) +- **demo:** `breadcrumb` route invalid redirect ([84d9300](https://github.com/anncwb/vue-vben-admin/commit/84d9300e52fa73da575591aa4b71858a7e459c8c)) +- **demo:** account list page validate and save ([21f7a85](https://github.com/anncwb/vue-vben-admin/commit/21f7a854fe2455315287d04e895661ff739bce17)) +- **demo:** make sure the map https resource is correct ([7b9cd09](https://github.com/anncwb/vue-vben-admin/commit/7b9cd09ad8a50c45b2e661e07953d786d82f367d)) +- **demo:** style error,fix [#806](https://github.com/anncwb/vue-vben-admin/issues/806) ([a2d8be3](https://github.com/anncwb/vue-vben-admin/commit/a2d8be3ab29da88126f3ba971f6893cb12327759)) +- **demo-form:** add fieldMapToTime example,fix [#807](https://github.com/anncwb/vue-vben-admin/issues/807) ([a2a75a0](https://github.com/anncwb/vue-vben-admin/commit/a2a75a097ff6c9df12471eff0d62d44d2b88cfff)) +- **design:** correct tailwind configuration,fix [#800](https://github.com/anncwb/vue-vben-admin/issues/800) ([aec230c](https://github.com/anncwb/vue-vben-admin/commit/aec230ca19d541079b64c54ba00596ef9cd92ca0)) +- **dropdown:** icon and trigger work unexpected ([60b80c9](https://github.com/anncwb/vue-vben-admin/commit/60b80c96e82da9101d56b2e195e9e7571de11f0a)), closes [#796](https://github.com/anncwb/vue-vben-admin/issues/796) [#787](https://github.com/anncwb/vue-vben-admin/issues/787) +- **flow-chart:** fix drag and drop menu loss ([fa828fd](https://github.com/anncwb/vue-vben-admin/commit/fa828fd972efeea87f364be76a1139ae53ec20d8)) +- **form:** loss args on component change event ([513823b](https://github.com/anncwb/vue-vben-admin/commit/513823bfbd3e8acc68098e0708c34bff2dd8dba6)) +- **layout:** props warn ([#756](https://github.com/anncwb/vue-vben-admin/issues/756)) ([bbce002](https://github.com/anncwb/vue-vben-admin/commit/bbce002be170c52db984647c931db88d7724cb52)) +- **menu:** fix the jitter problem of menu folding animation,fix [#732](https://github.com/anncwb/vue-vben-admin/issues/732) ([4c89ea7](https://github.com/anncwb/vue-vben-admin/commit/4c89ea7474f4315870df1790f99f3e431f343b90)) +- **mock:** make sure ignore matches the file correctly, fix [#745](https://github.com/anncwb/vue-vben-admin/issues/745) ([a222ec8](https://github.com/anncwb/vue-vben-admin/commit/a222ec8553f9b4477a43a8f7d113b5646fbfc373)) +- **mock:** type error ([7c1ffa3](https://github.com/anncwb/vue-vben-admin/commit/7c1ffa3d23de508a8d1590985806cb7a484b24e5)) +- **modal:** add v-model support for visible ([de12bab](https://github.com/anncwb/vue-vben-admin/commit/de12babd314ac831d3cb645f42dbf8a476075623)) +- **modal:** ensure that the full screen height is calculated correctly ([1c1755c](https://github.com/anncwb/vue-vben-admin/commit/1c1755cf5b4ada7263c05ddf4105abb52a2abb2f)) +- **modal:** ensure that the shutdown event is not triggered multiple times ([655b743](https://github.com/anncwb/vue-vben-admin/commit/655b74323653147943cbde2352208cb765c82b8a)) +- **pop-confirm:** fix event working unexpected ([a6ef771](https://github.com/anncwb/vue-vben-admin/commit/a6ef771fcce14c3644c965afaa69b3a17d0a7087)) +- **route:** dynamically introduce components error ([c6b766d](https://github.com/anncwb/vue-vben-admin/commit/c6b766d8ea902294ab1f7e4a06781f2bcfdd1f0b)) +- **router:** loss `directory` route ([df8cd86](https://github.com/anncwb/vue-vben-admin/commit/df8cd860514f32f44847dcf724f0737ed4d8b9e0)), closes [#722](https://github.com/anncwb/vue-vben-admin/issues/722) +- **store:** fix type error after pinia version upgrade ([e8d6f88](https://github.com/anncwb/vue-vben-admin/commit/e8d6f8851efd7076946486864936f1797280d3ba)) +- **table:** event editCancel loss params ([8d22231](https://github.com/anncwb/vue-vben-admin/commit/8d22231a5fa4afed19201a4a4e5c29d674498516)) +- **table:** fix table jitter problem ([8eba7fb](https://github.com/anncwb/vue-vben-admin/commit/8eba7fb52786d1977e4cb7b67673d74c91c5c827)) +- **table:** getDataSource not worked on empty data ([e78af6f](https://github.com/anncwb/vue-vben-admin/commit/e78af6f228e25f052dc4c5a1859a6db50e0b112e)), closes [#752](https://github.com/anncwb/vue-vben-admin/issues/752) +- **table:** treeTable editable error ([4ae39c5](https://github.com/anncwb/vue-vben-admin/commit/4ae39c53b49532fc6c31086a31e30429d2e236ed)), closes [#811](https://github.com/anncwb/vue-vben-admin/issues/811) +- **upload:** make sure to carry custom parameters, fix [#802](https://github.com/anncwb/vue-vben-admin/issues/802) ([c4b22a2](https://github.com/anncwb/vue-vben-admin/commit/c4b22a225d0088d87be0c0068f543366312521db)) +- **use-message:** `content` not support vNode ([154ebc3](https://github.com/anncwb/vue-vben-admin/commit/154ebc3d96f73bb3ceab99ea0229a3619d585aba)) +- build error ([5212ea7](https://github.com/anncwb/vue-vben-admin/commit/5212ea79b43c832a5136354b549de8f89b6e2156)) +- **avatar:** mock data and Account center style ([2066f66](https://github.com/anncwb/vue-vben-admin/commit/2066f669715491f3e91ac6d0e905cd2b3e80b58d)) +- **axios:** make sure that the parameter is an object before processing, fix [#660](https://github.com/anncwb/vue-vben-admin/issues/660) ([834fa7e](https://github.com/anncwb/vue-vben-admin/commit/834fa7eb9c8aff252e083d38fdab4f6f53b4d43a)) +- **axios:** transformRequestHook logic error ([b69dcd7](https://github.com/anncwb/vue-vben-admin/commit/b69dcd79d742fd171302ce0f48c7750d60da217f)) +- **code-editor:** fix CodeEditor style problem, fix [#655](https://github.com/anncwb/vue-vben-admin/issues/655) ([5662804](https://github.com/anncwb/vue-vben-admin/commit/566280422de0537c4e31496eaaa95a9d51fe9458)) +- **codeeditor:** empty value set failed.fixed:[#659](https://github.com/anncwb/vue-vben-admin/issues/659) ([ba2bebb](https://github.com/anncwb/vue-vben-admin/commit/ba2bebb4069085817a90d065ed5877fdb50a8039)) +- **codeMirror:** fix the JsonEditor embedded in the bullet frame causing the style to be disordered ([#668](https://github.com/anncwb/vue-vben-admin/issues/668)) ([e1123a2](https://github.com/anncwb/vue-vben-admin/commit/e1123a2ccb5d5450a5072c19e5508a5dc0f14423)) +- **demo:** fix basic form page style ([8b6e07b](https://github.com/anncwb/vue-vben-admin/commit/8b6e07b768f110f13b4f2efa6c46e03266667a8c)) +- **form:** fix form update problem ([bcad95d](https://github.com/anncwb/vue-vben-admin/commit/bcad95d32a08a73f84ecbabab409cd64159f4077)), closes [#720](https://github.com/anncwb/vue-vben-admin/issues/720) +- **form:** radioButtonGroup value support boolean ([9e2aa20](https://github.com/anncwb/vue-vben-admin/commit/9e2aa20daa08d2902cb5d56c1560306947e44939)) +- **form:** radioButtonGroup value support number ([bbddf30](https://github.com/anncwb/vue-vben-admin/commit/bbddf30e96feb1ab048323d93d3b8c1b18857acd)) +- **form:** schemas update problem ([808328d](https://github.com/anncwb/vue-vben-admin/commit/808328dc7e56b1cc07b678d501d9589290173443)), closes [#688](https://github.com/anncwb/vue-vben-admin/issues/688) +- **keep-alive:** tablist cache updating effect ([d62d0ca](https://github.com/anncwb/vue-vben-admin/commit/d62d0ca08cff442c23eb9265851b066a2f24afa8)), closes [#695](https://github.com/anncwb/vue-vben-admin/issues/695) +- **layout:** fix class loss ([d018363](https://github.com/anncwb/vue-vben-admin/commit/d018363ddcd68189a18829a2b2560f3b98da58a6)) +- **layout:** fix style compatibility issues ([905e5b7](https://github.com/anncwb/vue-vben-admin/commit/905e5b714b582548f32feca723012124343686a6)) +- **lock:** fix lock modal height ([40e3cb0](https://github.com/anncwb/vue-vben-admin/commit/40e3cb043c90a8343fa44a32acad2cb77de732da)), closes [#701](https://github.com/anncwb/vue-vben-admin/issues/701) +- **log:** fix Wrong version number ([#653](https://github.com/anncwb/vue-vben-admin/issues/653)) ([4f0d45f](https://github.com/anncwb/vue-vben-admin/commit/4f0d45f1df48755eadc0b09fa19762ee68f9abd1)) +- **login:** login page modal style fixed: [#662](https://github.com/anncwb/vue-vben-admin/issues/662) ([#666](https://github.com/anncwb/vue-vben-admin/issues/666)) ([b218f10](https://github.com/anncwb/vue-vben-admin/commit/b218f10e25a9364c399a5fe42eedb549f57c01ea)) +- **mock:** menu list api loss `type` field ([4185412](https://github.com/anncwb/vue-vben-admin/commit/41854121f3713dbde236afd3a416e9f27bd0c673)) +- **modal:** redoModalHeight not work as expected ([5d554f1](https://github.com/anncwb/vue-vben-admin/commit/5d554f184f7b61774d1a1b2e61451677b38505de)) +- **page:** `basic form` action btns should be in line ([6c4f947](https://github.com/anncwb/vue-vben-admin/commit/6c4f947386c181f45253c94e4ef735d29a253053)) +- **radio-button:** fix RadioButton `disabled` support ([ee384b1](https://github.com/anncwb/vue-vben-admin/commit/ee384b1fa7e387b3680e9d54cbe4a1e2f15ec750)), closes [#710](https://github.com/anncwb/vue-vben-admin/issues/710) +- **table:** wrong indeterminate state ([495b1da](https://github.com/anncwb/vue-vben-admin/commit/495b1da385e9b6428d2b994669d2065722445923)) +- **table:** make sure the table width is correct, fix [#593](https://github.com/anncwb/vue-vben-admin/issues/593) ([d73d43e](https://github.com/anncwb/vue-vben-admin/commit/d73d43ed91f30957cfd202c51552ca40a19cef08)) +- **table:** settings indeterminate state effect ([4fd2051](https://github.com/anncwb/vue-vben-admin/commit/4fd2051bc0403bfc5345ed6a5fc283a372ef7a92)) +- **table:** support change event ([9f4d171](https://github.com/anncwb/vue-vben-admin/commit/9f4d1719caa76de94e6362c16e4df3ac28df253c)), closes [#677](https://github.com/anncwb/vue-vben-admin/issues/677) +- **table:** try to get close to the form stuck ([d81481c](https://github.com/anncwb/vue-vben-admin/commit/d81481c52186145dac130aaa1594f0ba8db4d392)) +- **table:** useTable support onChange ([9f5085c](https://github.com/anncwb/vue-vben-admin/commit/9f5085c9f9f46b09391156b17091c1771bc13026)) +- **table-action:** fix the split line style is missing,fix [#674](https://github.com/anncwb/vue-vben-admin/issues/674) ([b1cb863](https://github.com/anncwb/vue-vben-admin/commit/b1cb86350253dc5be095466966d9469775f4395d)) +- **Tinymce:** Read only status upload button can also be used ([#718](https://github.com/anncwb/vue-vben-admin/issues/718)) ([966571b](https://github.com/anncwb/vue-vben-admin/commit/966571bdcb11c2729ab9ce212bd3e195f7bf3a59)) +- **upload:** ensure preview items valid ([4376928](https://github.com/anncwb/vue-vben-admin/commit/437692869a232ee65c300c65ee473557ae0913c7)) +- ensure that roleList is not empty ([aebad61](https://github.com/anncwb/vue-vben-admin/commit/aebad61b3d3e11aaf720b37e762e53e2e6999d3c)) +- fix darkModeSwitch switch failure ([34a8054](https://github.com/anncwb/vue-vben-admin/commit/34a80542de670f0385dffaf5bf64bb9c3f6b90da)) +- fix if getDropdownList.length==0 show Dropdown component ([21c771b](https://github.com/anncwb/vue-vben-admin/commit/21c771b59cb45defbff37de21c5c1950370b8f92)) +- fix Login Page LocalePicker showLocale condition ([d683b0f](https://github.com/anncwb/vue-vben-admin/commit/d683b0f1e85b85b07090feba4ac7f741bd3bd482)) +- fix node12 version data mock error ([644dbe3](https://github.com/anncwb/vue-vben-admin/commit/644dbe315bb03ea1641a682359873237208a5303)) +- Fix the problem that the `lang` attribute of `HTML` will not be set when it is first loaded ([#682](https://github.com/anncwb/vue-vben-admin/issues/682)) ([eca8907](https://github.com/anncwb/vue-vben-admin/commit/eca8907a11c28d816c3da5a0667f45a38a499012)) +- login failed ([035f55a](https://github.com/anncwb/vue-vben-admin/commit/035f55af9778819d72adc1700d9de56a6569b58f)) +- session timeout login logic error ([#678](https://github.com/anncwb/vue-vben-admin/issues/678)) ([132c7fb](https://github.com/anncwb/vue-vben-admin/commit/132c7fb944df255c4d76a25d6d924439f91f9c54)), closes [#673](https://github.com/anncwb/vue-vben-admin/issues/673) +- **tree:** support defaultExpandAll prop ([3ed2339](https://github.com/anncwb/vue-vben-admin/commit/3ed2339a6d75abbd6ccf723b6eaa762f9921409e)) +- **useViewHeight:** Fix the problem that useContentViewHeight does not calculate the footer ([#747](https://github.com/anncwb/vue-vben-admin/issues/747)) ([33cd8fe](https://github.com/anncwb/vue-vben-admin/commit/33cd8fe6533830176ab63ddfc4d74f75a384366c)) +- theme switching fails ([7e2ca79](https://github.com/anncwb/vue-vben-admin/commit/7e2ca79ece2f5209cb7ce4b0f5ee15012f9f51de)) + +### Features + +- **demo:** add route multi tabs show ([0e414ba](https://github.com/anncwb/vue-vben-admin/commit/0e414ba3c10b4e47a85feb1a38cae66c815719d8)), closes [#817](https://github.com/anncwb/vue-vben-admin/issues/817) +- add Tree LoadData demo ([9298b3c](https://github.com/anncwb/vue-vben-admin/commit/9298b3c988c10b81d83430ca31b9ce1d98a3fad9)) +- optimize error message for api failure ([ea6834a](https://github.com/anncwb/vue-vben-admin/commit/ea6834aeec3ef56d411b2c10a474f75d3d7bfdfc)) +- **api-select:** auto refetch after params changed ([50207ad](https://github.com/anncwb/vue-vben-admin/commit/50207ad702ef3faca1e27c873c89132ab92fae8e)) +- **app-search:** auto focus on show ([1ae6362](https://github.com/anncwb/vue-vben-admin/commit/1ae636296df2cf99e8a777f053c539c50e6ad49a)) +- **axios:** added authenticationScheme configuration,fix [#774](https://github.com/anncwb/vue-vben-admin/issues/774) ([b6d5b07](https://github.com/anncwb/vue-vben-admin/commit/b6d5b0796de4d0b66c0f33c335ec991d44f64ef2)) +- **demo:** `switch` use in table ([46899aa](https://github.com/anncwb/vue-vben-admin/commit/46899aa3cd6b1616c42ac263a28af75be839f6a0)) +- **demo:** added guide page example ([d196340](https://github.com/anncwb/vue-vben-admin/commit/d196340d270d2becbf2cc81b7d4f09273381bd09)) +- **echarts:** add getInstance for useECharts ([fb6c76d](https://github.com/anncwb/vue-vben-admin/commit/fb6c76db535bd0c6305d03c0cff876a1f079100b)) +- **modal:** add closeModal for useModal ([6d5f9aa](https://github.com/anncwb/vue-vben-admin/commit/6d5f9aa699c5da8af6bf5841baddc4a8bd603917)) +- **modal:** add redoModalHeight for useModalInner ([f732b56](https://github.com/anncwb/vue-vben-admin/commit/f732b569042f7fe77c85cb295538ddd85561f7e9)) +- **preview:** added createImgPreview picture preview function ([305630e](https://github.com/anncwb/vue-vben-admin/commit/305630e3fd886b3f690f890a934a8a6ba224fba1)) +- **project-setting:** added sessionTimeoutProcessing project configuration item,fix [#772](https://github.com/anncwb/vue-vben-admin/issues/772) ([0d07084](https://github.com/anncwb/vue-vben-admin/commit/0d0708409c4adbe7a0c5e33abf5307031147eaeb)) +- **table:** add editable DatePicker & TimePicker ([#654](https://github.com/anncwb/vue-vben-admin/issues/654)) ([93006c7](https://github.com/anncwb/vue-vben-admin/commit/93006c7dc7b5243b26637f444c8057c95935e622)) +- **table:** add updateTableDataRecord method ([8e4f486](https://github.com/anncwb/vue-vben-admin/commit/8e4f486fcf835f0b6f2a95676dba268ffdd0566e)) +- **table:** editable component text align ([8eaf575](https://github.com/anncwb/vue-vben-admin/commit/8eaf57562610a833c8083ae9957f458319d1cc93)) +- **table:** support columns-change event ([125a7d1](https://github.com/anncwb/vue-vben-admin/commit/125a7d14831642c9cbb2e4b3e75953c3b2e2cdef)) +- **table:** support custom update on row editing ([fe2bcfc](https://github.com/anncwb/vue-vben-admin/commit/fe2bcfc6f74159c355f3be153a316869fdb8b644)), closes [#646](https://github.com/anncwb/vue-vben-admin/issues/646) +- **table:** updateTableDataRecord support functional rowKey ([448a4c2](https://github.com/anncwb/vue-vben-admin/commit/448a4c2809672480f8f635d7cc4661554112598a)) +- **table-action:** add stopButtonPropagation prop ([808012b](https://github.com/anncwb/vue-vben-admin/commit/808012b544b8c6f3cf467f42653c2783dbe8be6b)), closes [#699](https://github.com/anncwb/vue-vben-admin/issues/699) +- **table-img:** support simple show mode and more props ([19d8e01](https://github.com/anncwb/vue-vben-admin/commit/19d8e01e11644c66222f137abd05940cbdec0bb6)) +- **test:** add jest test suite ([f6fe1dd](https://github.com/anncwb/vue-vben-admin/commit/f6fe1dd62df231ccbd063db0d32359b48aa5c76b)) +- **use-drawer:** add closeDrawer function ([639520a](https://github.com/anncwb/vue-vben-admin/commit/639520ad5ddf829875ab517067abf2b45ebc04c2)) +- add CropperAvatar component ([8e410fc](https://github.com/anncwb/vue-vben-admin/commit/8e410fc6401847d8e5545468b5ce6fd7ce9fc5cc)) +- **tabs:** add setTabTitle method ([#680](https://github.com/anncwb/vue-vben-admin/issues/680)) ([5ddccf6](https://github.com/anncwb/vue-vben-admin/commit/5ddccf6ba28453b9a35355d53d0db65f1a8876bc)) +- **tinymce:** support dark theme and I18n ([83c9cd7](https://github.com/anncwb/vue-vben-admin/commit/83c9cd77421e9c0888a41e2d8dcbca816da67488)) +- **Tinymce:** add dynamics to the read-only state of the rich text editor ([#725](https://github.com/anncwb/vue-vben-admin/issues/725)) ([efce482](https://github.com/anncwb/vue-vben-admin/commit/efce482b3215ddf9ed588f63a218d5f76939e947)) +- **tree:** add defaultExpandLevel prop ([6edca1c](https://github.com/anncwb/vue-vben-admin/commit/6edca1c19c3b0772f9ab82a7b09251a74fff2173)), closes [#672](https://github.com/anncwb/vue-vben-admin/issues/672) + +### Performance Improvements + +- **component:** optimize tree and upload components ([3f6920f](https://github.com/anncwb/vue-vben-admin/commit/3f6920f7a9775fc06a34dead90b1724b23b7759c)) +- **cropper-avatar:** code optimization ([6dbbdba](https://github.com/anncwb/vue-vben-admin/commit/6dbbdbac76c2c3795e12dd346f6310d1b70f6a7d)) +- **i18n:** improve circular dependencies ([d677729](https://github.com/anncwb/vue-vben-admin/commit/d677729acbe2c024ab13cf490b205528507c4823)) +- **i18n:** improve warning prompt ([6ef62ba](https://github.com/anncwb/vue-vben-admin/commit/6ef62ba6ea7f5613a1fec982b30fe6b0f478bf59)) +- **locale:** reduce the number of multilingual files ([0acc4ab](https://github.com/anncwb/vue-vben-admin/commit/0acc4ab2dd70a239bd13929edede02b283feb7c2)) +- **pagewrapper:** 优化 PageWrapper 的高度自适应表现使用 getViewportOffset 替代 useContentViewHeight ([#792](https://github.com/anncwb/vue-vben-admin/issues/792)) ([4d8e398](https://github.com/anncwb/vue-vben-admin/commit/4d8e39857ea59fff99e69832b4a8cabf3a424c24)) +- **PageWrapper:** fix the height calculation problem when footer and global footer are opened at the same time ([#760](https://github.com/anncwb/vue-vben-admin/issues/760)) ([ab2c7ef](https://github.com/anncwb/vue-vben-admin/commit/ab2c7efe6994dacfe0ff407783f2c3b246427bfc)) +- **utils:** mitt default export is changed from Class to Function ([d3d620f](https://github.com/anncwb/vue-vben-admin/commit/d3d620f4fc75dd69270e4d090a71d426701272ef)) +- add createImgPreview func ([#713](https://github.com/anncwb/vue-vben-admin/issues/713)) ([b7c7c46](https://github.com/anncwb/vue-vben-admin/commit/b7c7c46853d332641d116d818e657447884784f3)) +- optimize components and add comments ([55e9d9f](https://github.com/anncwb/vue-vben-admin/commit/55e9d9fc2953643cec95c74b6ed34b0e68641fb6)) + +### Reverts + +- **axios:** remove baseUrl config ([61d4efd](https://github.com/anncwb/vue-vben-admin/commit/61d4efd55a8b4f09990b5f1888e23ead43958164)) + +## [2.5.1](https://github.com/anncwb/vue-vben-admin/compare/v2.4.0...v2.5.1) (2021-06-26) + +### Bug Fixes + +- fix antdv console warning ([480cfb9](https://github.com/anncwb/vue-vben-admin/commit/480cfb914e78c06eb7784e33465ed91b7d4c3eee)) +- fix defHttp baseUrl work ([d5f9919](https://github.com/anncwb/vue-vben-admin/commit/d5f9919b60fdd7d5c435129e8db519c0bbd37529)) +- **api:** select api type error ([b387681](https://github.com/anncwb/vue-vben-admin/commit/b387681c00ac018f5bc6a9251009ddffe37acae6)) +- **api-select:** ensure that the onchange function parameters are correct ([fa64fc8](https://github.com/anncwb/vue-vben-admin/commit/fa64fc8a622832b87fdf672965d55d543b5929a2)) +- **api-select:** loss option data on event callback ([c5f2577](https://github.com/anncwb/vue-vben-admin/commit/c5f2577f515e7ae96b27b509e5dd4b3317fcb7b4)), closes [#733](https://github.com/anncwb/vue-vben-admin/issues/733) +- **ApiSelect demo:** add demo about ApiSelect's use ([#757](https://github.com/anncwb/vue-vben-admin/issues/757)) ([a03d3cc](https://github.com/anncwb/vue-vben-admin/commit/a03d3cc60c770eba644c1f3837850a2c1c015029)) +- **avatar:** mock data and Account center style ([2066f66](https://github.com/anncwb/vue-vben-admin/commit/2066f669715491f3e91ac6d0e905cd2b3e80b58d)) +- **axios:** make sure that the parameter is an object before processing, fix [#660](https://github.com/anncwb/vue-vben-admin/issues/660) ([834fa7e](https://github.com/anncwb/vue-vben-admin/commit/834fa7eb9c8aff252e083d38fdab4f6f53b4d43a)) +- **axios:** transformRequestHook logic error ([b69dcd7](https://github.com/anncwb/vue-vben-admin/commit/b69dcd79d742fd171302ce0f48c7750d60da217f)) +- **code-editor:** fix CodeEditor style problem, fix [#655](https://github.com/anncwb/vue-vben-admin/issues/655) ([5662804](https://github.com/anncwb/vue-vben-admin/commit/566280422de0537c4e31496eaaa95a9d51fe9458)) +- **codeeditor:** empty value set failed.fixed:[#659](https://github.com/anncwb/vue-vben-admin/issues/659) ([ba2bebb](https://github.com/anncwb/vue-vben-admin/commit/ba2bebb4069085817a90d065ed5877fdb50a8039)) +- **codeMirror:** fix the JsonEditor embedded in the bullet frame causing the style to be disordered ([#668](https://github.com/anncwb/vue-vben-admin/issues/668)) ([e1123a2](https://github.com/anncwb/vue-vben-admin/commit/e1123a2ccb5d5450a5072c19e5508a5dc0f14423)) +- **demo:** `breadcrumb` route invalid redirect ([84d9300](https://github.com/anncwb/vue-vben-admin/commit/84d9300e52fa73da575591aa4b71858a7e459c8c)) +- **demo:** account list page validate and save ([21f7a85](https://github.com/anncwb/vue-vben-admin/commit/21f7a854fe2455315287d04e895661ff739bce17)) +- **demo:** fix basic form page style ([8b6e07b](https://github.com/anncwb/vue-vben-admin/commit/8b6e07b768f110f13b4f2efa6c46e03266667a8c)) +- **demo:** make sure the map https resource is correct ([7b9cd09](https://github.com/anncwb/vue-vben-admin/commit/7b9cd09ad8a50c45b2e661e07953d786d82f367d)) +- **demo:** style error,fix [#806](https://github.com/anncwb/vue-vben-admin/issues/806) ([a2d8be3](https://github.com/anncwb/vue-vben-admin/commit/a2d8be3ab29da88126f3ba971f6893cb12327759)) +- **demo-form:** add fieldMapToTime example,fix [#807](https://github.com/anncwb/vue-vben-admin/issues/807) ([a2a75a0](https://github.com/anncwb/vue-vben-admin/commit/a2a75a097ff6c9df12471eff0d62d44d2b88cfff)) +- **design:** correct tailwind configuration,fix [#800](https://github.com/anncwb/vue-vben-admin/issues/800) ([aec230c](https://github.com/anncwb/vue-vben-admin/commit/aec230ca19d541079b64c54ba00596ef9cd92ca0)) +- **dropdown:** icon and trigger work unexpected ([60b80c9](https://github.com/anncwb/vue-vben-admin/commit/60b80c96e82da9101d56b2e195e9e7571de11f0a)), closes [#796](https://github.com/anncwb/vue-vben-admin/issues/796) [#787](https://github.com/anncwb/vue-vben-admin/issues/787) +- **flow-chart:** fix drag and drop menu loss ([fa828fd](https://github.com/anncwb/vue-vben-admin/commit/fa828fd972efeea87f364be76a1139ae53ec20d8)) +- **form:** fix form update problem ([bcad95d](https://github.com/anncwb/vue-vben-admin/commit/bcad95d32a08a73f84ecbabab409cd64159f4077)), closes [#720](https://github.com/anncwb/vue-vben-admin/issues/720) +- **form:** loss args on component change event ([513823b](https://github.com/anncwb/vue-vben-admin/commit/513823bfbd3e8acc68098e0708c34bff2dd8dba6)) +- **form:** radioButtonGroup value support boolean ([9e2aa20](https://github.com/anncwb/vue-vben-admin/commit/9e2aa20daa08d2902cb5d56c1560306947e44939)) +- **form:** radioButtonGroup value support number ([bbddf30](https://github.com/anncwb/vue-vben-admin/commit/bbddf30e96feb1ab048323d93d3b8c1b18857acd)) +- **form:** schemas update problem ([808328d](https://github.com/anncwb/vue-vben-admin/commit/808328dc7e56b1cc07b678d501d9589290173443)), closes [#688](https://github.com/anncwb/vue-vben-admin/issues/688) +- **keep-alive:** tablist cache updating effect ([d62d0ca](https://github.com/anncwb/vue-vben-admin/commit/d62d0ca08cff442c23eb9265851b066a2f24afa8)), closes [#695](https://github.com/anncwb/vue-vben-admin/issues/695) +- **layout:** fix class loss ([d018363](https://github.com/anncwb/vue-vben-admin/commit/d018363ddcd68189a18829a2b2560f3b98da58a6)) +- **layout:** fix style compatibility issues ([905e5b7](https://github.com/anncwb/vue-vben-admin/commit/905e5b714b582548f32feca723012124343686a6)) +- **layout:** props warn ([#756](https://github.com/anncwb/vue-vben-admin/issues/756)) ([bbce002](https://github.com/anncwb/vue-vben-admin/commit/bbce002be170c52db984647c931db88d7724cb52)) +- **lock:** fix lock modal height ([40e3cb0](https://github.com/anncwb/vue-vben-admin/commit/40e3cb043c90a8343fa44a32acad2cb77de732da)), closes [#701](https://github.com/anncwb/vue-vben-admin/issues/701) +- **log:** fix Wrong version number ([#653](https://github.com/anncwb/vue-vben-admin/issues/653)) ([4f0d45f](https://github.com/anncwb/vue-vben-admin/commit/4f0d45f1df48755eadc0b09fa19762ee68f9abd1)) +- **login:** login page modal style fixed: [#662](https://github.com/anncwb/vue-vben-admin/issues/662) ([#666](https://github.com/anncwb/vue-vben-admin/issues/666)) ([b218f10](https://github.com/anncwb/vue-vben-admin/commit/b218f10e25a9364c399a5fe42eedb549f57c01ea)) +- **menu:** fix the jitter problem of menu folding animation,fix [#732](https://github.com/anncwb/vue-vben-admin/issues/732) ([4c89ea7](https://github.com/anncwb/vue-vben-admin/commit/4c89ea7474f4315870df1790f99f3e431f343b90)) +- **mock:** make sure ignore matches the file correctly, fix [#745](https://github.com/anncwb/vue-vben-admin/issues/745) ([a222ec8](https://github.com/anncwb/vue-vben-admin/commit/a222ec8553f9b4477a43a8f7d113b5646fbfc373)) +- **mock:** menu list api loss `type` field ([4185412](https://github.com/anncwb/vue-vben-admin/commit/41854121f3713dbde236afd3a416e9f27bd0c673)) +- **mock:** type error ([7c1ffa3](https://github.com/anncwb/vue-vben-admin/commit/7c1ffa3d23de508a8d1590985806cb7a484b24e5)) +- **modal:** add v-model support for visible ([de12bab](https://github.com/anncwb/vue-vben-admin/commit/de12babd314ac831d3cb645f42dbf8a476075623)) +- **modal:** ensure that the full screen height is calculated correctly ([1c1755c](https://github.com/anncwb/vue-vben-admin/commit/1c1755cf5b4ada7263c05ddf4105abb52a2abb2f)) +- **modal:** ensure that the shutdown event is not triggered multiple times ([655b743](https://github.com/anncwb/vue-vben-admin/commit/655b74323653147943cbde2352208cb765c82b8a)) +- **modal:** redoModalHeight not work as expected ([5d554f1](https://github.com/anncwb/vue-vben-admin/commit/5d554f184f7b61774d1a1b2e61451677b38505de)) +- **page:** `basic form` action btns should be in line ([6c4f947](https://github.com/anncwb/vue-vben-admin/commit/6c4f947386c181f45253c94e4ef735d29a253053)) +- **pop-confirm:** fix event working unexpected ([a6ef771](https://github.com/anncwb/vue-vben-admin/commit/a6ef771fcce14c3644c965afaa69b3a17d0a7087)) +- **radio-button:** fix RadioButton `disabled` support ([ee384b1](https://github.com/anncwb/vue-vben-admin/commit/ee384b1fa7e387b3680e9d54cbe4a1e2f15ec750)), closes [#710](https://github.com/anncwb/vue-vben-admin/issues/710) +- **route:** dynamically introduce components error ([c6b766d](https://github.com/anncwb/vue-vben-admin/commit/c6b766d8ea902294ab1f7e4a06781f2bcfdd1f0b)) +- **router:** loss `directory` route ([df8cd86](https://github.com/anncwb/vue-vben-admin/commit/df8cd860514f32f44847dcf724f0737ed4d8b9e0)), closes [#722](https://github.com/anncwb/vue-vben-admin/issues/722) +- **store:** fix type error after pinia version upgrade ([e8d6f88](https://github.com/anncwb/vue-vben-admin/commit/e8d6f8851efd7076946486864936f1797280d3ba)) +- **table:** wrong indeterminate state ([495b1da](https://github.com/anncwb/vue-vben-admin/commit/495b1da385e9b6428d2b994669d2065722445923)) +- **table:** event editCancel loss params ([8d22231](https://github.com/anncwb/vue-vben-admin/commit/8d22231a5fa4afed19201a4a4e5c29d674498516)) +- **table:** fix table jitter problem ([8eba7fb](https://github.com/anncwb/vue-vben-admin/commit/8eba7fb52786d1977e4cb7b67673d74c91c5c827)) +- **table:** getDataSource not worked on empty data ([e78af6f](https://github.com/anncwb/vue-vben-admin/commit/e78af6f228e25f052dc4c5a1859a6db50e0b112e)), closes [#752](https://github.com/anncwb/vue-vben-admin/issues/752) +- **table:** make sure the table width is correct, fix [#593](https://github.com/anncwb/vue-vben-admin/issues/593) ([d73d43e](https://github.com/anncwb/vue-vben-admin/commit/d73d43ed91f30957cfd202c51552ca40a19cef08)) +- **table:** settings indeterminate state effect ([4fd2051](https://github.com/anncwb/vue-vben-admin/commit/4fd2051bc0403bfc5345ed6a5fc283a372ef7a92)) +- **table:** support change event ([9f4d171](https://github.com/anncwb/vue-vben-admin/commit/9f4d1719caa76de94e6362c16e4df3ac28df253c)), closes [#677](https://github.com/anncwb/vue-vben-admin/issues/677) +- **table:** treeTable editable error ([4ae39c5](https://github.com/anncwb/vue-vben-admin/commit/4ae39c53b49532fc6c31086a31e30429d2e236ed)), closes [#811](https://github.com/anncwb/vue-vben-admin/issues/811) +- **table:** try to get close to the form stuck ([d81481c](https://github.com/anncwb/vue-vben-admin/commit/d81481c52186145dac130aaa1594f0ba8db4d392)) +- **table:** useTable support onChange ([9f5085c](https://github.com/anncwb/vue-vben-admin/commit/9f5085c9f9f46b09391156b17091c1771bc13026)) +- **table-action:** fix the split line style is missing,fix [#674](https://github.com/anncwb/vue-vben-admin/issues/674) ([b1cb863](https://github.com/anncwb/vue-vben-admin/commit/b1cb86350253dc5be095466966d9469775f4395d)) +- **Tinymce:** Read only status upload button can also be used ([#718](https://github.com/anncwb/vue-vben-admin/issues/718)) ([966571b](https://github.com/anncwb/vue-vben-admin/commit/966571bdcb11c2729ab9ce212bd3e195f7bf3a59)) +- **upload:** ensure preview items valid ([4376928](https://github.com/anncwb/vue-vben-admin/commit/437692869a232ee65c300c65ee473557ae0913c7)) +- **upload:** make sure to carry custom parameters, fix [#802](https://github.com/anncwb/vue-vben-admin/issues/802) ([c4b22a2](https://github.com/anncwb/vue-vben-admin/commit/c4b22a225d0088d87be0c0068f543366312521db)) +- **use-message:** `content` not support vNode ([154ebc3](https://github.com/anncwb/vue-vben-admin/commit/154ebc3d96f73bb3ceab99ea0229a3619d585aba)) +- build error ([5212ea7](https://github.com/anncwb/vue-vben-admin/commit/5212ea79b43c832a5136354b549de8f89b6e2156)) +- ensure that roleList is not empty ([aebad61](https://github.com/anncwb/vue-vben-admin/commit/aebad61b3d3e11aaf720b37e762e53e2e6999d3c)) +- fix darkModeSwitch switch failure ([34a8054](https://github.com/anncwb/vue-vben-admin/commit/34a80542de670f0385dffaf5bf64bb9c3f6b90da)) +- fix if getDropdownList.length==0 show Dropdown component ([21c771b](https://github.com/anncwb/vue-vben-admin/commit/21c771b59cb45defbff37de21c5c1950370b8f92)) +- fix Login Page LocalePicker showLocale condition ([d683b0f](https://github.com/anncwb/vue-vben-admin/commit/d683b0f1e85b85b07090feba4ac7f741bd3bd482)) +- fix node12 version data mock error ([644dbe3](https://github.com/anncwb/vue-vben-admin/commit/644dbe315bb03ea1641a682359873237208a5303)) +- Fix the problem that the `lang` attribute of `HTML` will not be set when it is first loaded ([#682](https://github.com/anncwb/vue-vben-admin/issues/682)) ([eca8907](https://github.com/anncwb/vue-vben-admin/commit/eca8907a11c28d816c3da5a0667f45a38a499012)) +- login failed ([035f55a](https://github.com/anncwb/vue-vben-admin/commit/035f55af9778819d72adc1700d9de56a6569b58f)) +- session timeout login logic error ([#678](https://github.com/anncwb/vue-vben-admin/issues/678)) ([132c7fb](https://github.com/anncwb/vue-vben-admin/commit/132c7fb944df255c4d76a25d6d924439f91f9c54)), closes [#673](https://github.com/anncwb/vue-vben-admin/issues/673) +- **tree:** support defaultExpandAll prop ([3ed2339](https://github.com/anncwb/vue-vben-admin/commit/3ed2339a6d75abbd6ccf723b6eaa762f9921409e)) +- **useViewHeight:** Fix the problem that useContentViewHeight does not calculate the footer ([#747](https://github.com/anncwb/vue-vben-admin/issues/747)) ([33cd8fe](https://github.com/anncwb/vue-vben-admin/commit/33cd8fe6533830176ab63ddfc4d74f75a384366c)) +- theme switching fails ([7e2ca79](https://github.com/anncwb/vue-vben-admin/commit/7e2ca79ece2f5209cb7ce4b0f5ee15012f9f51de)) + +### Features + +- **demo:** add route multi tabs show ([0e414ba](https://github.com/anncwb/vue-vben-admin/commit/0e414ba3c10b4e47a85feb1a38cae66c815719d8)), closes [#817](https://github.com/anncwb/vue-vben-admin/issues/817) +- add Tree LoadData demo ([9298b3c](https://github.com/anncwb/vue-vben-admin/commit/9298b3c988c10b81d83430ca31b9ce1d98a3fad9)) +- optimize error message for api failure ([ea6834a](https://github.com/anncwb/vue-vben-admin/commit/ea6834aeec3ef56d411b2c10a474f75d3d7bfdfc)) +- **api-select:** auto refetch after params changed ([50207ad](https://github.com/anncwb/vue-vben-admin/commit/50207ad702ef3faca1e27c873c89132ab92fae8e)) +- **app-search:** auto focus on show ([1ae6362](https://github.com/anncwb/vue-vben-admin/commit/1ae636296df2cf99e8a777f053c539c50e6ad49a)) +- **axios:** added authenticationScheme configuration,fix [#774](https://github.com/anncwb/vue-vben-admin/issues/774) ([b6d5b07](https://github.com/anncwb/vue-vben-admin/commit/b6d5b0796de4d0b66c0f33c335ec991d44f64ef2)) +- **demo:** `switch` use in table ([46899aa](https://github.com/anncwb/vue-vben-admin/commit/46899aa3cd6b1616c42ac263a28af75be839f6a0)) +- **demo:** added guide page example ([d196340](https://github.com/anncwb/vue-vben-admin/commit/d196340d270d2becbf2cc81b7d4f09273381bd09)) +- **echarts:** add getInstance for useECharts ([fb6c76d](https://github.com/anncwb/vue-vben-admin/commit/fb6c76db535bd0c6305d03c0cff876a1f079100b)) +- **modal:** add closeModal for useModal ([6d5f9aa](https://github.com/anncwb/vue-vben-admin/commit/6d5f9aa699c5da8af6bf5841baddc4a8bd603917)) +- **modal:** add redoModalHeight for useModalInner ([f732b56](https://github.com/anncwb/vue-vben-admin/commit/f732b569042f7fe77c85cb295538ddd85561f7e9)) +- **preview:** added createImgPreview picture preview function ([305630e](https://github.com/anncwb/vue-vben-admin/commit/305630e3fd886b3f690f890a934a8a6ba224fba1)) +- **project-setting:** added sessionTimeoutProcessing project configuration item,fix [#772](https://github.com/anncwb/vue-vben-admin/issues/772) ([0d07084](https://github.com/anncwb/vue-vben-admin/commit/0d0708409c4adbe7a0c5e33abf5307031147eaeb)) +- **table:** add editable DatePicker & TimePicker ([#654](https://github.com/anncwb/vue-vben-admin/issues/654)) ([93006c7](https://github.com/anncwb/vue-vben-admin/commit/93006c7dc7b5243b26637f444c8057c95935e622)) +- **table:** add updateTableDataRecord method ([8e4f486](https://github.com/anncwb/vue-vben-admin/commit/8e4f486fcf835f0b6f2a95676dba268ffdd0566e)) +- **table:** editable component text align ([8eaf575](https://github.com/anncwb/vue-vben-admin/commit/8eaf57562610a833c8083ae9957f458319d1cc93)) +- **table:** support columns-change event ([125a7d1](https://github.com/anncwb/vue-vben-admin/commit/125a7d14831642c9cbb2e4b3e75953c3b2e2cdef)) +- **table:** support custom update on row editing ([fe2bcfc](https://github.com/anncwb/vue-vben-admin/commit/fe2bcfc6f74159c355f3be153a316869fdb8b644)), closes [#646](https://github.com/anncwb/vue-vben-admin/issues/646) +- **table:** updateTableDataRecord support functional rowKey ([448a4c2](https://github.com/anncwb/vue-vben-admin/commit/448a4c2809672480f8f635d7cc4661554112598a)) +- **table-action:** add stopButtonPropagation prop ([808012b](https://github.com/anncwb/vue-vben-admin/commit/808012b544b8c6f3cf467f42653c2783dbe8be6b)), closes [#699](https://github.com/anncwb/vue-vben-admin/issues/699) +- **table-img:** support simple show mode and more props ([19d8e01](https://github.com/anncwb/vue-vben-admin/commit/19d8e01e11644c66222f137abd05940cbdec0bb6)) +- **test:** add jest test suite ([f6fe1dd](https://github.com/anncwb/vue-vben-admin/commit/f6fe1dd62df231ccbd063db0d32359b48aa5c76b)) +- **use-drawer:** add closeDrawer function ([639520a](https://github.com/anncwb/vue-vben-admin/commit/639520ad5ddf829875ab517067abf2b45ebc04c2)) +- add CropperAvatar component ([8e410fc](https://github.com/anncwb/vue-vben-admin/commit/8e410fc6401847d8e5545468b5ce6fd7ce9fc5cc)) +- **tabs:** add setTabTitle method ([#680](https://github.com/anncwb/vue-vben-admin/issues/680)) ([5ddccf6](https://github.com/anncwb/vue-vben-admin/commit/5ddccf6ba28453b9a35355d53d0db65f1a8876bc)) +- **tinymce:** support dark theme and I18n ([83c9cd7](https://github.com/anncwb/vue-vben-admin/commit/83c9cd77421e9c0888a41e2d8dcbca816da67488)) +- **Tinymce:** add dynamics to the read-only state of the rich text editor ([#725](https://github.com/anncwb/vue-vben-admin/issues/725)) ([efce482](https://github.com/anncwb/vue-vben-admin/commit/efce482b3215ddf9ed588f63a218d5f76939e947)) +- **tree:** add defaultExpandLevel prop ([6edca1c](https://github.com/anncwb/vue-vben-admin/commit/6edca1c19c3b0772f9ab82a7b09251a74fff2173)), closes [#672](https://github.com/anncwb/vue-vben-admin/issues/672) + +### Performance Improvements + +- **component:** optimize tree and upload components ([3f6920f](https://github.com/anncwb/vue-vben-admin/commit/3f6920f7a9775fc06a34dead90b1724b23b7759c)) +- **cropper-avatar:** code optimization ([6dbbdba](https://github.com/anncwb/vue-vben-admin/commit/6dbbdbac76c2c3795e12dd346f6310d1b70f6a7d)) +- **i18n:** improve circular dependencies ([d677729](https://github.com/anncwb/vue-vben-admin/commit/d677729acbe2c024ab13cf490b205528507c4823)) +- **i18n:** improve warning prompt ([6ef62ba](https://github.com/anncwb/vue-vben-admin/commit/6ef62ba6ea7f5613a1fec982b30fe6b0f478bf59)) +- **locale:** reduce the number of multilingual files ([0acc4ab](https://github.com/anncwb/vue-vben-admin/commit/0acc4ab2dd70a239bd13929edede02b283feb7c2)) +- **pagewrapper:** 优化 PageWrapper 的高度自适应表现使用 getViewportOffset 替代 useContentViewHeight ([#792](https://github.com/anncwb/vue-vben-admin/issues/792)) ([4d8e398](https://github.com/anncwb/vue-vben-admin/commit/4d8e39857ea59fff99e69832b4a8cabf3a424c24)) +- **PageWrapper:** fix the height calculation problem when footer and global footer are opened at the same time ([#760](https://github.com/anncwb/vue-vben-admin/issues/760)) ([ab2c7ef](https://github.com/anncwb/vue-vben-admin/commit/ab2c7efe6994dacfe0ff407783f2c3b246427bfc)) +- **utils:** mitt default export is changed from Class to Function ([d3d620f](https://github.com/anncwb/vue-vben-admin/commit/d3d620f4fc75dd69270e4d090a71d426701272ef)) +- add createImgPreview func ([#713](https://github.com/anncwb/vue-vben-admin/issues/713)) ([b7c7c46](https://github.com/anncwb/vue-vben-admin/commit/b7c7c46853d332641d116d818e657447884784f3)) +- optimize components and add comments ([55e9d9f](https://github.com/anncwb/vue-vben-admin/commit/55e9d9fc2953643cec95c74b6ed34b0e68641fb6)) + +### Reverts + +- **axios:** remove baseUrl config ([61d4efd](https://github.com/anncwb/vue-vben-admin/commit/61d4efd55a8b4f09990b5f1888e23ead43958164)) + # [2.5.0](https://github.com/anncwb/vue-vben-admin/compare/v2.4.0...v2.5.0) (2021-06-20) ### Bug Fixes diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md index c25d4e3b..3181b20d 100644 --- a/CHANGELOG.zh_CN.md +++ b/CHANGELOG.zh_CN.md @@ -1,3 +1,216 @@ +## 2.7.2(2021-09-14) + +### ✨ Features + +- **BasicForm** 表单组件新增`Divider`,用于较长表单的区域分割 +- **BasicTable** + - 单元格编辑新增提交回调,将根据回调函数返回的结果来决定是否将数据提交到表格 + - 行编辑添加校验方法,允许只校验而不提交值,以便异步保存数据成功后才提交倒表格 + - 修复`rowClassName`属性无法和`striped`同时使用的问题 +- 新增组件 **MarkdownViewer** 用于显示 Markdown 格式的富文本 + +### 🐛 Bug Fixes + +- **CodeEditor** 修复 JSON 编辑器在格式化无效 JSON 文本时会抛出异常的问题 +- **Tinymce** 修复 inline 模式在一些场景下会出现异常的问题 +- **BasicTable** + - 修复可编辑单元格的内容为空时,不会显示编辑图标的问题 + - 修复表尾合计行与表格主体部分的列有时候未能对齐的问题 +- **MarkDown** 修复初始 value 属性的值不起作用的问题 +- **BasicUpload** 修复`accept`属性不支持`MIME`及点开头的后缀名的问题 +- **ApiSelect** 修复`value`属性的类型定义问题 +- **其它** + - 修复部分封装组件在使用插槽时报错的问题 + - 修复`useECharts`的`theme`参数不起作用的问题 + - 修复`Token`失效时,按 F5 刷新页面可能会出现页面加载异常的问题 + - 修复`useRedo`的不当调用可能会导致重定向`path`异常的问题 + - 修复`vite`自定义模式名称不支持下划线的问题 + +## 2.7.1(2021-08-16) + +- 升级 vue 3.2,如果运行失败,删除 node_modules 后重装即可 + +### ✨ Features + +- **BasicTree** 添加搜索功能相关属性和方法 +- **BasicForm** 新增`alwaysShowLines`用于设置折叠时保留显示的行数 + +### 🐛 Bug Fixes + +- **Cropper** 修复未能及时销毁的问题 +- **BasicTable** + - 修复`CellFormat`无法使用`Map`类型数据的问题 + - 修复可编辑单元格未能正确显示`0`值的问题 + - 修复 selection-change 事件在取消勾选时未能正确触发的问题 + - 修复浅色主题下的全屏状态背景颜色不正确的问题 + - 修复`getSelectRows`不支持远程数据跨页选择时获取完整数据的问题 + - 修复在`editComponentProps`中为编辑组件提供的`size`属性无效的问题 +- **Qrcode** 修复二维码组件在创建时未能及时绘制的问题 +- **BasicModal** 修复`helpMessage`属性不起作用的问题 +- **BasicButton** 修复按钮样式表现与 antd 官方不一致的问题 +- **其它** 修复`useRedo`(重新加载当前路由)会丢失路由`params`数据的问题 + +## 2.7.0(2021-08-03) + +## (破坏性更新) Breaking changes + +- 将项目`tailwindcss`还原回`windicss`,尝试了`tailwindcss`,问题可能还挺多,先切换回`windicss`提高开发效率,切换成本较低。 + - 目前项目不兼容地方有 + - `xl:!m-4` 之类的写法需要改为`!xl:m-4`,注意只有`!`这个不兼容,没用到则不用改 + - 内存溢出问题可能还在(频率低,重启下即可,重启 vite 较快) + +### ✨ Features + +- **Preview** 添加新的属性及事件 +- **Dark Theme** 新增对 tailwindcss 夜间模式的支持 +- **其它** 为 useLoading 添加 setTip 方法 + +### 🐛 Bug Fixes + +- **ApiTreeSelect** 修复未能正确监听`params`变化的问题 +- **ImgRotateDragVerify** 修复组件`resume`方法无法调用的问题 +- **TableAction** 修复 stopButtonPropagation 属性某些情况下不起作用的问题 +- **PageWrapper** 修复`class`属性无效的问题 +- **BasicTree** 修复`checkAll`方法会影响到`disabled`状态节点的问题 +- **BasicTable** + - 修复可编辑单元格不支持`ellipsis`配置的问题 + - 修复全屏模式下看不到子组件弹出层(popconfirm 以及 select、treeSelect 等编辑组件)的问题 + - 修复启用`expandRowByClick`时,点击不可展开的行可能会导致样式错误的问题 + - 修复`pagination`属性动态改变不生效的问题 + - 修复`getSelectRows`不支持树形表格子级数据的问题 +- **Dark Theme** 黑暗主题下的配色问题修正 + - 修复`Tree`组件被选中节点的背景颜色 + - 修复`Alert`组件的颜色配置 + - 修复禁用状态下的`link`类型的按钮颜色问题 + - 修复`Tree`已勾选的复选框的样式问题 +- **其它** 修复 useScript 未能自动移除 script 节点的问题 + +## 2.6.1(2021-07-19) + +### ✨ Features + +- **NoticeList** 添加分页、超长自动省略、标题点击事件、标题删除线等功能 +- **MixSider** 优化 Mix 菜单布局时 底部折叠按钮 的样式,与其它菜单布局时的风格保持一致 +- **ApiTreeSelect** 扩展`antdv`的`TreeSelect`组件,支持远程数据源,用法类似`ApiSelect` +- **BasicTable** + - 新增`ApiTreeSelect`编辑组件 + - 新增`headerTop`插槽 +- **其它** 可以为不同的用户指定不同的后台首页: + - 在`getUserInfo`接口返回的用户信息中增加`homePath`字段(可选)即可为当前用户定制首页路径 + +### 🐛 Bug Fixes + +- **BasicTable** + - 修复滚动条样式问题(移除了滚动样式补丁) + - 修复树形表格的带有展开图标的单元格的内容对齐问题 + - 修复操作列的按钮在 disabled 状态下的颜色显示 + - 修复可编辑单元格的值不能直接通过修改`dataSource`来更新显示的问题 + - 修复使用`ApiSelect`编辑组件时的数据回显问题 + - 修复在部分场景下编辑组件可能会报`onXXX`类型错误的问题 +- **TableAction** + - 仅在 `action.tooltip`存在的情况下 才创建 Tooltip 组件 + - 修复组件内的圆形按钮内容没有居中的问题 +- **AppSearch** 修复可能会搜索隐藏菜单的问题 +- **BasicUpload** 修复处理非`array`值时报错的问题 +- **Form** 修复`FormItem`的`suffix`插槽样式问题 +- **Menu** + - 修复左侧混合菜单的悬停触发逻辑 + - 修复顶栏菜单在显示包含需要隐藏的菜单项目时出错的问题 + - 修复悬停触发模式下左侧混合菜单会在没有子菜单且被激活时直接跳转路由 +- **Breadcrumb** 修复带有重定向的菜单点击无法跳转的问题 +- **Markdown** 修复初始化异常以及不能正确地动态设置 value 的问题 +- **Modal** 确保 props 正确被传递 +- **MultipleTab** 修复可能会意外创建登录路由标签的问题 +- **BasicTree** 修复搜索功能可能导致`checkedKeys`丢失的问题 +- **CodeEditor** 修复 value 不支持 v-model 用法的问题 +- **CountdownInput** 修复不支持`input`插槽的问题 +- **ApiSelect** 修复`options-change`事件参数不是`select`所使用的标准`options`数据的问题 +- **其它** + - 修复菜单默认折叠的配置不起作用的问题 + - 修复`safari`浏览器报错导致网站打不开 + - 修复在 window 上,拉取代码后 eslint 因 endOfLine 而报错问题 + - 修复因动态路由而产生的 `Vue Router warn` + +### 🎫 Chores + +- 添加 test 环境测试命令 + +## 2.6.0(2021-07-04) + +### ✨ Features + +- **Axios** 新增`withToken`配置,用于控制请求是否携带 token +- **BasicUpload** + - 新增在预览 `Modal` 中删除文件时触发`preview-delete` 事件 + - `value` 支持 `v-model` 用法 +- **Route 配置** + - 增加`ignoreRoute`用于在`ROUTE_MAPPING`或`BACK`权限模式下仅生成菜单 + - 增加`hidePathForChildren`配置,标识为子项目生成菜单时忽略本级`path` +- **TableAction** 新增`tooltip`配置,可以为按钮增加 tooltip 提示 +- **CropperAvatar** + - 新增`value`用于设置当前头像 + - 新增`onChange`用于接受头像剪裁并上传成功事件 + - 新增`btnText`、`btnProps` 用于自定义上传按钮文案和属性 + - 为剪裁`Modal`内的操作按钮添加工具提示 +- **Modal** 为右上角的操作按钮添加工具提示 + +### 🐛 Bug Fixes + +- **Modal** + - 修复点击遮罩不能关闭的问题 + - 修复 `setModalProps` 不支持设置 `defaultFullscreen` 的问题 +- **Table** + - 修复 `editComponentProps` 不支持 `onChange`的问题 + - 修复启用`clickToRowSelect`时,点击行不会触发`selection-change`事件的问题 + - 修复全局配置`fetchSetting`可能会被局部配置意外修改的问题 + - 修复`handleSearchInfoFn`的参数包含多余空白键的问题 + - 修复为 table 提供 rowSelection.onChange 时,无法手动变更 table 的选中项的问题 + - 修复滚动条在无需显示的时候仍然持续显示的问题 +- **Icon** 修复 SvgIcon 缺少部分样式的问题 +- **Menu** + - 修复路由映射模式下,单级菜单刷新不会激活 + - 修复侧边菜单底部的折叠自定义失效的问题 +- **Form** 修复`submitButtonOptions`和`resetButtonOptions`的类型定义 +- **PopConfirmButton** 移除`Button`上多余的`title` +- **Axios** 修复非`GET`请求时,无法同时提交`params`和`data`数据的问题 +- **其它** + - 修复锁屏功能可以通过刷新页面或复制 URL 打开新的浏览器标签来跳过锁定状态的问题 + - 修复多个窗口同时打开页面时,`Token` 不会同步的问题 + - 修复`ROLE`权限模式下`hasPermission`不工作的问题 +- **Table** 修复`handleSearchInfoFn`的参数包含多余空白键的问题 +- **Tailwindcss** 移除控制台警告 + +## 2.5.2(2021-06-27) + +### ⚡ Performance Improvements + +- **Icon** 移除 Icon 组件全局注册,防止特定情况下热更新问题 + +### ✨ Features + +- **Menu** 新增 `permissionMode=PermissionModeEnum.ROUTE_MAPPING`模式 + - 项目默认改为该模式,删除原有菜单文件 + - 如果之前已经写好了菜单,可以更改为`PermissionModeEnum.ROLE`模式即可 + +### 🐛 Bug Fixes + +- **Drawer** 修复`visible`状态异常 + +## 2.5.1(2021-06-26) + +### ⚡ Performance Improvements + +- 升级`vue`与`ant-design-vue`版本,解决兼容问题 +- **Tree** 性能优化 + +### 🐛 Bug Fixes + +- **Table** 修复分页抖动问题 +- **Upload** 确保携带自定义参数 +- **Dropdown** 修复 popConfirm 的图标显示问题 +- **Table** 修复树形表格的编辑事件不正常的问题 +- **Table** 修复当表格数据为空时,getDataSource 返回的值不是表格所使用的数据源的问题 + ## 2.5.0(2021-06-20) ## (破坏性更新) Breaking changes diff --git a/README.zh-CN.md b/README.zh-CN.md index 00e490f4..acb575f5 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -150,6 +150,7 @@ yarn build ## 后台整合示例 - [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 的全开源平台 ## 维护者 diff --git a/build/generate/generateModifyVars.ts b/build/generate/generateModifyVars.ts index 5710a0c0..44670e2f 100644 --- a/build/generate/generateModifyVars.ts +++ b/build/generate/generateModifyVars.ts @@ -28,7 +28,7 @@ export function generateModifyVars(dark = false) { 'success-color': '#55D187', // Success color 'error-color': '#ED6F6F', // False color 'warning-color': '#EFBD47', // Warning color - 'border-color-base': '#EEEEEE', + //'border-color-base': '#EEEEEE', 'font-size-base': '14px', // Main font size 'border-radius-base': '2px', // Component/float fillet 'link-color': primary, // Link color diff --git a/build/generate/icon/index.ts b/build/generate/icon/index.ts index a9bac80f..c78cb09f 100644 --- a/build/generate/icon/index.ts +++ b/build/generate/icon/index.ts @@ -52,19 +52,19 @@ async function generateIcon() { const { prefix } = data; const isLocal = useType === 'local'; const icons = Object.keys(data.icons).map( - (item) => `${isLocal ? prefix + ':' : ''}${item}` + (item) => `${isLocal ? prefix + ':' : ''}${item}`, ); await fs.writeFileSync( path.join(output, `icons.data.ts`), - `export default ${isLocal ? JSON.stringify(icons) : JSON.stringify({ prefix, icons })}` + `export default ${isLocal ? JSON.stringify(icons) : JSON.stringify({ prefix, icons })}`, ); prefixSet.push(prefix); } } fs.emptyDir(path.join(process.cwd(), 'node_modules/.vite')); console.log( - `✨ ${chalk.cyan(`[${pkg.name}]`)}` + ' - Icon generated successfully:' + `[${prefixSet}]` + `✨ ${chalk.cyan(`[${pkg.name}]`)}` + ' - Icon generated successfully:' + `[${prefixSet}]`, ); }); } diff --git a/build/script/buildConf.ts b/build/script/buildConf.ts index a44a1d8e..48ed4d9b 100644 --- a/build/script/buildConf.ts +++ b/build/script/buildConf.ts @@ -15,7 +15,7 @@ function createConfig( configName, config, configFileName = GLOB_CONFIG_FILE_NAME, - }: { configName: string; config: any; configFileName?: string } = { configName: '', config: {} } + }: { configName: string; config: any; configFileName?: string } = { configName: '', config: {} }, ) { try { const windowConf = `window.${configName}`; diff --git a/build/script/postBuild.ts b/build/script/postBuild.ts index 79c5e8fb..e1554bff 100644 --- a/build/script/postBuild.ts +++ b/build/script/postBuild.ts @@ -11,7 +11,7 @@ export const runBuild = async () => { // Generate configuration file if (!argvList.includes('disabled-config')) { - await runBuildConfig(); + runBuildConfig(); } console.log(`✨ ${chalk.cyan(`[${pkg.name}]`)}` + ' - build successfully!'); diff --git a/build/utils.ts b/build/utils.ts index a3059f66..58694077 100644 --- a/build/utils.ts +++ b/build/utils.ts @@ -31,30 +31,51 @@ export function wrapperEnv(envConf: Recordable): ViteEnv { if (envName === 'VITE_PROXY') { try { realName = JSON.parse(realName); - } catch (error) {} + } catch (error) { + realName = ''; + } } ret[envName] = realName; - process.env[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 = ['.env', '.env.production']) { +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 (error) {} + } catch (e) { + console.error(`Error in parsing ${item}`, e); + } }); - + const reg = new RegExp(`^(${match})`); Object.keys(envConfig).forEach((key) => { - const reg = new RegExp(`^(${match})`); if (!reg.test(key)) { Reflect.deleteProperty(envConfig, key); } diff --git a/build/vite/plugin/compress.ts b/build/vite/plugin/compress.ts index 9563679c..3ad32be1 100644 --- a/build/vite/plugin/compress.ts +++ b/build/vite/plugin/compress.ts @@ -3,12 +3,11 @@ * https://github.com/anncwb/vite-plugin-compression */ import type { Plugin } from 'vite'; - import compressPlugin from 'vite-plugin-compression'; export function configCompressPlugin( compress: 'gzip' | 'brotli' | 'none', - deleteOriginFile = false + deleteOriginFile = false, ): Plugin | Plugin[] { const compressList = compress.split(','); @@ -19,16 +18,17 @@ export function configCompressPlugin( compressPlugin({ ext: '.gz', deleteOriginFile, - }) + }), ); } + if (compressList.includes('brotli')) { plugins.push( compressPlugin({ ext: '.br', algorithm: 'brotliCompress', deleteOriginFile, - }) + }), ); } return plugins; diff --git a/build/vite/plugin/html.ts b/build/vite/plugin/html.ts index dec546cd..848190bd 100644 --- a/build/vite/plugin/html.ts +++ b/build/vite/plugin/html.ts @@ -3,9 +3,7 @@ * https://github.com/anncwb/vite-plugin-html */ import type { Plugin } from 'vite'; - import html from 'vite-plugin-html'; - import pkg from '../../../package.json'; import { GLOB_CONFIG_FILE_NAME } from '../../constant'; @@ -22,7 +20,7 @@ export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) { minify: isBuild, inject: { // Inject data into ejs template - injectData: { + data: { title: VITE_GLOB_APP_TITLE, }, // Embed the generated app.config.js file diff --git a/build/vite/plugin/imagemin.ts b/build/vite/plugin/imagemin.ts index 31bd387c..a0235732 100644 --- a/build/vite/plugin/imagemin.ts +++ b/build/vite/plugin/imagemin.ts @@ -1,6 +1,5 @@ // 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() { @@ -13,7 +12,7 @@ export function configImageminPlugin() { optimizationLevel: 7, }, mozjpeg: { - quality: 8, + quality: 20, }, pngquant: { quality: [0.8, 0.9], @@ -22,10 +21,11 @@ export function configImageminPlugin() { svgo: { plugins: [ { - removeViewBox: false, + name: 'removeViewBox', }, { - removeEmptyAttrs: false, + name: 'removeEmptyAttrs', + active: false, }, ], }, diff --git a/build/vite/plugin/index.ts b/build/vite/plugin/index.ts index 94ec6613..9c0924a0 100644 --- a/build/vite/plugin/index.ts +++ b/build/vite/plugin/index.ts @@ -1,11 +1,10 @@ import type { Plugin } 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 vueSetupExtend from 'vite-plugin-vue-setup-extend'; import { configHtmlPlugin } from './html'; import { configPwaConfig } from './pwa'; import { configMockPlugin } from './mock'; @@ -31,8 +30,13 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { vue(), // have to vueJsx(), + // support name + vueSetupExtend(), ]; + // vite-plugin-windicss + vitePlugins.push(windiCSS()); + // TODO !isBuild && vitePlugins.push(configHmrPlugin()); @@ -67,7 +71,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { // rollup-plugin-gzip vitePlugins.push( - configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE) + configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE), ); // vite-plugin-pwa diff --git a/build/vite/plugin/pwa.ts b/build/vite/plugin/pwa.ts index f5ab5ed7..90ef5bc0 100644 --- a/build/vite/plugin/pwa.ts +++ b/build/vite/plugin/pwa.ts @@ -2,7 +2,6 @@ * Zero-config PWA for Vite * https://github.com/antfu/vite-plugin-pwa */ - import { VitePWA } from 'vite-plugin-pwa'; export function configPwaConfig(env: ViteEnv) { diff --git a/build/vite/plugin/styleImport.ts b/build/vite/plugin/styleImport.ts index f09d35df..786580f8 100644 --- a/build/vite/plugin/styleImport.ts +++ b/build/vite/plugin/styleImport.ts @@ -2,11 +2,12 @@ * Introduces component library styles on demand. * https://github.com/anncwb/vite-plugin-style-import */ - import styleImport from 'vite-plugin-style-import'; export function configStyleImportPlugin(isBuild: boolean) { - if (!isBuild) return []; + if (!isBuild) { + return []; + } const styleImportPlugin = styleImport({ libs: [ { diff --git a/build/vite/plugin/theme.ts b/build/vite/plugin/theme.ts index 62cfee72..c54f1a83 100644 --- a/build/vite/plugin/theme.ts +++ b/build/vite/plugin/theme.ts @@ -33,14 +33,22 @@ export function configThemePlugin(isBuild: boolean): Plugin[] { 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 `[data-theme] ${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), @@ -48,15 +56,31 @@ export function configThemePlugin(isBuild: boolean): Plugin[] { 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': 'rgb(255 255 255 / 4%)', + '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', }, }), ]; diff --git a/commitlint.config.js b/commitlint.config.js index 7189e8f8..ac977af1 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,31 +1,6 @@ module.exports = { ignores: [(commit) => commit.includes('init')], extends: ['@commitlint/config-conventional'], - parserPreset: { - parserOpts: { - headerPattern: /^(\w*|[\u4e00-\u9fa5]*)(?:[\(\(](.*)[\)\)])?[\:\:] (.*)/, - headerCorrespondence: ['type', 'scope', 'subject'], - referenceActions: [ - 'close', - 'closes', - 'closed', - 'fix', - 'fixes', - 'fixed', - 'resolve', - 'resolves', - 'resolved', - ], - issuePrefixes: ['#'], - noteKeywords: ['BREAKING CHANGE'], - fieldPattern: /^-(.*?)-$/, - revertPattern: /^Revert\s"([\s\S]*)"\s*This reverts commit (\w*)\./, - revertCorrespondence: ['header', 'hash'], - warn() {}, - mergePattern: null, - mergeCorrespondence: null, - }, - }, rules: { 'body-leading-blank': [2, 'always'], 'footer-leading-blank': [1, 'always'], diff --git a/mock/_util.ts b/mock/_util.ts index 0eedb758..97c87564 100644 --- a/mock/_util.ts +++ b/mock/_util.ts @@ -13,7 +13,7 @@ export function resultPageSuccess( page: number, pageSize: number, list: T[], - { message = 'ok' } = {} + { message = 'ok' } = {}, ) { const pageData = pagination(page, pageSize, list); diff --git a/mock/demo/select-demo.ts b/mock/demo/select-demo.ts index 49692292..fc35a395 100644 --- a/mock/demo/select-demo.ts +++ b/mock/demo/select-demo.ts @@ -1,28 +1,28 @@ import { MockMethod } from 'vite-plugin-mock'; import { resultSuccess } from '../_util'; -const list: any[] = []; -const demoList = (() => { +const demoList = (keyword) => { const result = { - list: list, + list: [] as any[], }; for (let index = 0; index < 20; index++) { result.list.push({ - name: `选项${index}`, + name: `${keyword ?? ''}选项${index}`, id: `${index}`, }); } return result; -})(); +}; export default [ { url: '/basic-api/select/getDemoOptions', timeout: 1000, - method: 'post', + method: 'get', response: ({ query }) => { - console.log(query); - return resultSuccess(demoList); + const { keyword } = query; + console.log(keyword); + return resultSuccess(demoList(keyword)); }, }, ] as MockMethod[]; diff --git a/mock/demo/system.ts b/mock/demo/system.ts index 9cde354c..c4177273 100644 --- a/mock/demo/system.ts +++ b/mock/demo/system.ts @@ -1,5 +1,5 @@ import { MockMethod } from 'vite-plugin-mock'; -import { resultPageSuccess, resultSuccess } from '../_util'; +import { resultError, resultPageSuccess, resultSuccess } from '../_util'; const accountList = (() => { const result: any[] = []; @@ -28,6 +28,7 @@ const roleList = (() => { roleValue: '@first', createTime: '@datetime', remark: '@cword(10,20)', + menu: [['0', '1', '2'], ['0', '1'], ['0', '2'], ['2']][index], 'status|1': ['0', '1'], }); } @@ -185,4 +186,17 @@ export default [ return resultSuccess(menuList); }, }, + { + url: '/basic-api/system/accountExist', + timeout: 500, + method: 'post', + response: ({ body }) => { + const { account } = body || {}; + if (account && account.indexOf('admin') !== -1) { + return resultError('该字段不能包含admin'); + } else { + return resultSuccess(`${account} can use`); + } + }, + }, ] as MockMethod[]; diff --git a/mock/demo/tree-demo.ts b/mock/demo/tree-demo.ts new file mode 100644 index 00000000..6fdcb859 --- /dev/null +++ b/mock/demo/tree-demo.ts @@ -0,0 +1,38 @@ +import { MockMethod } from 'vite-plugin-mock'; +import { resultSuccess } from '../_util'; + +const demoTreeList = (keyword) => { + const result = { + list: [] as Recordable[], + }; + for (let index = 0; index < 5; index++) { + const children: Recordable[] = []; + for (let j = 0; j < 3; j++) { + children.push({ + title: `${keyword ?? ''}选项${index}-${j}`, + value: `${index}-${j}`, + key: `${index}-${j}`, + }); + } + result.list.push({ + title: `${keyword ?? ''}选项${index}`, + value: `${index}`, + key: `${index}`, + children, + }); + } + return result; +}; + +export default [ + { + url: '/basic-api/tree/getDemoOptions', + timeout: 1000, + method: 'get', + response: ({ query }) => { + const { keyword } = query; + console.log(keyword); + return resultSuccess(demoTreeList(keyword)); + }, + }, +] as MockMethod[]; diff --git a/mock/sys/menu.ts b/mock/sys/menu.ts index bc7bfe02..1c47e667 100644 --- a/mock/sys/menu.ts +++ b/mock/sys/menu.ts @@ -5,13 +5,40 @@ import { createFakeUserList } from './user'; // single const dashboardRoute = { path: '/dashboard', - name: 'Welcome', - component: '/dashboard/analysis/index', + name: 'Dashboard', + component: 'LAYOUT', + redirect: '/dashboard/analysis', meta: { - title: 'routes.dashboard.analysis', - affix: true, + title: 'routes.dashboard.dashboard', + hideChildrenInMenu: true, icon: 'bx:bx-home', }, + children: [ + { + path: 'analysis', + name: 'Analysis', + component: '/dashboard/analysis/index', + meta: { + hideMenu: true, + hideBreadcrumb: true, + title: 'routes.dashboard.analysis', + currentActiveMenu: '/dashboard', + icon: 'bx:bx-home', + }, + }, + { + path: 'workbench', + name: 'Workbench', + component: '/dashboard/workbench/index', + meta: { + hideMenu: true, + hideBreadcrumb: true, + title: 'routes.dashboard.workbench', + currentActiveMenu: '/dashboard', + icon: 'bx:bx-home', + }, + }, + ], }; const backRoute = { @@ -128,6 +155,18 @@ const sysRoute = { }, component: '/demo/system/account/index', }, + { + path: 'account_detail/:id', + name: 'AccountDetail', + meta: { + hideMenu: true, + title: 'routes.demo.system.account_detail', + ignoreKeepAlive: true, + showMenu: false, + currentActiveMenu: '/system/account', + }, + component: '/demo/system/account/AccountDetail', + }, { path: 'role', name: 'RoleManagement', @@ -211,12 +250,21 @@ export default [ return resultError('Invalid user token!'); } const id = checkUser.userId; - if (!id || id === '1') { - return resultSuccess([dashboardRoute, authRoute, levelRoute, sysRoute, linkRoute]); - } - if (id === '2') { - return resultSuccess([dashboardRoute, authRoute, levelRoute, linkRoute]); + let menu: Object[]; + switch (id) { + case '1': + dashboardRoute.redirect = dashboardRoute.path + '/' + dashboardRoute.children[0].path; + menu = [dashboardRoute, authRoute, levelRoute, sysRoute, linkRoute]; + break; + case '2': + dashboardRoute.redirect = dashboardRoute.path + '/' + dashboardRoute.children[1].path; + menu = [dashboardRoute, authRoute, levelRoute, linkRoute]; + break; + default: + menu = []; } + + return resultSuccess(menu); }, }, ] as MockMethod[]; diff --git a/mock/sys/user.ts b/mock/sys/user.ts index 3b2d78dd..8b8989fa 100644 --- a/mock/sys/user.ts +++ b/mock/sys/user.ts @@ -11,6 +11,7 @@ export function createFakeUserList() { desc: 'manager', password: '123456', token: 'fakeToken1', + homePath: '/dashboard/analysis', roles: [ { roleName: 'Super Admin', @@ -26,6 +27,7 @@ export function createFakeUserList() { avatar: 'https://q1.qlogo.cn/g?b=qq&nk=339449197&s=640', desc: 'tester', token: 'fakeToken2', + homePath: '/dashboard/workbench', roles: [ { roleName: 'Tester', @@ -50,7 +52,7 @@ export default [ response: ({ body }) => { const { username, password } = body; const checkUser = createFakeUserList().find( - (item) => item.username === username && password === item.password + (item) => item.username === username && password === item.password, ); if (!checkUser) { return resultError('Incorrect account or password!'); @@ -95,4 +97,18 @@ export default [ return resultSuccess(codeList); }, }, + { + url: '/basic-api/logout', + timeout: 200, + method: 'get', + response: (request: requestParams) => { + const token = getRequestToken(request); + if (!token) return resultError('Invalid token'); + const checkUser = createFakeUserList().find((item) => item.token === token); + if (!checkUser) { + return resultError('Invalid token!'); + } + return resultSuccess(undefined, { message: 'Token has been destroyed' }); + }, + }, ] as MockMethod[]; diff --git a/package.json b/package.json index 36757453..1d4bb89d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vben-admin", - "version": "2.5.0", + "version": "2.7.2", "author": { "name": "vben", "email": "anncwb@126.com", @@ -51,7 +51,8 @@ "bootstrap": "yarn install", "dev": "vite", "serve": "npm run dev", - "build": "vite build && esno ./build/script/postBuild.ts", + "build": "cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts", + "build:test": "cross-env vite build --mode test && esno ./build/script/postBuild.ts", "build:no-cache": "yarn clean:cache && npm run build", "dev:app": "esno ./build/script/startElectron.ts --env=development --watch", "build:app": "npm run build && esno ./build/script/startElectron.ts --env=production && electron-builder ", @@ -63,7 +64,7 @@ "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite", "clean:lib": "rimraf node_modules", "lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix", - "lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", + "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", "lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", "lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js", "lint:pretty": "pretty-quick --staged", @@ -72,71 +73,73 @@ "test:gzip": "http-server dist --cors --gzip -c-1", "test:br": "http-server dist --cors --brotli -c-1", "reinstall": "rimraf yarn.lock && rimraf package.lock.json && rimraf node_modules && npm run bootstrap", - "install:husky": "is-ci || husky install", - "gen:icon": "esno ./build/generate/icon/index.ts", - "postinstall": "npm run install:husky" + "prepare": "husky install", + "gen:icon": "esno ./build/generate/icon/index.ts" }, "dependencies": { - "@iconify/iconify": "^2.0.2", - "@logicflow/core": "^0.5.0", - "@logicflow/extension": "^0.5.0", - "@vueuse/core": "^5.0.3", - "@zxcvbn-ts/core": "^0.3.0", - "ant-design-vue": "2.1.6", - "axios": "^0.21.1", - "codemirror": "^5.61.1", + "@iconify/iconify": "^2.0.4", + "@logicflow/core": "^0.6.16", + "@logicflow/extension": "^0.6.16", + "@vueuse/core": "^6.3.3", + "@zxcvbn-ts/core": "^1.0.0-beta.0", + "ant-design-vue": "2.2.7", + "axios": "^0.21.4", + "codemirror": "^5.62.3", "cropperjs": "^1.5.12", - "crypto-js": "^4.0.0", "electron-is-dev": "^1.2.0", - "echarts": "^5.1.2", - "intro.js": "^4.1.0", + "crypto-js": "^4.1.1", + "echarts": "^5.2.0", + "intro.js": "^4.2.2", "lodash-es": "^4.17.21", "mockjs": "^1.1.0", "nprogress": "^0.2.0", "path-to-regexp": "^6.2.0", - "pinia": "2.0.0-beta.3", + "pinia": "2.0.0-rc.9", "print-js": "^1.6.0", "qrcode": "^1.4.4", - "sortablejs": "^1.13.0", - "tinymce": "^5.8.1", - "vditor": "^3.8.5", - "vue": "3.0.11", - "vue-i18n": "9.1.6", - "vue-json-pretty": "^2.0.2", - "vue-router": "^4.0.9", - "vue-types": "^3.0.2", - "xlsx": "^0.17.0" + "resize-observer-polyfill": "^1.5.1", + "showdown": "^1.9.1", + "sortablejs": "^1.14.0", + "tinymce": "^5.9.2", + "vditor": "^3.8.6", + "vue": "3.2.11", + "vue-i18n": "9.1.7", + "vue-json-pretty": "^2.0.4", + "vue-router": "^4.0.11", + "vue-types": "^4.1.0", + "xlsx": "^0.17.1" }, "devDependencies": { - "@commitlint/cli": "^12.1.4", - "@commitlint/config-conventional": "^12.1.4", - "@iconify/json": "^1.1.358", + "@commitlint/cli": "^13.1.0", + "@commitlint/config-conventional": "^13.1.0", + "@iconify/json": "^1.1.401", "@purge-icons/generated": "^0.7.0", "@rollup/plugin-alias": "^3.1.1", "@rollup/plugin-commonjs": "^15.0.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^9.0.0", - "@types/codemirror": "^5.60.0", - "@types/crypto-js": "^4.0.1", - "@types/fs-extra": "^9.0.11", - "@types/inquirer": "^7.3.2", - "@types/intro.js": "^3.0.1", - "@types/jest": "^26.0.23", - "@types/lodash-es": "^4.17.4", - "@types/mockjs": "^1.0.3", - "@types/node": "^15.12.4", + "@types/codemirror": "^5.60.2", + "@types/crypto-js": "^4.0.2", + "@types/fs-extra": "^9.0.12", + "@types/inquirer": "^8.1.1", + "@types/intro.js": "^3.0.2", + "@types/jest": "^27.0.1", + "@types/lodash-es": "^4.17.5", + "@types/mockjs": "^1.0.4", + "@types/node": "^16.9.1", "@types/nprogress": "^0.2.0", - "@types/qrcode": "^1.4.0", - "@types/qs": "^6.9.6", - "@types/sortablejs": "^1.10.6", - "@typescript-eslint/eslint-plugin": "^4.27.0", - "@typescript-eslint/parser": "^4.27.0", - "@vitejs/plugin-legacy": "^1.4.1", - "@vitejs/plugin-vue": "^1.2.3", - "@vitejs/plugin-vue-jsx": "^1.1.5", - "@vue/compiler-sfc": "3.0.11", - "@vue/test-utils": "^2.0.0-rc.7", - "autoprefixer": "^10.2.6", + "@types/qrcode": "^1.4.1", + "@types/qs": "^6.9.7", + "@types/showdown": "^1.9.4", + "@types/sortablejs": "^1.10.7", + "@typescript-eslint/eslint-plugin": "^4.31.0", + "@typescript-eslint/parser": "^4.31.0", + "@vitejs/plugin-legacy": "^1.5.3", + "@vitejs/plugin-vue": "^1.6.2", + "@vitejs/plugin-vue-jsx": "^1.1.8", + "@vue/compiler-sfc": "3.2.11", + "@vue/test-utils": "^2.0.0-rc.14", + "autoprefixer": "^10.3.4", "commitizen": "^4.2.4", "conventional-changelog-cli": "^2.1.1", "cross-env": "^7.0.3", @@ -146,54 +149,55 @@ "electron-connect": "^0.6.3", "electron-contextmenu-middleware": "^1.0.3", "electron-input-menu": "^2.1.0", - "eslint": "^7.29.0", + "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-define-config": "^1.0.8", - "eslint-plugin-jest": "^24.3.6", - "eslint-plugin-prettier": "^3.4.0", - "eslint-plugin-vue": "^7.11.1", - "esno": "^0.7.3", + "eslint-define-config": "^1.0.9", + "eslint-plugin-jest": "^24.4.0", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-vue": "^7.17.0", + "esno": "^0.9.1", "fs-extra": "^10.0.0", - "http-server": "^0.12.3", - "husky": "^6.0.0", - "inquirer": "^8.1.1", + "http-server": "^13.0.1", + "husky": "^7.0.2", + "inquirer": "^8.1.2", "is-ci": "^3.0.0", - "jest": "^27.0.4", + "jest": "^27.2.0", "less": "^4.1.1", - "lint-staged": "^11.0.0", + "lint-staged": "^11.1.2", "npm-run-all": "^4.1.5", - "postcss": "^8.3.5", - "prettier": "^2.3.1", + "postcss": "^8.3.6", + "prettier": "^2.4.0", "pretty-quick": "^3.1.1", "rimraf": "^3.0.2", "rollup-plugin-esbuild": "^3.0.2", - "rollup-plugin-visualizer": "5.5.0", + "rollup-plugin-visualizer": "5.5.2", "stylelint": "^13.13.1", "stylelint-config-prettier": "^8.0.2", "stylelint-config-standard": "^22.0.0", "stylelint-order": "^4.1.0", - "tailwindcss": "^2.2.2", - "ts-jest": "^27.0.3", - "ts-node": "^10.0.0", - "typescript": "4.3.4", - "vite": "2.3.8", - "vite-plugin-compression": "^0.2.5", - "vite-plugin-html": "^2.0.7", - "vite-plugin-imagemin": "^0.3.2", - "vite-plugin-mock": "^2.8.0", + "ts-jest": "^27.0.5", + "ts-node": "^10.2.1", + "typescript": "4.4.3", + "vite": "2.5.7", + "vite-plugin-compression": "^0.3.5", + "vite-plugin-html": "^2.1.0", + "vite-plugin-imagemin": "^0.4.5", + "vite-plugin-mock": "^2.9.6", "vite-plugin-purge-icons": "^0.7.0", - "vite-plugin-pwa": "^0.8.1", - "vite-plugin-style-import": "^1.0.0", - "vite-plugin-svg-icons": "^0.7.1", + "vite-plugin-pwa": "^0.11.2", + "vite-plugin-style-import": "^1.2.1", + "vite-plugin-svg-icons": "^1.0.4", "vite-plugin-theme": "^0.8.1", - "vue-eslint-parser": "^7.6.0", - "vue-tsc": "^0.1.7", - "wait-on": "^5.2.1" + "wait-on": "^5.2.1", + "vite-plugin-vue-setup-extend": "^0.1.0", + "vite-plugin-windicss": "^1.4.2", + "vue-eslint-parser": "^7.11.0", + "vue-tsc": "^0.3.0" }, "resolutions": { "//": "Used to install imagemin dependencies, because imagemin may not be installed in China. If it is abroad, you can delete it", "bin-wrapper": "npm:bin-wrapper-china", - "rollup": "^2.52.1" + "rollup": "^2.56.3" }, "repository": { "type": "git", diff --git a/postcss.config.js b/postcss.config.js index 12a703d9..a47ef4f9 100755 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,5 @@ module.exports = { plugins: { - tailwindcss: {}, autoprefixer: {}, }, }; diff --git a/prettier.config.js b/prettier.config.js index 0c20bc90..b5958abb 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -7,14 +7,12 @@ module.exports = { singleQuote: true, quoteProps: 'as-needed', bracketSpacing: true, - trailingComma: 'es5', - jsxBracketSameLine: false, + trailingComma: 'all', jsxSingleQuote: false, arrowParens: 'always', insertPragma: false, requirePragma: false, proseWrap: 'never', htmlWhitespaceSensitivity: 'strict', - endOfLine: 'lf', - rangeStart: 0, + endOfLine: 'auto', }; diff --git a/src/App.vue b/src/App.vue index a16f867b..f8df489e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,24 +6,15 @@ - diff --git a/src/api/demo/select.ts b/src/api/demo/select.ts index fd8c7968..54c4ef5e 100644 --- a/src/api/demo/select.ts +++ b/src/api/demo/select.ts @@ -8,4 +8,4 @@ enum Api { * @description: Get sample options value */ export const optionsListApi = (params?: selectParams) => - defHttp.post({ url: Api.OPTIONS_LIST, params }); + defHttp.get({ url: Api.OPTIONS_LIST, params }); diff --git a/src/api/demo/system.ts b/src/api/demo/system.ts index 69f1ac09..f5c296b5 100644 --- a/src/api/demo/system.ts +++ b/src/api/demo/system.ts @@ -14,6 +14,7 @@ import { defHttp } from '/@/utils/http/axios'; enum Api { AccountList = '/system/getAccountList', + IsAccountExist = '/system/accountExist', DeptList = '/system/getDeptList', setRoleStatus = '/system/setRoleStatus', MenuList = '/system/getMenuList', @@ -38,3 +39,6 @@ export const getAllRoleList = (params?: RoleParams) => export const setRoleStatus = (id: number, status: string) => defHttp.post({ url: Api.setRoleStatus, params: { id, status } }); + +export const isAccountExist = (account: string) => + defHttp.post({ url: Api.IsAccountExist, params: { account } }, { errorMessageMode: 'none' }); diff --git a/src/api/demo/tree.ts b/src/api/demo/tree.ts new file mode 100644 index 00000000..8b8a94f1 --- /dev/null +++ b/src/api/demo/tree.ts @@ -0,0 +1,11 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + TREE_OPTIONS_LIST = '/tree/getDemoOptions', +} + +/** + * @description: Get sample options value + */ +export const treeOptionsListApi = (params?: Recordable) => + defHttp.get({ url: Api.TREE_OPTIONS_LIST, params }); diff --git a/src/api/sys/upload.ts b/src/api/sys/upload.ts index 1f1b4389..c47baf43 100644 --- a/src/api/sys/upload.ts +++ b/src/api/sys/upload.ts @@ -10,13 +10,13 @@ const { uploadUrl = '' } = useGlobSetting(); */ export function uploadApi( params: UploadFileParams, - onUploadProgress: (progressEvent: ProgressEvent) => void + onUploadProgress: (progressEvent: ProgressEvent) => void, ) { return defHttp.uploadFile( { url: uploadUrl, onUploadProgress, }, - params + params, ); } diff --git a/src/api/sys/user.ts b/src/api/sys/user.ts index c5a08e26..1e883b6d 100644 --- a/src/api/sys/user.ts +++ b/src/api/sys/user.ts @@ -5,6 +5,7 @@ import { ErrorMessageMode } from '/#/axios'; enum Api { Login = '/login', + Logout = '/logout', GetUserInfo = '/getUserInfo', GetPermCode = '/getPermCode', } @@ -20,7 +21,7 @@ export function loginApi(params: LoginParams, mode: ErrorMessageMode = 'modal') }, { errorMessageMode: mode, - } + }, ); } @@ -28,9 +29,13 @@ export function loginApi(params: LoginParams, mode: ErrorMessageMode = 'modal') * @description: getUserInfo */ export function getUserInfo() { - return defHttp.get({ url: Api.GetUserInfo }); + return defHttp.get({ url: Api.GetUserInfo }, { errorMessageMode: 'none' }); } export function getPermCode() { return defHttp.get({ url: Api.GetPermCode }); } + +export function doLogout() { + return defHttp.get({ url: Api.Logout }); +} diff --git a/src/assets/svg/login-bg.svg b/src/assets/svg/login-bg.svg index e75bf6dd..7b66bafc 100644 --- a/src/assets/svg/login-bg.svg +++ b/src/assets/svg/login-bg.svg @@ -1,7 +1,7 @@ - + diff --git a/src/components/Application/src/AppDarkModeToggle.vue b/src/components/Application/src/AppDarkModeToggle.vue index aac6408d..6df9c499 100644 --- a/src/components/Application/src/AppDarkModeToggle.vue +++ b/src/components/Application/src/AppDarkModeToggle.vue @@ -1,12 +1,12 @@
-
+
- diff --git a/src/components/Menu/src/BasicMenu.vue b/src/components/Menu/src/BasicMenu.vue index 12140ba0..80cfd70a 100644 --- a/src/components/Menu/src/BasicMenu.vue +++ b/src/components/Menu/src/BasicMenu.vue @@ -19,25 +19,18 @@ diff --git a/src/components/Menu/src/components/BasicSubMenuItem.vue b/src/components/Menu/src/components/BasicSubMenuItem.vue index d7903def..d5139fce 100644 --- a/src/components/Menu/src/components/BasicSubMenuItem.vue +++ b/src/components/Menu/src/components/BasicSubMenuItem.vue @@ -3,6 +3,7 @@ @@ -168,6 +180,12 @@ } } + button.ant-btn-circle { + span { + margin: auto !important; + } + } + .ant-divider, .ant-divider-vertical { margin: 0 2px; diff --git a/src/components/Table/src/components/TableHeader.vue b/src/components/Table/src/components/TableHeader.vue index 4a2ae6c0..189e913d 100644 --- a/src/components/Table/src/components/TableHeader.vue +++ b/src/components/Table/src/components/TableHeader.vue @@ -1,16 +1,25 @@ diff --git a/src/components/Table/src/hooks/useColumns.ts b/src/components/Table/src/hooks/useColumns.ts index d1ef7505..42e0c8a4 100644 --- a/src/components/Table/src/hooks/useColumns.ts +++ b/src/components/Table/src/hooks/useColumns.ts @@ -1,14 +1,14 @@ import type { BasicColumn, BasicTableProps, CellFormat, GetColumnsParams } from '../types/table'; import type { PaginationProps } from '../types/pagination'; import type { ComputedRef } from 'vue'; -import { unref, Ref, computed, watch, ref, toRaw } from 'vue'; +import { computed, Ref, ref, toRaw, unref, watch } from 'vue'; import { renderEditCell } from '../components/editable'; import { usePermission } from '/@/hooks/web/usePermission'; import { useI18n } from '/@/hooks/web/useI18n'; -import { isBoolean, isArray, isString, isObject, isFunction } from '/@/utils/is'; -import { isEqual, cloneDeep } from 'lodash-es'; +import { isArray, isBoolean, isFunction, isMap, isString } from '/@/utils/is'; +import { cloneDeep, isEqual } from 'lodash-es'; import { formatToDate } from '/@/utils/dateUtil'; -import { DEFAULT_ALIGN, PAGE_SIZE, INDEX_COLUMN_FLAG, ACTION_COLUMN_FLAG } from '../const'; +import { ACTION_COLUMN_FLAG, DEFAULT_ALIGN, INDEX_COLUMN_FLAG, PAGE_SIZE } from '../const'; function handleItem(item: BasicColumn, ellipsis: boolean) { const { key, dataIndex, children } = item; @@ -40,7 +40,7 @@ function handleChildren(children: BasicColumn[] | undefined, ellipsis: boolean) function handleIndexColumn( propsRef: ComputedRef, getPaginationRef: ComputedRef, - columns: BasicColumn[] + columns: BasicColumn[], ) { const { t } = useI18n(); @@ -102,7 +102,7 @@ function handleActionColumn(propsRef: ComputedRef, columns: Bas export function useColumns( propsRef: ComputedRef, - getPaginationRef: ComputedRef + getPaginationRef: ComputedRef, ) { const columnsRef = ref(unref(propsRef).columns) as unknown as Ref; let cacheColumns = unref(propsRef).columns; @@ -122,7 +122,7 @@ export function useColumns( handleItem( item, - Reflect.has(item, 'ellipsis') ? !!item.ellipsis : !!ellipsis && !customRender && !slots + Reflect.has(item, 'ellipsis') ? !!item.ellipsis : !!ellipsis && !customRender && !slots, ); }); return columns; @@ -179,7 +179,7 @@ export function useColumns( (columns) => { columnsRef.value = columns; cacheColumns = columns?.filter((item) => !item.flag) ?? []; - } + }, ); function setCacheColumnsByField(dataIndex: string | undefined, value: Partial) { @@ -287,11 +287,9 @@ function sortFixedColumn(columns: BasicColumn[]) { } defColumns.push(column); } - const resultColumns = [...fixedLeftColumns, ...defColumns, ...fixedRightColumns].filter( - (item) => !item.defaultHidden + return [...fixedLeftColumns, ...defColumns, ...fixedRightColumns].filter( + (item) => !item.defaultHidden, ); - - return resultColumns; } // format cell @@ -317,8 +315,8 @@ export function formatCell(text: string, format: CellFormat, record: Recordable, return formatToDate(text, dateFormat); } - // enum - if (isObject(format) && Reflect.has(format, 'size')) { + // Map + if (isMap(format)) { return format.get(text); } } catch (error) { diff --git a/src/components/Table/src/hooks/useCustomRow.ts b/src/components/Table/src/hooks/useCustomRow.ts index 1cfcac08..8dc4921e 100644 --- a/src/components/Table/src/hooks/useCustomRow.ts +++ b/src/components/Table/src/hooks/useCustomRow.ts @@ -15,7 +15,7 @@ interface Options { function getKey( record: Recordable, rowKey: string | ((record: Record) => string) | undefined, - autoCreateKey?: boolean + autoCreateKey?: boolean, ) { if (!rowKey || autoCreateKey) { return record[ROW_KEY]; @@ -31,7 +31,7 @@ function getKey( export function useCustomRow( propsRef: ComputedRef, - { setSelectedRowKeys, getSelectRowKeys, getAutoCreateKey, clearSelectedRowKeys, emit }: Options + { setSelectedRowKeys, getSelectRowKeys, getAutoCreateKey, clearSelectedRowKeys, emit }: Options, ) { const customRow = (record: Recordable, index: number) => { return { diff --git a/src/components/Table/src/hooks/useDataSource.ts b/src/components/Table/src/hooks/useDataSource.ts index 1f9aec4e..60abceb0 100644 --- a/src/components/Table/src/hooks/useDataSource.ts +++ b/src/components/Table/src/hooks/useDataSource.ts @@ -40,13 +40,14 @@ export function useDataSource( clearSelectedRowKeys, tableData, }: ActionType, - emit: EmitType + emit: EmitType, ) { const searchState = reactive({ sortInfo: {}, filterInfo: {}, }); const dataSourceRef = ref([]); + const rawDataSourceRef = ref({}); watchEffect(() => { tableData.value = unref(dataSourceRef); @@ -60,13 +61,13 @@ export function useDataSource( }, { immediate: true, - } + }, ); function handleTableChange( pagination: PaginationProps, filters: Partial>, - sorter: SorterResult + sorter: SorterResult, ) { const { clearSelectOnPageChange, sortFn, filterFn } = unref(propsRef); if (clearSelectOnPageChange) { @@ -113,7 +114,7 @@ export function useDataSource( const getDataSourceRef = computed(() => { const dataSource = unref(dataSourceRef); if (!dataSource || dataSource.length === 0) { - return []; + return unref(dataSourceRef); } if (unref(getAutoCreateKey)) { const firstItem = dataSource[0]; @@ -147,20 +148,10 @@ export function useDataSource( function updateTableDataRecord( rowKey: string | number, - record: Recordable + record: Recordable, ): Recordable | undefined { - if (!dataSourceRef.value || dataSourceRef.value.length == 0) return; - const rowKeyName = unref(getRowKey); - if (!rowKeyName) { - return; - } - const row = dataSourceRef.value.find((r) => { - if (typeof rowKeyName === 'function') { - return (rowKeyName(r) as string) === rowKey; - } else { - return Reflect.has(r, rowKeyName) && r[rowKeyName] === rowKey; - } - }); + const row = findTableDataRecord(rowKey); + if (row) { for (const field in row) { if (Reflect.has(record, field)) row[field] = record[field]; @@ -169,6 +160,68 @@ export function useDataSource( } } + function deleteTableDataRecord(record: Recordable | Recordable[]): Recordable | undefined { + if (!dataSourceRef.value || dataSourceRef.value.length == 0) return; + const records = !Array.isArray(record) ? [record] : record; + const recordIndex = records + .map((item) => dataSourceRef.value.findIndex((s) => s.key === item.key)) // 取序号 + .filter((item) => item !== undefined) + .sort((a, b) => b - a); // 从大到小排序 + for (const index of recordIndex) { + unref(dataSourceRef).splice(index, 1); + unref(propsRef).dataSource?.splice(index, 1); + } + setPagination({ + total: unref(propsRef).dataSource?.length, + }); + return unref(propsRef).dataSource; + } + + function insertTableDataRecord(record: Recordable, index: number): Recordable | undefined { + if (!dataSourceRef.value || dataSourceRef.value.length == 0) return; + index = index ?? dataSourceRef.value?.length; + unref(dataSourceRef).splice(index, 0, record); + unref(propsRef).dataSource?.splice(index, 0, record); + return unref(propsRef).dataSource; + } + + function findTableDataRecord(rowKey: string | number) { + if (!dataSourceRef.value || dataSourceRef.value.length == 0) return; + + const rowKeyName = unref(getRowKey); + if (!rowKeyName) return; + + const { childrenColumnName = 'children' } = unref(propsRef); + + const findRow = (array: any[]) => { + let ret; + array.some(function iter(r) { + if (typeof rowKeyName === 'function') { + if ((rowKeyName(r) as string) === rowKey) { + ret = r; + return true; + } + } else { + if (Reflect.has(r, rowKeyName) && r[rowKeyName] === rowKey) { + ret = r; + return true; + } + } + return r[childrenColumnName] && r[childrenColumnName].some(iter); + }); + return ret; + }; + + // const row = dataSourceRef.value.find(r => { + // if (typeof rowKeyName === 'function') { + // return (rowKeyName(r) as string) === rowKey + // } else { + // return Reflect.has(r, rowKeyName) && r[rowKeyName] === rowKey + // } + // }) + return findRow(dataSourceRef.value); + } + async function fetch(opt?: FetchParams) { const { api, searchInfo, fetchSetting, beforeFetch, afterFetch, useSearchForm, pagination } = unref(propsRef); @@ -176,8 +229,9 @@ export function useDataSource( try { setLoading(true); const { pageField, sizeField, listField, totalField } = Object.assign( + {}, FETCH_SETTING, - fetchSetting + fetchSetting, ); let pageParams: Recordable = {}; @@ -203,10 +257,11 @@ export function useDataSource( ...(opt?.filterInfo ?? {}), }; if (beforeFetch && isFunction(beforeFetch)) { - params = beforeFetch(params) || params; + params = (await beforeFetch(params)) || params; } const res = await api(params); + rawDataSourceRef.value = res; const isArrayResult = Array.isArray(res); @@ -225,7 +280,7 @@ export function useDataSource( } if (afterFetch && isFunction(afterFetch)) { - resultItems = afterFetch(resultItems) || resultItems; + resultItems = (await afterFetch(resultItems)) || resultItems; } dataSourceRef.value = resultItems; setPagination({ @@ -259,6 +314,10 @@ export function useDataSource( return getDataSourceRef.value as T[]; } + function getRawDataSource() { + return rawDataSourceRef.value as T; + } + async function reload(opt?: FetchParams) { await fetch(opt); } @@ -272,6 +331,7 @@ export function useDataSource( return { getDataSourceRef, getDataSource, + getRawDataSource, getRowKey, setTableData, getAutoCreateKey, @@ -279,6 +339,9 @@ export function useDataSource( reload, updateTableData, updateTableDataRecord, + deleteTableDataRecord, + insertTableDataRecord, + findTableDataRecord, handleTableChange, }; } diff --git a/src/components/Table/src/hooks/useLoading.ts b/src/components/Table/src/hooks/useLoading.ts index 0a670b00..fe8a0f16 100644 --- a/src/components/Table/src/hooks/useLoading.ts +++ b/src/components/Table/src/hooks/useLoading.ts @@ -8,7 +8,7 @@ export function useLoading(props: ComputedRef) { () => unref(props).loading, (loading) => { loadingRef.value = loading; - } + }, ); const getLoading = computed(() => unref(loadingRef)); diff --git a/src/components/Table/src/hooks/usePagination.tsx b/src/components/Table/src/hooks/usePagination.tsx index 760f899b..4fb2362f 100644 --- a/src/components/Table/src/hooks/usePagination.tsx +++ b/src/components/Table/src/hooks/usePagination.tsx @@ -1,6 +1,6 @@ import type { PaginationProps } from '../types/pagination'; import type { BasicTableProps } from '../types/table'; -import { computed, unref, ref, ComputedRef } from 'vue'; +import { computed, unref, ref, ComputedRef, watchEffect } from 'vue'; import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue'; import { isBoolean } from '/@/utils/is'; import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../const'; @@ -27,6 +27,16 @@ export function usePagination(refProps: ComputedRef) { const configRef = ref({}); const show = ref(true); + watchEffect(() => { + const { pagination } = unref(refProps); + if (!isBoolean(pagination) && pagination) { + configRef.value = { + ...unref(configRef), + ...(pagination ?? {}), + }; + } + }); + const getPaginationInfo = computed((): PaginationProps | boolean => { const { pagination } = unref(refProps); diff --git a/src/components/Table/src/hooks/useRowSelection.ts b/src/components/Table/src/hooks/useRowSelection.ts index af374dc8..ffae9b52 100644 --- a/src/components/Table/src/hooks/useRowSelection.ts +++ b/src/components/Table/src/hooks/useRowSelection.ts @@ -1,11 +1,14 @@ +import { isFunction } from '/@/utils/is'; import type { BasicTableProps, TableRowSelection } from '../types/table'; -import { computed, ref, unref, ComputedRef, Ref, toRaw } from 'vue'; +import { computed, ComputedRef, nextTick, Ref, ref, toRaw, unref, watch } from 'vue'; import { ROW_KEY } from '../const'; +import { omit } from 'lodash-es'; +import { findNodeAll } from '/@/utils/helper/treeHelper'; export function useRowSelection( propsRef: ComputedRef, tableData: Ref, - emit: EmitType + emit: EmitType, ) { const selectedRowKeysRef = ref([]); const selectedRowRef = ref([]); @@ -19,18 +22,40 @@ export function useRowSelection( return { selectedRowKeys: unref(selectedRowKeysRef), hideDefaultSelections: false, - onChange: (selectedRowKeys: string[], selectedRows: Recordable[]) => { - selectedRowKeysRef.value = selectedRowKeys; - selectedRowRef.value = selectedRows; - emit('selection-change', { - keys: selectedRowKeys, - rows: selectedRows, - }); + onChange: (selectedRowKeys: string[]) => { + setSelectedRowKeys(selectedRowKeys); + // selectedRowKeysRef.value = selectedRowKeys; + // selectedRowRef.value = selectedRows; }, - ...(rowSelection === undefined ? {} : rowSelection), + ...omit(rowSelection, ['onChange']), }; }); + watch( + () => unref(propsRef).rowSelection?.selectedRowKeys, + (v: string[]) => { + setSelectedRowKeys(v); + }, + ); + + watch( + () => unref(selectedRowKeysRef), + () => { + nextTick(() => { + const { rowSelection } = unref(propsRef); + if (rowSelection) { + const { onChange } = rowSelection; + if (onChange && isFunction(onChange)) onChange(getSelectRowKeys(), getSelectRows()); + } + emit('selection-change', { + keys: getSelectRowKeys(), + rows: getSelectRows(), + }); + }); + }, + { deep: true }, + ); + const getAutoCreateKey = computed(() => { return unref(propsRef).autoCreateKey && !unref(propsRef).rowKey; }); @@ -42,11 +67,19 @@ export function useRowSelection( function setSelectedRowKeys(rowKeys: string[]) { selectedRowKeysRef.value = rowKeys; - - const rows = toRaw(unref(tableData)).filter((item) => - rowKeys.includes(item[unref(getRowKey) as string]) + const allSelectedRows = findNodeAll( + toRaw(unref(tableData)).concat(toRaw(unref(selectedRowRef))), + (item) => rowKeys.includes(item[unref(getRowKey) as string]), + { + children: propsRef.value.childrenColumnName ?? 'children', + }, ); - selectedRowRef.value = rows; + const trueSelectedRows: any[] = []; + rowKeys.forEach((key: string) => { + const found = allSelectedRows.find((item) => item[unref(getRowKey) as string] === key); + found && trueSelectedRows.push(found); + }); + selectedRowRef.value = trueSelectedRows; } function setSelectedRows(rows: Recordable[]) { diff --git a/src/components/Table/src/hooks/useTable.ts b/src/components/Table/src/hooks/useTable.ts index 2a9d35ad..26139fe6 100644 --- a/src/components/Table/src/hooks/useTable.ts +++ b/src/components/Table/src/hooks/useTable.ts @@ -18,7 +18,7 @@ export function useTable(tableProps?: Props): [ (instance: TableActionType, formInstance: UseTableMethod) => void, TableActionType & { getForm: () => FormActionType; - } + }, ] { const tableRef = ref>(null); const loadedRef = ref>(false); @@ -50,7 +50,7 @@ export function useTable(tableProps?: Props): [ { immediate: true, deep: true, - } + }, ); } @@ -58,7 +58,7 @@ export function useTable(tableProps?: Props): [ const table = unref(tableRef); if (!table) { error( - 'The table instance has not been obtained yet, please make sure the table is presented when performing the table operation!' + 'The table instance has not been obtained yet, please make sure the table is presented when performing the table operation!', ); } return table as TableActionType; @@ -82,6 +82,9 @@ export function useTable(tableProps?: Props): [ getDataSource: () => { return getTableInstance().getDataSource(); }, + getRawDataSource: () => { + return getTableInstance().getRawDataSource(); + }, getColumns: ({ ignoreIndex = false }: { ignoreIndex?: boolean } = {}) => { const columns = getTableInstance().getColumns({ ignoreIndex }) || []; return toRaw(columns); @@ -119,9 +122,18 @@ export function useTable(tableProps?: Props): [ updateTableData: (index: number, key: string, value: any) => { return getTableInstance().updateTableData(index, key, value); }, + deleteTableDataRecord: (record: Recordable | Recordable[]) => { + return getTableInstance().deleteTableDataRecord(record); + }, + insertTableDataRecord: (record: Recordable | Recordable[], index?: number) => { + return getTableInstance().insertTableDataRecord(record, index); + }, updateTableDataRecord: (rowKey: string | number, record: Recordable) => { return getTableInstance().updateTableDataRecord(rowKey, record); }, + findTableDataRecord: (rowKey: string | number) => { + return getTableInstance().findTableDataRecord(rowKey); + }, getRowSelection: () => { return toRaw(getTableInstance().getRowSelection()); }, diff --git a/src/components/Table/src/hooks/useTableExpand.ts b/src/components/Table/src/hooks/useTableExpand.ts index c4bedfd5..c9f0eb1d 100644 --- a/src/components/Table/src/hooks/useTableExpand.ts +++ b/src/components/Table/src/hooks/useTableExpand.ts @@ -6,7 +6,7 @@ import { ROW_KEY } from '../const'; export function useTableExpand( propsRef: ComputedRef, tableData: Ref, - emit: EmitType + emit: EmitType, ) { const expandedRowKeys = ref([]); diff --git a/src/components/Table/src/hooks/useTableFooter.ts b/src/components/Table/src/hooks/useTableFooter.ts index fa46e36d..df8393a0 100644 --- a/src/components/Table/src/hooks/useTableFooter.ts +++ b/src/components/Table/src/hooks/useTableFooter.ts @@ -12,7 +12,7 @@ export function useTableFooter( scrollToFirstRowOnChange: boolean; }>, tableElRef: Ref, - getDataSourceRef: ComputedRef + getDataSourceRef: ComputedRef, ) { const getIsEmptyData = computed(() => { return (unref(getDataSourceRef) || []).length === 0; @@ -43,7 +43,7 @@ export function useTableFooter( name: 'scroll', listener: () => { const footerBodyDom = tableEl.$el.querySelector( - '.ant-table-footer .ant-table-body' + '.ant-table-footer .ant-table-body', ) as HTMLDivElement; if (!footerBodyDom || !bodyDom) return; footerBodyDom.scrollLeft = bodyDom.scrollLeft; diff --git a/src/components/Table/src/hooks/useTableForm.ts b/src/components/Table/src/hooks/useTableForm.ts index 87c2cced..bc09c7f6 100644 --- a/src/components/Table/src/hooks/useTableForm.ts +++ b/src/components/Table/src/hooks/useTableForm.ts @@ -8,7 +8,7 @@ export function useTableForm( propsRef: ComputedRef, slots: Slots, fetch: (opt?: FetchParams | undefined) => Promise, - getLoading: ComputedRef + getLoading: ComputedRef, ) { const getFormProps = computed((): Partial => { const { formConfig } = unref(propsRef); @@ -21,9 +21,11 @@ export function useTableForm( }; }); - const getFormSlotKeys = computed(() => { + const getFormSlotKeys: ComputedRef = computed(() => { const keys = Object.keys(slots); - return keys.map((item) => (item.startsWith('form-') ? item : null)).filter(Boolean); + return keys + .map((item) => (item.startsWith('form-') ? item : null)) + .filter((item) => !!item) as string[]; }); function replaceFormSlotKey(key: string) { diff --git a/src/components/Table/src/hooks/useTableHeader.ts b/src/components/Table/src/hooks/useTableHeader.ts index 1847a1ed..e7282075 100644 --- a/src/components/Table/src/hooks/useTableHeader.ts +++ b/src/components/Table/src/hooks/useTableHeader.ts @@ -8,7 +8,7 @@ import { getSlot } from '/@/utils/helper/tsxHelper'; export function useTableHeader( propsRef: ComputedRef, slots: Slots, - handlers: InnerHandlers + handlers: InnerHandlers, ) { const getHeaderProps = computed((): Recordable => { const { title, showTableSetting, titleHelpMessage, tableSetting } = unref(propsRef); @@ -41,7 +41,12 @@ export function useTableHeader( tableTitle: () => getSlot(slots, 'tableTitle'), } : {}), - } + ...(slots.headerTop + ? { + headerTop: () => getSlot(slots, 'headerTop'), + } + : {}), + }, ), }; }); diff --git a/src/components/Table/src/hooks/useTableScroll.ts b/src/components/Table/src/hooks/useTableScroll.ts index 29116e38..34001512 100644 --- a/src/components/Table/src/hooks/useTableScroll.ts +++ b/src/components/Table/src/hooks/useTableScroll.ts @@ -13,7 +13,7 @@ export function useTableScroll( tableElRef: Ref, columnsRef: ComputedRef, rowSelectionRef: ComputedRef | null>, - getDataSourceRef: ComputedRef + getDataSourceRef: ComputedRef, ) { const tableHeightRef: Ref> = ref(null); @@ -34,7 +34,7 @@ export function useTableScroll( }, { flush: 'post', - } + }, ); function redoHeight() { @@ -66,6 +66,24 @@ export function useTableScroll( if (!bodyEl) { bodyEl = tableEl.querySelector('.ant-table-body'); + if (!bodyEl) return; + } + + const hasScrollBarY = bodyEl.scrollHeight > bodyEl.clientHeight; + const hasScrollBarX = bodyEl.scrollWidth > bodyEl.clientWidth; + + if (hasScrollBarY) { + tableEl.classList.contains('hide-scrollbar-y') && + tableEl.classList.remove('hide-scrollbar-y'); + } else { + !tableEl.classList.contains('hide-scrollbar-y') && tableEl.classList.add('hide-scrollbar-y'); + } + + if (hasScrollBarX) { + tableEl.classList.contains('hide-scrollbar-x') && + tableEl.classList.remove('hide-scrollbar-x'); + } else { + !tableEl.classList.contains('hide-scrollbar-x') && tableEl.classList.add('hide-scrollbar-x'); } bodyEl!.style.height = 'unset'; diff --git a/src/components/Table/src/hooks/useTableStyle.ts b/src/components/Table/src/hooks/useTableStyle.ts index 77783e6f..292187d8 100644 --- a/src/components/Table/src/hooks/useTableStyle.ts +++ b/src/components/Table/src/hooks/useTableStyle.ts @@ -6,11 +6,14 @@ import { isFunction } from '/@/utils/is'; export function useTableStyle(propsRef: ComputedRef, prefixCls: string) { function getRowClassName(record: TableCustomRecord, index: number) { const { striped, rowClassName } = unref(propsRef); - if (!striped) return; - if (rowClassName && isFunction(rowClassName)) { - return rowClassName(record); + const classNames: string[] = []; + if (striped) { + classNames.push((index || 0) % 2 === 1 ? `${prefixCls}-row__striped` : ''); } - return (index || 0) % 2 === 1 ? `${prefixCls}-row__striped` : ''; + if (rowClassName && isFunction(rowClassName)) { + classNames.push(rowClassName(record, index)); + } + return classNames.filter((cls) => !!cls).join(' '); } return { getRowClassName }; diff --git a/src/components/Table/src/props.ts b/src/components/Table/src/props.ts index e36e2abc..b4df61ac 100644 --- a/src/components/Table/src/props.ts +++ b/src/components/Table/src/props.ts @@ -126,4 +126,14 @@ export const basicProps = { type: Object as PropType<{ x: number | true; y: number }>, default: null, }, + beforeEditSubmit: { + type: Function as PropType< + (data: { + record: Recordable; + index: number; + key: string | number; + value: any; + }) => Promise + >, + }, }; diff --git a/src/components/Table/src/types/componentType.ts b/src/components/Table/src/types/componentType.ts index b7edbfe1..48d5a7aa 100644 --- a/src/components/Table/src/types/componentType.ts +++ b/src/components/Table/src/types/componentType.ts @@ -3,6 +3,7 @@ export type ComponentType = | 'InputNumber' | 'Select' | 'ApiSelect' + | 'ApiTreeSelect' | 'Checkbox' | 'Switch' | 'DatePicker' diff --git a/src/components/Table/src/types/table.ts b/src/components/Table/src/types/table.ts index 56c539c3..f9df66cf 100644 --- a/src/components/Table/src/types/table.ts +++ b/src/components/Table/src/types/table.ts @@ -25,7 +25,7 @@ export interface TableRowSelection extends ITableRowSelection { /** * Callback executed when select/deselect one row - * @type FunctionT + * @type Function */ onSelect?: (record: T, selected: boolean, selectedRows: Object[], nativeEvent: Event) => any; @@ -95,9 +95,13 @@ export interface TableActionType { setPagination: (info: Partial) => void; setTableData: (values: T[]) => void; updateTableDataRecord: (rowKey: string | number, record: Recordable) => Recordable | void; + deleteTableDataRecord: (record: Recordable | Recordable[]) => Recordable | void; + insertTableDataRecord: (record: Recordable, index?: number) => Recordable | void; + findTableDataRecord: (rowKey: string | number) => Recordable | void; getColumns: (opt?: GetColumnsParams) => BasicColumn[]; setColumns: (columns: BasicColumn[] | string[]) => void; getDataSource: () => T[]; + getRawDataSource: () => T; setLoading: (loading: boolean) => void; setProps: (props: Partial) => void; redoHeight: () => void; @@ -287,7 +291,7 @@ export interface BasicTableProps { * Row's className * @type Function */ - rowClassName?: (record: TableCustomRecord) => string; + rowClassName?: (record: TableCustomRecord, index: number) => string; /** * Row selection config @@ -360,6 +364,18 @@ export interface BasicTableProps { */ transformCellText?: Function; + /** + * Callback executed before editable cell submit value, not for row-editor + * + * The cell will not submit data while callback return false + */ + beforeEditSubmit?: (data: { + record: Recordable; + index: number; + key: string | number; + value: any; + }) => Promise; + /** * Callback executed when pagination, filters or sorter is changed * @param pagination diff --git a/src/components/Table/src/types/tableAction.ts b/src/components/Table/src/types/tableAction.ts index 19ada7a3..3566d240 100644 --- a/src/components/Table/src/types/tableAction.ts +++ b/src/components/Table/src/types/tableAction.ts @@ -1,8 +1,9 @@ import { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'; +import { TooltipProps } from 'ant-design-vue/es/tooltip/Tooltip'; import { RoleEnum } from '/@/enums/roleEnum'; export interface ActionItem extends ButtonProps { onClick?: Fn; - label: string; + label?: string; color?: 'success' | 'error' | 'warning'; icon?: string; popConfirm?: PopConfirm; @@ -12,6 +13,7 @@ export interface ActionItem extends ButtonProps { auth?: RoleEnum | RoleEnum[] | string | string[]; // 业务控制是否显示 ifShow?: boolean | ((action: ActionItem) => boolean); + tooltip?: string | TooltipProps; } export interface PopConfirm { diff --git a/src/components/Time/src/Time.vue b/src/components/Time/src/Time.vue index a74d2c64..27893688 100644 --- a/src/components/Time/src/Time.vue +++ b/src/components/Time/src/Time.vue @@ -34,7 +34,7 @@ () => { setTime(); }, - { immediate: true } + { immediate: true }, ); function getTime() { diff --git a/src/components/Tinymce/src/Editor.vue b/src/components/Tinymce/src/Editor.vue index 021dbabe..b84c5fbb 100644 --- a/src/components/Tinymce/src/Editor.vue +++ b/src/components/Tinymce/src/Editor.vue @@ -8,12 +8,18 @@ v-show="editorRef" :disabled="disabled" /> - + + diff --git a/src/components/Tree/src/props.ts b/src/components/Tree/src/props.ts index 4fc7b73a..faa5c03f 100644 --- a/src/components/Tree/src/props.ts +++ b/src/components/Tree/src/props.ts @@ -1,5 +1,12 @@ import type { PropType } from 'vue'; -import type { ReplaceFields, ActionItem, Keys, CheckKeys, ContextMenuOptions } from './typing'; +import type { + ReplaceFields, + ActionItem, + Keys, + CheckKeys, + ContextMenuOptions, + TreeItem, +} from './typing'; import type { ContextMenuItem } from '/@/hooks/web/useContextMenu'; import type { TreeDataItem } from 'ant-design-vue/es/tree/Tree'; import { propTypes } from '/@/utils/propTypes'; @@ -20,6 +27,7 @@ export const basicProps = { title: propTypes.string, toolbar: propTypes.bool, search: propTypes.bool, + searchValue: propTypes.string, checkStrictly: propTypes.bool, clickRowToExpand: propTypes.bool.def(true), checkable: propTypes.bool.def(false), @@ -65,6 +73,24 @@ export const basicProps = { rightMenuList: { type: Array as PropType, }, + // 自定义数据过滤判断方法(注: 不是整个过滤方法,而是内置过滤的判断方法,用于增强原本仅能通过title进行过滤的方式) + filterFn: { + type: Function as PropType< + (searchValue: any, node: TreeItem, replaceFields: ReplaceFields) => boolean + >, + default: null, + }, + // 高亮搜索值,仅高亮具体匹配值(通过title)值为true时使用默认色值,值为#xxx时使用此值替代且高亮开启 + highlight: { + type: [Boolean, String] as PropType, + default: false, + }, + // 搜索完成时自动展开结果 + expandOnSearch: propTypes.bool.def(false), + // 搜索完成自动选中所有结果,当且仅当 checkable===true 时生效 + checkOnSearch: propTypes.bool.def(false), + // 搜索完成自动select所有结果 + selectedOnSearch: propTypes.bool.def(false), }; export const treeNodeProps = { diff --git a/src/components/Tree/src/typing.ts b/src/components/Tree/src/typing.ts index a847e6f4..df8d6d9e 100644 --- a/src/components/Tree/src/typing.ts +++ b/src/components/Tree/src/typing.ts @@ -31,8 +31,11 @@ export interface TreeActionType { getCheckedKeys: () => CheckKeys; filterByLevel: (level: number) => void; insertNodeByKey: (opt: InsertNodeParams) => void; + insertNodesByKey: (opt: InsertNodeParams) => void; deleteNodeByKey: (key: string) => void; updateNodeByKey: (key: string, node: Omit) => void; + setSearchValue: (value: string) => void; + getSearchValue: () => string; } export interface InsertNodeParams { diff --git a/src/components/Tree/src/useTree.ts b/src/components/Tree/src/useTree.ts index 69c20d13..840e5bc1 100644 --- a/src/components/Tree/src/useTree.ts +++ b/src/components/Tree/src/useTree.ts @@ -8,7 +8,7 @@ import { forEach } from '/@/utils/helper/treeHelper'; export function useTree( treeDataRef: Ref, - getReplaceFields: ComputedRef + getReplaceFields: ComputedRef, ) { function getAllKeys(list?: TreeDataItem[]) { const keys: string[] = []; @@ -26,6 +26,45 @@ export function useTree( } return keys as Keys; } + // get keys that can be checked and selected + function getEnabledKeys(list?: TreeDataItem[]) { + const keys: string[] = []; + const treeData = list || unref(treeDataRef); + const { key: keyField, children: childrenField } = unref(getReplaceFields); + if (!childrenField || !keyField) return keys; + + for (let index = 0; index < treeData.length; index++) { + const node = treeData[index]; + node.disabled !== true && node.selectable !== false && keys.push(node[keyField]!); + const children = node[childrenField]; + if (children && children.length) { + keys.push(...(getEnabledKeys(children) as string[])); + } + } + return keys as Keys; + } + + function getChildrenKeys(nodeKey: string | number, list?: TreeDataItem[]): Keys { + const keys: Keys = []; + const treeData = list || unref(treeDataRef); + const { key: keyField, children: childrenField } = unref(getReplaceFields); + if (!childrenField || !keyField) return keys; + for (let index = 0; index < treeData.length; index++) { + const node = treeData[index]; + const children = node[childrenField]; + if (nodeKey === node[keyField]) { + keys.push(node[keyField]!); + if (children && children.length) { + keys.push(...(getAllKeys(children) as string[])); + } + } else { + if (children && children.length) { + keys.push(...getChildrenKeys(nodeKey, children)); + } + } + } + return keys as Keys; + } // Update node function updateNodeByKey(key: string, node: TreeDataItem, list?: TreeDataItem[]) { @@ -87,11 +126,39 @@ export function useTree( if (treeItem[keyField] === parentKey) { treeItem[childrenField] = treeItem[childrenField] || []; treeItem[childrenField][push](node); + return true; } }); treeDataRef.value = treeData; } + /** + * 批量添加节点 + */ + function insertNodesByKey({ parentKey = null, list, push = 'push' }: InsertNodeParams) { + const treeData: any = cloneDeep(unref(treeDataRef)); + if (!list || list.length < 1) { + return; + } + if (!parentKey) { + for (let i = 0; i < list.length; i++) { + treeData[push](list[i]); + } + } else { + const { key: keyField, children: childrenField } = unref(getReplaceFields); + if (!childrenField || !keyField) return; + forEach(treeData, (treeItem) => { + if (treeItem[keyField] === parentKey) { + treeItem[childrenField] = treeItem[childrenField] || []; + for (let i = 0; i < list.length; i++) { + treeItem[childrenField][push](list[i]); + } + treeDataRef.value = treeData; + return true; + } + }); + } + } // Delete node function deleteNodeByKey(key: string, list?: TreeDataItem[]) { if (!key) return; @@ -111,5 +178,14 @@ export function useTree( } } } - return { deleteNodeByKey, insertNodeByKey, filterByLevel, updateNodeByKey, getAllKeys }; + return { + deleteNodeByKey, + insertNodeByKey, + insertNodesByKey, + filterByLevel, + updateNodeByKey, + getAllKeys, + getChildrenKeys, + getEnabledKeys, + }; } diff --git a/src/components/Upload/src/BasicUpload.vue b/src/components/Upload/src/BasicUpload.vue index 8857da97..0d3ea234 100644 --- a/src/components/Upload/src/BasicUpload.vue +++ b/src/components/Upload/src/BasicUpload.vue @@ -32,6 +32,7 @@ :value="fileList" @register="registerPreviewModal" @list-change="handlePreviewChange" + @delete="handlePreviewDelete" /> @@ -45,12 +46,13 @@ import { uploadContainerProps } from './props'; import { omit } from 'lodash-es'; import { useI18n } from '/@/hooks/web/useI18n'; + import { isArray } from '/@/utils/is'; export default defineComponent({ name: 'BasicUpload', components: { UploadModal, UploadPreviewModal, Icon, Tooltip }, props: uploadContainerProps, - emits: ['change', 'delete'], + emits: ['change', 'delete', 'preview-delete', 'update:value'], setup(props, { emit, attrs }) { const { t } = useI18n(); @@ -76,20 +78,22 @@ watch( () => props.value, (value = []) => { - fileList.value = value; + fileList.value = isArray(value) ? value : []; }, - { immediate: true } + { immediate: true }, ); // 上传modal保存操作 function handleChange(urls: string[]) { fileList.value = [...unref(fileList), ...(urls || [])]; + emit('update:value', fileList.value); emit('change', fileList.value); } // 预览modal保存操作 function handlePreviewChange(urls: string[]) { fileList.value = [...(urls || [])]; + emit('update:value', fileList.value); emit('change', fileList.value); } @@ -97,6 +101,10 @@ emit('delete', record); } + function handlePreviewDelete(url: string) { + emit('preview-delete', url); + } + return { registerUploadModal, openUploadModal, @@ -108,6 +116,7 @@ showPreview, bindValue, handleDelete, + handlePreviewDelete, t, }; }, diff --git a/src/components/Upload/src/FileList.vue b/src/components/Upload/src/FileList.vue index 62b1870f..ddb087e5 100644 --- a/src/components/Upload/src/FileList.vue +++ b/src/components/Upload/src/FileList.vue @@ -15,7 +15,7 @@ nextTick(() => { modalFn?.redoModalHeight?.(); }); - } + }, ); return () => { const { columns, actionColumn, dataSource } = props; diff --git a/src/components/Upload/src/UploadModal.vue b/src/components/Upload/src/UploadModal.vue index 0e99f8e9..81a37f20 100644 --- a/src/components/Upload/src/UploadModal.vue +++ b/src/components/Upload/src/UploadModal.vue @@ -102,7 +102,7 @@ const getOkButtonProps = computed(() => { const someSuccess = fileListRef.value.some( - (item) => item.status === UploadResultStatus.SUCCESS + (item) => item.status === UploadResultStatus.SUCCESS, ); return { disabled: isUploadingRef.value || fileListRef.value.length === 0 || !someSuccess, @@ -111,7 +111,7 @@ const getUploadBtnText = computed(() => { const someError = fileListRef.value.some( - (item) => item.status === UploadResultStatus.ERROR + (item) => item.status === UploadResultStatus.ERROR, ); return isUploadingRef.value ? t('component.upload.uploading') @@ -193,7 +193,7 @@ function onUploadProgress(progressEvent: ProgressEvent) { const complete = ((progressEvent.loaded / progressEvent.total) * 100) | 0; item.percent = complete; - } + }, ); item.status = UploadResultStatus.SUCCESS; item.responseData = data; @@ -225,7 +225,7 @@ const data = await Promise.all( uploadFileList.map((item) => { return uploadApiByItem(item); - }) + }), ); isUploadingRef.value = false; // 生产环境:抛出错误 @@ -276,8 +276,8 @@ } return { - columns: createTableColumns(), - actionColumn: createActionColumn(handleRemove), + columns: createTableColumns() as any[], + actionColumn: createActionColumn(handleRemove) as any, register, closeModal, getHelpText, diff --git a/src/components/Upload/src/UploadPreviewModal.vue b/src/components/Upload/src/UploadPreviewModal.vue index dca152ab..48392d60 100644 --- a/src/components/Upload/src/UploadPreviewModal.vue +++ b/src/components/Upload/src/UploadPreviewModal.vue @@ -20,11 +20,12 @@ import { downloadByUrl } from '/@/utils/file/download'; import { createPreviewColumns, createPreviewActionColumn } from './data'; import { useI18n } from '/@/hooks/web/useI18n'; + import { isArray } from '/@/utils/is'; export default defineComponent({ components: { BasicModal, FileList }, props: previewProps, - emits: ['list-change', 'register'], + emits: ['list-change', 'register', 'delete'], setup(props, { emit }) { const [register, { closeModal }] = useModalInner(); const { t } = useI18n(); @@ -33,6 +34,7 @@ watch( () => props.value, (value) => { + if (!isArray(value)) value = []; fileListRef.value = value .filter((item) => !!item) .map((item) => { @@ -43,17 +45,18 @@ }; }); }, - { immediate: true } + { immediate: true }, ); // 删除 function handleRemove(record: PreviewFileItem) { const index = fileListRef.value.findIndex((item) => item.url === record.url); if (index !== -1) { - fileListRef.value.splice(index, 1); + const removed = fileListRef.value.splice(index, 1); + emit('delete', removed[0].url); emit( 'list-change', - fileListRef.value.map((item) => item.url) + fileListRef.value.map((item) => item.url), ); } } @@ -77,8 +80,8 @@ register, closeModal, fileListRef, - columns: createPreviewColumns(), - actionColumn: createPreviewActionColumn({ handleRemove, handleDownload }), + columns: createPreviewColumns() as any[], + actionColumn: createPreviewActionColumn({ handleRemove, handleDownload }) as any, }; }, }); diff --git a/src/components/Upload/src/useUpload.ts b/src/components/Upload/src/useUpload.ts index 213cc3a2..694cc275 100644 --- a/src/components/Upload/src/useUpload.ts +++ b/src/components/Upload/src/useUpload.ts @@ -22,7 +22,13 @@ export function useUploadType({ }); const getStringAccept = computed(() => { return unref(getAccept) - .map((item) => `.${item}`) + .map((item) => { + if (item.indexOf('/') > 0 || item.startsWith('.')) { + return item; + } else { + return `.${item}`; + } + }) .join(','); }); diff --git a/src/components/Verify/src/DragVerify.vue b/src/components/Verify/src/DragVerify.vue index e35b6dd5..e1f7d402 100644 --- a/src/components/Verify/src/DragVerify.vue +++ b/src/components/Verify/src/DragVerify.vue @@ -1,4 +1,5 @@ @@ -67,6 +144,10 @@ display: none; } + ::v-deep(.ant-pagination-disabled) { + display: inline-block !important; + } + &-item { padding: 6px; overflow: hidden; diff --git a/src/layouts/default/header/components/notify/data.ts b/src/layouts/default/header/components/notify/data.ts index 07bc4a86..15d524d7 100644 --- a/src/layouts/default/header/components/notify/data.ts +++ b/src/layouts/default/header/components/notify/data.ts @@ -1,7 +1,10 @@ export interface ListItem { id: string; avatar: string; + // 通知的标题内容 title: string; + // 是否在标题上显示删除线 + titleDelete?: boolean; datetime: string; type: string; read?: boolean; @@ -56,6 +59,55 @@ export const tabListData: TabItem[] = [ datetime: '2017-08-07', type: '1', }, + { + id: '000000005', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: + '标题可以设置自动显示省略号,本例中标题行数已设为1行,如果内容超过1行将自动截断并支持tooltip显示完整标题。', + description: '', + datetime: '2017-08-07', + type: '1', + }, + { + id: '000000006', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + description: '', + datetime: '2017-08-07', + type: '1', + }, + { + id: '000000007', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + description: '', + datetime: '2017-08-07', + type: '1', + }, + { + id: '000000008', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + description: '', + datetime: '2017-08-07', + type: '1', + }, + { + id: '000000009', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + description: '', + datetime: '2017-08-07', + type: '1', + }, + { + id: '000000010', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png', + title: '左侧图标用于区分不同的类型', + description: '', + datetime: '2017-08-07', + type: '1', + }, ], }, { @@ -84,7 +136,8 @@ export const tabListData: TabItem[] = [ id: '000000008', avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg', title: '标题', - description: '这种模板用于提醒谁与你发生了互动', + description: + '请将鼠标移动到此处,以便测试超长的消息在此处将如何处理。本例中设置的描述最大行数为2,超过2行的描述内容将被省略并且可以通过tooltip查看完整内容', datetime: '2017-08-07', type: '2', clickClose: true, diff --git a/src/layouts/default/header/components/notify/index.vue b/src/layouts/default/header/components/notify/index.vue index d0f28086..da66affb 100644 --- a/src/layouts/default/header/components/notify/index.vue +++ b/src/layouts/default/header/components/notify/index.vue @@ -6,13 +6,15 @@ - diff --git a/src/views/dashboard/analysis/components/SiteAnalysis.vue b/src/views/dashboard/analysis/components/SiteAnalysis.vue index 12c4c1b6..de0ebcf9 100644 --- a/src/views/dashboard/analysis/components/SiteAnalysis.vue +++ b/src/views/dashboard/analysis/components/SiteAnalysis.vue @@ -13,34 +13,26 @@

- diff --git a/src/views/dashboard/analysis/components/VisitAnalysis.vue b/src/views/dashboard/analysis/components/VisitAnalysis.vue index d2cc2faa..14291667 100644 --- a/src/views/dashboard/analysis/components/VisitAnalysis.vue +++ b/src/views/dashboard/analysis/components/VisitAnalysis.vue @@ -1,110 +1,106 @@ - diff --git a/src/views/dashboard/analysis/components/VisitAnalysisBar.vue b/src/views/dashboard/analysis/components/VisitAnalysisBar.vue index 7384018e..4883d878 100644 --- a/src/views/dashboard/analysis/components/VisitAnalysisBar.vue +++ b/src/views/dashboard/analysis/components/VisitAnalysisBar.vue @@ -1,62 +1,58 @@ - diff --git a/src/views/dashboard/analysis/components/VisitRadar.vue b/src/views/dashboard/analysis/components/VisitRadar.vue index d9fd40cd..8f7ed03b 100644 --- a/src/views/dashboard/analysis/components/VisitRadar.vue +++ b/src/views/dashboard/analysis/components/VisitRadar.vue @@ -3,104 +3,98 @@
- diff --git a/src/views/dashboard/analysis/components/VisitSource.vue b/src/views/dashboard/analysis/components/VisitSource.vue index 85f2c332..411ba0d7 100644 --- a/src/views/dashboard/analysis/components/VisitSource.vue +++ b/src/views/dashboard/analysis/components/VisitSource.vue @@ -3,86 +3,78 @@
- diff --git a/src/views/dashboard/analysis/index.vue b/src/views/dashboard/analysis/index.vue index ef2e0cec..c35fa690 100644 --- a/src/views/dashboard/analysis/index.vue +++ b/src/views/dashboard/analysis/index.vue @@ -2,38 +2,24 @@
-
- - +
- diff --git a/src/views/dashboard/workbench/components/DynamicInfo.vue b/src/views/dashboard/workbench/components/DynamicInfo.vue index 20b2acb7..4be8f1ff 100644 --- a/src/views/dashboard/workbench/components/DynamicInfo.vue +++ b/src/views/dashboard/workbench/components/DynamicInfo.vue @@ -3,7 +3,7 @@ - + - diff --git a/src/views/dashboard/workbench/components/ProjectCard.vue b/src/views/dashboard/workbench/components/ProjectCard.vue index 3911b48e..9fa4ac63 100644 --- a/src/views/dashboard/workbench/components/ProjectCard.vue +++ b/src/views/dashboard/workbench/components/ProjectCard.vue @@ -5,12 +5,12 @@ diff --git a/src/views/dashboard/workbench/components/SaleRadar.vue b/src/views/dashboard/workbench/components/SaleRadar.vue index cfd5d0ff..38fdd37e 100644 --- a/src/views/dashboard/workbench/components/SaleRadar.vue +++ b/src/views/dashboard/workbench/components/SaleRadar.vue @@ -3,104 +3,98 @@
- diff --git a/src/views/dashboard/workbench/components/WorkbenchHeader.vue b/src/views/dashboard/workbench/components/WorkbenchHeader.vue index e9dde327..ef4d90d7 100644 --- a/src/views/dashboard/workbench/components/WorkbenchHeader.vue +++ b/src/views/dashboard/workbench/components/WorkbenchHeader.vue @@ -22,19 +22,12 @@ - diff --git a/src/views/dashboard/workbench/index.vue b/src/views/dashboard/workbench/index.vue index dd2dad6b..5ee292e2 100644 --- a/src/views/dashboard/workbench/index.vue +++ b/src/views/dashboard/workbench/index.vue @@ -10,11 +10,7 @@ - + @@ -22,9 +18,8 @@ - diff --git a/src/views/demo/charts/SaleRadar.vue b/src/views/demo/charts/SaleRadar.vue index 3e98887c..8dd9b01d 100644 --- a/src/views/demo/charts/SaleRadar.vue +++ b/src/views/demo/charts/SaleRadar.vue @@ -4,8 +4,9 @@ diff --git a/src/views/demo/comp/card-list/index.vue b/src/views/demo/comp/card-list/index.vue new file mode 100644 index 00000000..f13af04c --- /dev/null +++ b/src/views/demo/comp/card-list/index.vue @@ -0,0 +1,32 @@ + + diff --git a/src/views/demo/comp/cropper/index.vue b/src/views/demo/comp/cropper/index.vue index 416a2962..49a6c6c5 100644 --- a/src/views/demo/comp/cropper/index.vue +++ b/src/views/demo/comp/cropper/index.vue @@ -1,7 +1,7 @@ diff --git a/src/views/demo/editor/markdown/index.vue b/src/views/demo/editor/markdown/index.vue index b9c29058..968bd910 100644 --- a/src/views/demo/editor/markdown/index.vue +++ b/src/views/demo/editor/markdown/index.vue @@ -1,16 +1,30 @@ diff --git a/src/views/demo/feat/ripple/index.vue b/src/views/demo/feat/ripple/index.vue index afd4b0a9..a7956e8a 100644 --- a/src/views/demo/feat/ripple/index.vue +++ b/src/views/demo/feat/ripple/index.vue @@ -1,6 +1,6 @@ + + diff --git a/src/views/demo/system/account/DeptTree.vue b/src/views/demo/system/account/DeptTree.vue index a449862d..b96fd12a 100644 --- a/src/views/demo/system/account/DeptTree.vue +++ b/src/views/demo/system/account/DeptTree.vue @@ -29,9 +29,8 @@ treeData.value = (await getDeptList()) as unknown as TreeItem[]; } - function handleSelect(keys: string, e) { + function handleSelect(keys) { emit('select', keys[0]); - console.log(keys, e); } onMounted(() => { diff --git a/src/views/demo/system/account/account.data.ts b/src/views/demo/system/account/account.data.ts index 9cca907e..d2bbb228 100644 --- a/src/views/demo/system/account/account.data.ts +++ b/src/views/demo/system/account/account.data.ts @@ -1,4 +1,4 @@ -import { getAllRoleList } from '/@/api/demo/system'; +import { getAllRoleList, isAccountExist } from '/@/api/demo/system'; import { BasicColumn } from '/@/components/Table'; import { FormSchema } from '/@/components/Table'; @@ -54,7 +54,24 @@ export const accountFormSchema: FormSchema[] = [ field: 'account', label: '用户名', component: 'Input', - required: true, + helpMessage: ['本字段演示异步验证', '不能输入带有admin的用户名'], + rules: [ + { + required: true, + message: '请输入用户名', + }, + { + validator(_, value) { + return new Promise((resolve, reject) => { + isAccountExist(value) + .then(() => resolve()) + .catch((err) => { + reject(err.message || '验证失败'); + }); + }); + }, + }, + ], }, { field: 'pwd', diff --git a/src/views/demo/system/account/index.vue b/src/views/demo/system/account/index.vue index 158ebd55..d75a77c0 100644 --- a/src/views/demo/system/account/index.vue +++ b/src/views/demo/system/account/index.vue @@ -1,20 +1,27 @@ - diff --git a/src/views/sys/error-log/index.vue b/src/views/sys/error-log/index.vue index c1c09023..69b77db1 100644 --- a/src/views/sys/error-log/index.vue +++ b/src/views/sys/error-log/index.vue @@ -27,91 +27,66 @@ - diff --git a/src/views/sys/exception/Exception.vue b/src/views/sys/exception/Exception.vue index dab9c576..6e56f086 100644 --- a/src/views/sys/exception/Exception.vue +++ b/src/views/sys/exception/Exception.vue @@ -1,19 +1,14 @@