Compare commits
103 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d9a4ab8f86 | ||
|
bd5ab754ca | ||
|
2f2749e644 | ||
|
b61d7b359f | ||
|
99f070190c | ||
|
891ad9d6a2 | ||
|
22ee607aea | ||
|
8255f9063b | ||
|
59319aac8b | ||
|
6be410a03c | ||
|
1730ecf4ce | ||
|
51c3ac8631 | ||
|
08b7b1b641 | ||
|
1daf83cf9d | ||
|
a8ca71ae61 | ||
|
e08626d443 | ||
|
583feae7b7 | ||
|
92cfa9763b | ||
|
881366c78b | ||
|
f5cc6d2ff4 | ||
|
4db365038c | ||
|
a9ee9ebcf9 | ||
|
b004c224c2 | ||
|
399d3b2987 | ||
|
b87eb6fd0a | ||
|
a0246e31df | ||
|
e1cd14a946 | ||
|
02380f69e1 | ||
|
5208272456 | ||
|
551292078e | ||
|
79cd159154 | ||
|
6d26300181 | ||
|
0dd6665b2a | ||
|
bbdd44a917 | ||
|
f8690a0b73 | ||
|
b843eda26f | ||
|
1b48bc8049 | ||
|
21ff69b10e | ||
|
66f5d6d423 | ||
|
fd9ad7eb21 | ||
|
a0618c01ba | ||
|
7a3c1ab3cd | ||
|
5032a75221 | ||
|
384c789fc0 | ||
|
281675bdaf | ||
|
0004f1318c | ||
|
ab39864ef4 | ||
|
4e14ab22ba | ||
|
cd21f1e050 | ||
|
5fbb664da7 | ||
|
244ab7f990 | ||
|
96152ed134 | ||
|
37ab40f188 | ||
|
91ae63a8c5 | ||
|
6d7e92fed1 | ||
|
0706f37254 | ||
|
8a9695cf7c | ||
|
d395c9c6ba | ||
|
3dec3c002f | ||
|
bae1122e58 | ||
|
37e9d8a1ac | ||
|
dea9664677 | ||
|
775d7a2d32 | ||
|
13e7a13e9d | ||
|
47afa9209e | ||
|
933ced4ac4 | ||
|
8816e61e3a | ||
|
edf82ea727 | ||
|
a75cf8394e | ||
|
33a89834d7 | ||
|
649aab9c7d | ||
|
7a6ee58e6d | ||
|
b402a8924f | ||
|
9a5523d1c7 | ||
|
1e6d0283c9 | ||
|
a8377f8d45 | ||
|
cd653c83f0 | ||
|
643b36fc42 | ||
|
17ed4d640d | ||
|
613d20fc1b | ||
|
8934499349 | ||
|
bb86962186 | ||
|
30f598dfa5 | ||
|
de00537fdd | ||
|
5238ee7ad9 | ||
|
3ca9a7b5bc | ||
|
fae4924102 | ||
|
295240f2a3 | ||
|
1d9f1cf465 | ||
|
a56061ac81 | ||
|
d24f334a81 | ||
|
cc7726e1c2 | ||
|
b8159a0d73 | ||
|
2f9bc7e187 | ||
|
d6f487a48c | ||
|
75dc3b6216 | ||
|
4be7db4944 | ||
|
884cf92640 | ||
|
fb0c092a2c | ||
|
1ce0038c13 | ||
|
88d804df89 | ||
|
efe0c83e4f | ||
|
ada3e80c7e |
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -32,7 +32,7 @@ body:
|
||||
label: 验证 (Verify)
|
||||
description: 在提交问题之前,请确保您执行以下操作 (Before submitting an issue, please ensure you do the following)
|
||||
options:
|
||||
- label: 是否仔细阅读过 [文档](https://yiming_chang.gitee.io/pure-admin-doc/) (Have you read [documentation](https://yiming_chang.gitee.io/pure-admin-doc/) carefully)
|
||||
- label: 是否仔细阅读过 [文档](https://pure-admin.cn/) (Have you read [documentation](https://pure-admin.cn/) carefully)
|
||||
required: true
|
||||
- label: 检查是否存在相同或类似的问题 [issues](https://github.com/pure-admin/vue-pure-admin/issues) (Check for the same or similar [issues](https://github.com/pure-admin/vue-pure-admin/issues))
|
||||
required: true
|
||||
|
2
.github/workflows/linter.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 8.6.10
|
||||
version: 9
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
|
42
.github/workflows/pages.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
name: Build and Deploy
|
||||
permissions:
|
||||
contents: write
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- pages
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
concurrency: ci-${{ github.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout 🛎️
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: https://registry.npmjs.com/
|
||||
|
||||
- uses: pnpm/action-setup@v3
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 9
|
||||
run_install: false
|
||||
|
||||
- name: Deploy 🔧
|
||||
run: |
|
||||
pnpm install --no-frozen-lockfile
|
||||
sed -i "s#VITE_PUBLIC_PATH = /#VITE_PUBLIC_PATH = /vue-pure-admin/#g" $(pwd)/.env.production
|
||||
pnpm build
|
||||
cd dist
|
||||
touch README.md .nojekyll
|
||||
|
||||
- name: Deploy 🚀
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
folder: dist
|
||||
clean: true
|
@ -3,7 +3,7 @@
|
||||
"prettier --cache --ignore-unknown --write",
|
||||
"eslint --cache --fix"
|
||||
],
|
||||
"{!(package)*.json,*.code-snippets,.!({browserslist,nvm})*rc}": [
|
||||
"{!(package)*.json,*.code-snippets,.!({browserslist,npm,nvm})*rc}": [
|
||||
"prettier --cache --write--parser json"
|
||||
],
|
||||
"package.json": ["prettier --cache --write"],
|
||||
|
5
.npmrc
@ -1,3 +1,4 @@
|
||||
shamefully-hoist=true
|
||||
strict-peer-dependencies=false
|
||||
shell-emulator=true
|
||||
shamefully-hoist=true
|
||||
enable-pre-post-scripts=false
|
||||
strict-peer-dependencies=false
|
1
.vscode/extensions.json
vendored
@ -1,6 +1,7 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"christian-kohler.path-intellisense",
|
||||
"warmthsea.vscode-custom-code-color",
|
||||
"vscode-icons-team.vscode-icons",
|
||||
"davidanson.vscode-markdownlint",
|
||||
"ms-azuretools.vscode-docker",
|
||||
|
25
.vscode/settings.json
vendored
@ -31,11 +31,18 @@
|
||||
"i18n-ally.keystyle": "nested",
|
||||
"i18n-ally.sortKeys": true,
|
||||
"i18n-ally.namespace": true,
|
||||
"i18n-ally.enabledParsers": ["yaml", "js"],
|
||||
"i18n-ally.enabledParsers": [
|
||||
"yaml",
|
||||
"js"
|
||||
],
|
||||
"i18n-ally.sourceLanguage": "en",
|
||||
"i18n-ally.displayLanguage": "zh-CN",
|
||||
"i18n-ally.enabledFrameworks": ["vue"],
|
||||
"iconify.excludes": ["el"],
|
||||
"i18n-ally.enabledFrameworks": [
|
||||
"vue"
|
||||
],
|
||||
"iconify.excludes": [
|
||||
"el"
|
||||
],
|
||||
"vsmqtt.brokerProfiles": [
|
||||
{
|
||||
"name": "broker.emqx.io",
|
||||
@ -43,5 +50,15 @@
|
||||
"port": 1883,
|
||||
"clientId": "vsmqtt_client_db34"
|
||||
}
|
||||
]
|
||||
],
|
||||
"vscodeCustomCodeColor.highlightValue": [
|
||||
"v-loading",
|
||||
"v-auth",
|
||||
"v-copy",
|
||||
"v-longpress",
|
||||
"v-optimize",
|
||||
"v-perms",
|
||||
"v-ripple"
|
||||
],
|
||||
"vscodeCustomCodeColor.highlightValueColor": "#b392f0",
|
||||
}
|
@ -1,3 +1,127 @@
|
||||
# 6.0.0 (2025-04-10)
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- Refactor the icon module, use `@iconify/json` to replace the `@iconify-icons/*` dependency that is no longer maintained and updated, optimize the user experience, ensure that the icon library can be continuously updated and support `Tree-shaking`
|
||||
- Upgrade `tailwindcss` to `v4` version, bringing faster build speed, simpler installation and configuration, and providing a dedicated `vite` plug-in
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Add `Ai` chat component example
|
||||
- Add `tagOnClick` tag to switch global public events
|
||||
- Add code editor example
|
||||
- Add `Markdown` example
|
||||
- Add slider example
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fix `aria-hidden` error
|
||||
- Fix the problem that code hints cannot be displayed when using `this` syntax and update `pinia` related syntax
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Fix broken links in the waterfall infinite scrolling example
|
||||
- Update `vue-flow`, related compatibility processing
|
||||
- Delete the deprecated dependency package `eslint-define-config`, upgrade `eslint` to the latest version, related compatibility processing
|
||||
- Optimize `src/style/dark.scss` syntax
|
||||
- Optimize login parameter transfer
|
||||
- Use `keydown` to replace `keypress`, the `keypress` event has been deprecated
|
||||
|
||||
# 5.9.0 (2024-12-10)
|
||||
|
||||
### ✔️Refactor
|
||||
|
||||
- Upgrade `vite` to `v6` version, upgrade `sass` to the latest version, reconstruct the theme writing method, and deprecate [@pureadmin/theme](https://www.npmjs.com/package/@pureadmin/theme) , click to view [Related optimization point details](https://github.com/pure-admin/vue-pure-admin/pull/1188#issue-2630095115). For users who have the [Max version](https://pure-admin.cn/pages/service/#max-%E7%89%88%E6%9C%AC), it is strongly recommended to upgrade. Subsequent Max version users will enjoy a more modern, beautiful and highly customized theme color
|
||||
- Use [code-inspector-plugin](https://www.npmjs.com/package/code-inspector-plugin) to replace [vite-plugin-vue-inspector](https://www.npmjs.com/package/vite-plugin-vue-inspector)
|
||||
|
||||
### 🎫Feat
|
||||
|
||||
- Added `ReDrawer` component
|
||||
- `pure-table` adds dynamic table header example
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed an issue where the height of the table does not automatically adapt when the full screen function is enabled or disabled after the table is expanded in the menu and department management
|
||||
|
||||
### 🍏Perf
|
||||
|
||||
- Optimize the layout of the department tree on the left side of user management
|
||||
|
||||
# 5.8.0 (2024-08-19)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Added a second button permission command (judged based on the `permissions` field returned by the login interface)
|
||||
- Functional pop-up box `ReDialog` adds whether to enable the `loading` loading animation function after clicking the confirmation button
|
||||
- `PureTableBar` component adds full screen and exit full screen functions
|
||||
- `VxeTableBar` component adds full screen and exit full screen functions
|
||||
- The OK button of the `ReDialog` component provides the close button animation `closeLoading` function
|
||||
- Add development environment code debugging `vite-plugin-vue-inspector` plug-in to improve development experience
|
||||
- Added `vite-plugin-checker` plugin for stricter type and `eslint` verification
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed the problem that the current tab cannot be closed after configuring the routing attribute `fixedTag` to `false`
|
||||
- Fixed the issue where `logo` cannot be hidden in top menu mode
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Optimize type hints for custom instructions
|
||||
- Optimize the press enter login function on the login page
|
||||
- Optimize the mask level of the left menu on the mobile side
|
||||
- Optimize system management-permission function style of role management
|
||||
- Upgraded dependencies, compatible with the latest version of `element-plus`
|
||||
|
||||
# 5.7.0 (2024-06-04)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Add Google style tabs
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed the issue where the text exceeds and is not hidden after the menu is folded in Firefox browser
|
||||
|
||||
# 5.6.0 (2024-05-14)
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- Upgrade `pnpm` to `v9` version, requiring `pnpm` version `>=9`
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed the issue where clicking on an external link would jump twice
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Optimize `ReSegmented` component
|
||||
|
||||
# 5.5.0 (2024-05-07)
|
||||
|
||||
### 📄 Docs
|
||||
|
||||
The addresses of the document site and full version preview site have been changed!
|
||||
|
||||
- The latest document site address: https://pure-admin.cn
|
||||
- The latest full version preview site address: https://pure-admin.github.io/vue-pure-admin
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- Reconstruct the `layout` file naming convention to make it more readable
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Add new component `ReVxeTableBar` to be used with `vxe-table`
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed the issue where the background color is white when `FixedHeader` is set to `false` in dark mode
|
||||
- Fixed the problem of delayed closing of functional pop-up window `ReDialog` when clicking the cancel button
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Optimize account settings-avatar upload function
|
||||
|
||||
# 5.4.0 (2024-04-18)
|
||||
|
||||
### 🎫 Feat
|
||||
@ -30,7 +154,7 @@
|
||||
|
||||
# 5.3.0 (2024-03-28)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Reconstruct internationalized file naming conventions and demo pages with code location hints
|
||||
|
||||
@ -43,7 +167,7 @@
|
||||
|
||||
# 5.2.0 (2024-03-22)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Place the full screen button at the top to make it visible and easy to operate
|
||||
|
||||
@ -79,7 +203,7 @@
|
||||
|
||||
# 5.1.0 (2024-03-02)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Reconstruct the tab page `UI` to make it more convenient to click the close button
|
||||
|
||||
@ -101,7 +225,7 @@
|
||||
|
||||
Totally `ESM` version
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Upgrade `vite` to `v5` version, specify `node` version `>18.18.0`, `pnpm` version `>=8.6.10`
|
||||
- Use [vite-plugin-fake-server](https://www.npmjs.com/package/vite-plugin-fake-server) to replace [vite-plugin-mock](https://www.npmjs.com/package/vite-plugin-mock), use [@faker-js/faker](https://www.npmjs.com/package/@faker-js/faker) to replace [mockjs](https://www.npmjs.com/package/mockjs)
|
||||
@ -192,7 +316,7 @@ Totally `ESM` version
|
||||
|
||||
# 4.5.0 (2023-06-26)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Refactor image crop `ReCropper` component, add more useful functions
|
||||
|
||||
@ -305,7 +429,7 @@ Totally `ESM` version
|
||||
|
||||
[View 4.0.0 version optimization details](https://github.com/pure-admin/vue-pure-admin/issues/428#issuecomment-1422191158)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Use `css` pseudo-class `before` to refactor the activation background of the menu, similar to [ant.design-menu](https://ant.design/components/menu-cn#components-menu-demo-inline-collapsed)
|
||||
|
||||
@ -376,10 +500,10 @@ Totally `ESM` version
|
||||
|
||||
# 3.9.5 (2022-12-13)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- completely removed `lodash` and its related libraries
|
||||
[Click here to see Why Removed? How to integrate it yourself? ](https://yiming_chang.gitee.io/pure-admin-doc/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-5-%E7 %89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-lodash-%E5%92%8C% E5%85%B6%E7%9B%B8%E5%85%B3%E5%BA%93-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9 %99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||
[Click here to see Why Removed? How to integrate it yourself? ](https://pure-admin.cn/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-5-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-lodash-%E5%92%8C%E5%85%B6%E7%9B%B8%E5%85%B3%E5%BA%93-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
@ -396,10 +520,10 @@ Totally `ESM` version
|
||||
|
||||
# 3.9.4 (2022-12-05)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Completely removed `vxe-table`, after removal, the overall package size of the full version is reduced by `1.82MB`, and the initial startup time is basically the same as the lite version 🐮
|
||||
[Click here to see Why Removed? How to integrate it yourself?](https://yiming_chang.gitee.io/pure-admin-doc/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-4-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-vxe-table-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||
[Click here to see Why Removed? How to integrate it yourself?](https://pure-admin.cn/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-4-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-vxe-table-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
@ -505,13 +629,13 @@ Totally `ESM` version
|
||||
|
||||
# 3.7.0 (2022-11-21)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Replace `driver.js` with `intro.js`
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Add front-end single sign-on, test address https://yiming_chang.gitee.io/vue-pure-admin/#/pure-table/index?username=sso&roles=admin&accessToken=eyJhbGciOiJIUzUxMiJ9.admin
|
||||
- Add front-end single sign-on, test address https://pure-admin.github.io/vue-pure-admin/#/pure-table/index?username=sso&roles=admin&accessToken=eyJhbGciOiJIUzUxMiJ9.admin
|
||||
- Add more examples for [@pureadmin/table](https://github.com/pure-admin/pure-admin-table) and `element-plus` [table](https://element-plus.org /zh-CN/component/table.html) example remains the same
|
||||
- Rich watermark function page (supports customizing various colors, shadows, text, additional attributes, setting undeletable watermarks and setting watermarks for specified elements)
|
||||
- Optimize the menu, add `MenuArrowIconNoTransition` global configuration, configure it in `public/platform-config.json`, for the left menu mode, the menu expansion can be set `MenuArrowIconNoTransition: true` to solve
|
||||
@ -556,7 +680,7 @@ Totally `ESM` version
|
||||
|
||||
# 3.6.2 (2022-10-27)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Replace `/@/` alias with `@/` alias
|
||||
|
||||
@ -584,7 +708,7 @@ Totally `ESM` version
|
||||
- Add typewriter component `demo`
|
||||
- Added `json` editor `demo`
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Refactor the permission module, adopt the most commonly used `RBAC` (Role-Based Access List): role-based permission control (User -> Role -> Permission), and update the page permission and button permission `demo` example, button Permissions support three operation modes (judging permissions in component mode, judging permissions in function mode, and judging permissions in instruction mode)
|
||||
|
||||
@ -610,9 +734,9 @@ Totally `ESM` version
|
||||
- Add `element-plus` seamless scrolling `Table` page demo
|
||||
- Open `vscode` bracket pair guide
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Replace `unocss` with `tailwindcss`, add `tailwindcss` [documentation](https://yiming_chang.gitee.io/pure-admin-doc/pages/tailwindcss/)
|
||||
- Replace `unocss` with `tailwindcss`, add `tailwindcss` [documentation](https://pure-admin.cn/pages/tailwindcss/)
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
@ -660,7 +784,7 @@ Totally `ESM` version
|
||||
- Added export `excel` page demo
|
||||
- Added blank page demo without `Layout`
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Refactored the theme color to adapt to `element-plus` dark mode (also solved the problem that the same element `css` in `3.3.0` and earlier versions was overwritten many times, resulting in poor style debugging)
|
||||
- Refactored route reset function
|
||||
@ -696,7 +820,7 @@ Totally `ESM` version
|
||||
- Added pre-release packaging mode
|
||||
- Add [hooks] to close a tag (https://github.com/pure-admin/vue-pure-admin/commit/5e8723a031923e79f507e5a17151d3bd88a51523)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Refactored the landing page to be more inclined to the actual business scenario
|
||||
- Use `unocss` instead of `windicss`, `unocss` has better performance in development environment, no memory leaks, and `api` is compatible with `windicss`
|
||||
@ -775,7 +899,7 @@ Totally `ESM` version
|
||||
- Added `WindiCSS` support
|
||||
- Add online environment remove console plugin `vite-plugin-remove-console`
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Replace `@element-plus/icons-vue` with `@iconify-icons/ep`
|
||||
|
||||
|
162
CHANGELOG.md
@ -1,3 +1,127 @@
|
||||
# 6.0.0 (2025-04-10)
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- Refactor the icon module, use `@iconify/json` to replace the `@iconify-icons/*` dependency that is no longer maintained and updated, optimize the user experience, ensure that the icon library can be continuously updated and support `Tree-shaking`
|
||||
- Upgrade `tailwindcss` to `v4` version, bringing faster build speed, simpler installation and configuration, and providing a dedicated `vite` plug-in
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Add `Ai` chat component example
|
||||
- Add `tagOnClick` tag to switch global public events
|
||||
- Add code editor example
|
||||
- Add `Markdown` example
|
||||
- Add slider example
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fix `aria-hidden` error
|
||||
- Fix the problem that code hints cannot be displayed when using `this` syntax and update `pinia` related syntax
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Fix broken links in the waterfall infinite scrolling example
|
||||
- Update `vue-flow`, related compatibility processing
|
||||
- Delete the deprecated dependency package `eslint-define-config`, upgrade `eslint` to the latest version, related compatibility processing
|
||||
- Optimize `src/style/dark.scss` syntax
|
||||
- Optimize login parameter transfer
|
||||
- Use `keydown` to replace `keypress`, the `keypress` event has been deprecated
|
||||
|
||||
# 5.9.0 (2024-12-10)
|
||||
|
||||
### ✔️Refactor
|
||||
|
||||
- Upgrade `vite` to `v6` version, upgrade `sass` to the latest version, reconstruct the theme writing method, and deprecate [@pureadmin/theme](https://www.npmjs.com/package/@pureadmin/theme) , click to view [Related optimization point details](https://github.com/pure-admin/vue-pure-admin/pull/1188#issue-2630095115). For users who have the [Max version](https://pure-admin.cn/pages/service/#max-%E7%89%88%E6%9C%AC), it is strongly recommended to upgrade. Subsequent Max version users will enjoy a more modern, beautiful and highly customized theme color
|
||||
- Use [code-inspector-plugin](https://www.npmjs.com/package/code-inspector-plugin) to replace [vite-plugin-vue-inspector](https://www.npmjs.com/package/vite-plugin-vue-inspector)
|
||||
|
||||
### 🎫Feat
|
||||
|
||||
- Added `ReDrawer` component
|
||||
- `pure-table` adds dynamic table header example
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed an issue where the height of the table does not automatically adapt when the full screen function is enabled or disabled after the table is expanded in the menu and department management
|
||||
|
||||
### 🍏Perf
|
||||
|
||||
- Optimize the layout of the department tree on the left side of user management
|
||||
|
||||
# 5.8.0 (2024-08-19)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Added a second button permission command (judged based on the `permissions` field returned by the login interface)
|
||||
- Functional pop-up box `ReDialog` adds whether to enable the `loading` loading animation function after clicking the confirmation button
|
||||
- `PureTableBar` component adds full screen and exit full screen functions
|
||||
- `VxeTableBar` component adds full screen and exit full screen functions
|
||||
- The OK button of the `ReDialog` component provides the close button animation `closeLoading` function
|
||||
- Add development environment code debugging `vite-plugin-vue-inspector` plug-in to improve development experience
|
||||
- Added `vite-plugin-checker` plugin for stricter type and `eslint` verification
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed the problem that the current tab cannot be closed after configuring the routing attribute `fixedTag` to `false`
|
||||
- Fixed the issue where `logo` cannot be hidden in top menu mode
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Optimize type hints for custom instructions
|
||||
- Optimize the press enter login function on the login page
|
||||
- Optimize the mask level of the left menu on the mobile side
|
||||
- Optimize system management-permission function style of role management
|
||||
- Upgraded dependencies, compatible with the latest version of `element-plus`
|
||||
|
||||
# 5.7.0 (2024-06-04)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Add Google style tabs
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed the issue where the text exceeds and is not hidden after the menu is folded in Firefox browser
|
||||
|
||||
# 5.6.0 (2024-05-14)
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- Upgrade `pnpm` to `v9` version, requiring `pnpm` version `>=9`
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed the issue where clicking on an external link would jump twice
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Optimize `ReSegmented` component
|
||||
|
||||
# 5.5.0 (2024-05-07)
|
||||
|
||||
### 📄 Docs
|
||||
|
||||
The addresses of the document site and full version preview site have been changed!
|
||||
|
||||
- The latest document site address: https://pure-admin.cn
|
||||
- The latest full version preview site address: https://pure-admin.github.io/vue-pure-admin
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- Reconstruct the `layout` file naming convention to make it more readable
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Add new component `ReVxeTableBar` to be used with `vxe-table`
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fixed the issue where the background color is white when `FixedHeader` is set to `false` in dark mode
|
||||
- Fixed the problem of delayed closing of functional pop-up window `ReDialog` when clicking the cancel button
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- Optimize account settings-avatar upload function
|
||||
|
||||
# 5.4.0 (2024-04-18)
|
||||
|
||||
### 🎫 Feat
|
||||
@ -30,7 +154,7 @@
|
||||
|
||||
# 5.3.0 (2024-03-28)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Reconstruct internationalized file naming conventions and demo pages with code location hints
|
||||
|
||||
@ -43,7 +167,7 @@
|
||||
|
||||
# 5.2.0 (2024-03-22)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Place the full screen button at the top to make it visible and easy to operate
|
||||
|
||||
@ -79,7 +203,7 @@
|
||||
|
||||
# 5.1.0 (2024-03-02)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Reconstruct the tab page `UI` to make it more convenient to click the close button
|
||||
|
||||
@ -101,7 +225,7 @@
|
||||
|
||||
Totally `ESM` version
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Upgrade `vite` to `v5` version, specify `node` version `>18.18.0`, `pnpm` version `>=8.6.10`
|
||||
- Use [vite-plugin-fake-server](https://www.npmjs.com/package/vite-plugin-fake-server) to replace [vite-plugin-mock](https://www.npmjs.com/package/vite-plugin-mock), use [@faker-js/faker](https://www.npmjs.com/package/@faker-js/faker) to replace [mockjs](https://www.npmjs.com/package/mockjs)
|
||||
@ -192,7 +316,7 @@ Totally `ESM` version
|
||||
|
||||
# 4.5.0 (2023-06-26)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Refactor image crop `ReCropper` component, add more useful functions
|
||||
|
||||
@ -305,7 +429,7 @@ Totally `ESM` version
|
||||
|
||||
[View 4.0.0 version optimization details](https://github.com/pure-admin/vue-pure-admin/issues/428#issuecomment-1422191158)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Use `css` pseudo-class `before` to refactor the activation background of the menu, similar to [ant.design-menu](https://ant.design/components/menu-cn#components-menu-demo-inline-collapsed)
|
||||
|
||||
@ -376,10 +500,10 @@ Totally `ESM` version
|
||||
|
||||
# 3.9.5 (2022-12-13)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- completely removed `lodash` and its related libraries
|
||||
[Click here to see Why Removed? How to integrate it yourself? ](https://yiming_chang.gitee.io/pure-admin-doc/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-5-%E7 %89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-lodash-%E5%92%8C% E5%85%B6%E7%9B%B8%E5%85%B3%E5%BA%93-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9 %99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||
[Click here to see Why Removed? How to integrate it yourself? ](https://pure-admin.cn/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-5-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-lodash-%E5%92%8C%E5%85%B6%E7%9B%B8%E5%85%B3%E5%BA%93-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
@ -396,10 +520,10 @@ Totally `ESM` version
|
||||
|
||||
# 3.9.4 (2022-12-05)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Completely removed `vxe-table`, after removal, the overall package size of the full version is reduced by `1.82MB`, and the initial startup time is basically the same as the lite version 🐮
|
||||
[Click here to see Why Removed? How to integrate it yourself?](https://yiming_chang.gitee.io/pure-admin-doc/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-4-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-vxe-table-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||
[Click here to see Why Removed? How to integrate it yourself?](https://pure-admin.cn/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-4-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-vxe-table-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
@ -505,13 +629,13 @@ Totally `ESM` version
|
||||
|
||||
# 3.7.0 (2022-11-21)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Replace `driver.js` with `intro.js`
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- Add front-end single sign-on, test address https://yiming_chang.gitee.io/vue-pure-admin/#/pure-table/index?username=sso&roles=admin&accessToken=eyJhbGciOiJIUzUxMiJ9.admin
|
||||
- Add front-end single sign-on, test address https://pure-admin.github.io/vue-pure-admin/#/pure-table/index?username=sso&roles=admin&accessToken=eyJhbGciOiJIUzUxMiJ9.admin
|
||||
- Add more examples for [@pureadmin/table](https://github.com/pure-admin/pure-admin-table) and `element-plus` [table](https://element-plus.org /zh-CN/component/table.html) example remains the same
|
||||
- Rich watermark function page (supports customizing various colors, shadows, text, additional attributes, setting undeletable watermarks and setting watermarks for specified elements)
|
||||
- Optimize the menu, add `MenuArrowIconNoTransition` global configuration, configure it in `public/platform-config.json`, for the left menu mode, the menu expansion can be set `MenuArrowIconNoTransition: true` to solve
|
||||
@ -556,7 +680,7 @@ Totally `ESM` version
|
||||
|
||||
# 3.6.2 (2022-10-27)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Replace `/@/` alias with `@/` alias
|
||||
|
||||
@ -584,7 +708,7 @@ Totally `ESM` version
|
||||
- Add typewriter component `demo`
|
||||
- Added `json` editor `demo`
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Refactor the permission module, adopt the most commonly used `RBAC` (Role-Based Access List): role-based permission control (User -> Role -> Permission), and update the page permission and button permission `demo` example, button Permissions support three operation modes (judging permissions in component mode, judging permissions in function mode, and judging permissions in instruction mode)
|
||||
|
||||
@ -610,9 +734,9 @@ Totally `ESM` version
|
||||
- Add `element-plus` seamless scrolling `Table` page demo
|
||||
- Open `vscode` bracket pair guide
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Replace `unocss` with `tailwindcss`, add `tailwindcss` [documentation](https://yiming_chang.gitee.io/pure-admin-doc/pages/tailwindcss/)
|
||||
- Replace `unocss` with `tailwindcss`, add `tailwindcss` [documentation](https://pure-admin.cn/pages/tailwindcss/)
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
@ -660,7 +784,7 @@ Totally `ESM` version
|
||||
- Added export `excel` page demo
|
||||
- Added blank page demo without `Layout`
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Refactored the theme color to adapt to `element-plus` dark mode (also solved the problem that the same element `css` in `3.3.0` and earlier versions was overwritten many times, resulting in poor style debugging)
|
||||
- Refactored route reset function
|
||||
@ -696,7 +820,7 @@ Totally `ESM` version
|
||||
- Added pre-release packaging mode
|
||||
- Add [hooks] to close a tag (https://github.com/pure-admin/vue-pure-admin/commit/5e8723a031923e79f507e5a17151d3bd88a51523)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Refactored the landing page to be more inclined to the actual business scenario
|
||||
- Use `unocss` instead of `windicss`, `unocss` has better performance in development environment, no memory leaks, and `api` is compatible with `windicss`
|
||||
@ -775,7 +899,7 @@ Totally `ESM` version
|
||||
- Added `WindiCSS` support
|
||||
- Add online environment remove console plugin `vite-plugin-remove-console`
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- Replace `@element-plus/icons-vue` with `@iconify-icons/ep`
|
||||
|
||||
|
@ -1,3 +1,127 @@
|
||||
# 6.0.0 (2025-04-10)
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- 重构图标模块,使用`@iconify/json`替换不再维护更新的`@iconify-icons/*`依赖,优化使用体验,确保图标库可持续更新并支持`Tree-shaking`
|
||||
- 升级`tailwindcss`至`v4`版本,带来更快的构建速度、更简化的安装和配置、提供专属`vite`插件
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- 添加`Ai`聊天组件示例
|
||||
- 添加`tagOnClick`标签切换全局公共事件
|
||||
- 添加代码编辑器示例
|
||||
- 添加`Markdown`示例
|
||||
- 添加滑块示例
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- 修复`aria-hidden`报错
|
||||
- 修复使用`this`语法时无法显示代码提示的问题并更新`pinia`相关语法
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- 修复组件-瀑布流无限滚动示例中失效的链接
|
||||
- 更新`vue-flow`,相关兼容处理
|
||||
- 删除已弃用的依赖包`eslint-define-config`,升级`eslint`至最新版本,相关兼容处理
|
||||
- 优化`src/style/dark.scss`语法
|
||||
- 优化登录传参
|
||||
- 使用`keydown`替换`keypress`,`keypress`事件已弃用
|
||||
|
||||
# 5.9.0 (2024-12-10)
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- 升级`vite`至`v6`版本,升级`sass`至最新版,重构主题写法,弃用 [@pureadmin/theme](https://www.npmjs.com/package/@pureadmin/theme),点击查看 [相关优化点细节](https://github.com/pure-admin/vue-pure-admin/pull/1188#issue-2630095115)。对于拥有 [Max版本](https://pure-admin.cn/pages/service/#max-%E7%89%88%E6%9C%AC) 的用户平台强烈建议升级,后续`Max版本用户`会享有一套更现代、美观且自定义程度高的主题色
|
||||
- 使用 [code-inspector-plugin](https://www.npmjs.com/package/code-inspector-plugin) 替换 [vite-plugin-vue-inspector](https://www.npmjs.com/package/vite-plugin-vue-inspector)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- 新增函数式抽屉组件
|
||||
- `pure-table`添加动态表头示例
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- 修复在菜单、部门管理中,表格展开后启用或关闭全屏功能时,表格高度未自动适应的问题
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- 优化用户管理左侧部门树的布局
|
||||
|
||||
# 5.8.0 (2024-08-19)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- 新增第二种按钮权限指令(根据登录接口返回的`permissions`字段进行判断)
|
||||
- 函数式弹框`ReDialog`添加点击确认按钮后是否开启`loading`加载动画功能
|
||||
- `PureTableBar`组件添加全屏和退出全屏功能
|
||||
- `VxeTableBar`组件添加全屏和退出全屏功能
|
||||
- `ReDialog`组件的确定按钮提供关闭按钮动画`closeLoading`功能
|
||||
- 添加开发环境代码调试`vite-plugin-vue-inspector`插件,提升开发体验
|
||||
- 添加`vite-plugin-checker`插件,更严格的类型和`eslint`校验
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- 修复配置路由属性`fixedTag`为`false`后当前标签页不可关闭的问题
|
||||
- 修复顶部菜单模式下`logo`不可隐藏的问题
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- 优化自定义指令的类型提示
|
||||
- 优化登录页回车登录功能
|
||||
- 优化移动端左侧菜单遮罩层级
|
||||
- 优化系统管理-角色管理的权限功能样式
|
||||
- 升级依赖,`element-plus`最新版兼容处理
|
||||
|
||||
# 5.7.0 (2024-06-04)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- 添加谷歌风格的页签
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- 修复在火狐浏览器中菜单折叠后,文字超出未隐藏的问题
|
||||
|
||||
# 5.6.0 (2024-05-14)
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- 升级`pnpm`至`v9`版本,规定`pnpm`版本`>=9`
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- 修复点击外链会跳转两次的问题
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- 优化`ReSegmented`组件
|
||||
|
||||
# 5.5.0 (2024-05-07)
|
||||
|
||||
### 📄 Docs
|
||||
|
||||
文档站和完整版预览站地址更换!
|
||||
|
||||
- 最新文档站地址:https://pure-admin.cn
|
||||
- 最新完整版预览站地址:https://pure-admin.github.io/vue-pure-admin
|
||||
|
||||
### ✔️ Refactor
|
||||
|
||||
- 重构`layout`文件命名规范,更易读
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- 添加新组件`ReVxeTableBar`搭配`vxe-table`使用
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- 修复深色模式下设置`FixedHeader`为`false`时,背景色为白色的问题
|
||||
- 修复函数式弹窗`ReDialog`点击取消按钮,延时关闭无效问题
|
||||
|
||||
### 🍏 Perf
|
||||
|
||||
- 优化账号设置-头像上传功能
|
||||
|
||||
# 5.4.0 (2024-04-18)
|
||||
|
||||
### 🎫 Feat
|
||||
@ -30,7 +154,7 @@
|
||||
|
||||
# 5.3.0 (2024-03-28)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 重构国际化文件命名规范以及演示页加上代码位置提示
|
||||
|
||||
@ -43,7 +167,7 @@
|
||||
|
||||
# 5.2.0 (2024-03-22)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 将全屏按钮置于顶部,使其显眼且易于操作
|
||||
|
||||
@ -79,7 +203,7 @@
|
||||
|
||||
# 5.1.0 (2024-03-02)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 重构标签页`UI`,点击关闭按钮更方便
|
||||
|
||||
@ -101,7 +225,7 @@
|
||||
|
||||
全面`ESM`版本
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 升级`vite`至`v5`版本,规定`node`版本`>18.18.0`,`pnpm`版本`>=8.6.10`
|
||||
- 使用 [vite-plugin-fake-server](https://www.npmjs.com/package/vite-plugin-fake-server) 替换 [vite-plugin-mock](https://www.npmjs.com/package/vite-plugin-mock),使用 [@faker-js/faker](https://www.npmjs.com/package/@faker-js/faker) 替换 [mockjs](https://www.npmjs.com/package/mockjs)
|
||||
@ -192,7 +316,7 @@
|
||||
|
||||
# 4.5.0 (2023-06-26)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 重构图片裁剪 `ReCropper` 组件,添加更多实用功能
|
||||
|
||||
@ -304,7 +428,7 @@
|
||||
|
||||
[查看 4.0.0 版本优化细节](https://github.com/pure-admin/vue-pure-admin/issues/428#issuecomment-1422191158)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 采用 `css` 伪类 `before` 写法重构菜单的激活背景,类似于 [ant.design-menu](https://ant.design/components/menu-cn#components-menu-demo-inline-collapsed)
|
||||
|
||||
@ -375,10 +499,10 @@
|
||||
|
||||
# 3.9.5 (2022-12-13)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 完全移除了 `lodash` 和其相关库
|
||||
[点击此处查看为什么移除?如何自行集成?](https://yiming_chang.gitee.io/pure-admin-doc/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-5-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-lodash-%E5%92%8C%E5%85%B6%E7%9B%B8%E5%85%B3%E5%BA%93-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||
[点击此处查看为什么移除?如何自行集成?](https://pure-admin.cn/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-5-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-lodash-%E5%92%8C%E5%85%B6%E7%9B%B8%E5%85%B3%E5%BA%93-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
@ -395,10 +519,10 @@
|
||||
|
||||
# 3.9.4 (2022-12-05)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 完全移除了 `vxe-table`,移除后,完整版整体打包大小减少 `1.82MB`,首启动时长基本和精简版持平 🐮
|
||||
[点击此处查看为什么移除?如何自行集成?](https://yiming_chang.gitee.io/pure-admin-doc/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-4-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-vxe-table-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||
[点击此处查看为什么移除?如何自行集成?](https://pure-admin.cn/pages/FAQ/#%E5%B9%B3%E5%8F%B0%E5%9C%A8-v3-9-4-%E7%89%88%E6%9C%AC%E5%AE%8C%E5%85%A8%E7%A7%BB%E9%99%A4%E4%BA%86-vxe-table-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%A7%BB%E9%99%A4-%E5%A6%82%E4%BD%95%E8%87%AA%E8%A1%8C%E9%9B%86%E6%88%90)
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
@ -504,13 +628,13 @@
|
||||
|
||||
# 3.7.0 (2022-11-21)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 使用 `intro.js` 替换 `driver.js`
|
||||
|
||||
### 🎫 Feat
|
||||
|
||||
- 添加前端单点登录,测试地址 https://yiming_chang.gitee.io/vue-pure-admin/#/pure-table/index?username=sso&roles=admin&accessToken=eyJhbGciOiJIUzUxMiJ9.admin
|
||||
- 添加前端单点登录,测试地址 https://pure-admin.github.io/vue-pure-admin/#/pure-table/index?username=sso&roles=admin&accessToken=eyJhbGciOiJIUzUxMiJ9.admin
|
||||
- 为 [@pureadmin/table](https://github.com/pure-admin/pure-admin-table) 添加更多的示例和 `element-plus` 的 [table](https://element-plus.org/zh-CN/component/table.html) 示例保持一致
|
||||
- 丰富水印功能页面(支持自定义各种颜色、阴影、文字、额外属性、设置不可删除水印以及给指定元素设置水印)
|
||||
- 优化菜单,添加 `MenuArrowIconNoTransition` 全局配置,在 `public/platform-config.json` 中配置即可,对于出现左侧菜单模式,菜单展开卡顿的可设置 `MenuArrowIconNoTransition: true` 即可解决
|
||||
@ -555,7 +679,7 @@
|
||||
|
||||
# 3.6.2 (2022-10-27)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 使用`@/`别名替换`/@/`别名
|
||||
|
||||
@ -583,7 +707,7 @@
|
||||
- 添加打字机组件`demo`
|
||||
- 添加`json`编辑器`demo`
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 重构权限模块,采用目前最常用的`RBAC`(Role-Based Access List): 基于角色的权限控制( 用户 -> 角色 -> 权限 ),并更新页面权限和按钮权限`demo`示例,按钮权限支持三种操作模式(组件方式判断权限、函数方式判断权限、指令方式判断权限)
|
||||
|
||||
@ -609,9 +733,9 @@
|
||||
- 添加 `element-plus` 无缝滚动 `Table` 页面 demo
|
||||
- 开启 `vscode` 括号对指南
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 使用 `tailwindcss` 替换 `unocss`,新增 `tailwindcss` [使用文档](https://yiming_chang.gitee.io/pure-admin-doc/pages/tailwindcss/)
|
||||
- 使用 `tailwindcss` 替换 `unocss`,新增 `tailwindcss` [使用文档](https://pure-admin.cn/pages/tailwindcss/)
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
@ -659,7 +783,7 @@
|
||||
- 添加导出 `excel` 页面 demo
|
||||
- 添加无 `Layout` 的空白页面 demo
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 重构主题色,适配 `element-plus` 暗黑模式(同时也解决了 `3.3.0` 及更低版本中同样的元素 `css` 被多次覆盖,导致样式不好调试的问题)
|
||||
- 重构路由重置功能
|
||||
@ -695,7 +819,7 @@
|
||||
- 添加预发布打包模式
|
||||
- 添加关闭某个标签的[hooks](https://github.com/pure-admin/vue-pure-admin/commit/5e8723a031923e79f507e5a17151d3bd88a51523)
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 重构登录页,更偏向实际业务场景
|
||||
- 使用`unocss`替换`windicss`,`unocss`开发环境下性能更好,没有内存泄露,而且`api`使用上兼容`windicss`
|
||||
@ -774,7 +898,7 @@
|
||||
- 添加 `WindiCSS` 支持
|
||||
- 添加线上环境删 console 插件`vite-plugin-remove-console`
|
||||
|
||||
### ✔️ refactor
|
||||
### ✔️ Refactor
|
||||
|
||||
- 使用`@iconify-icons/ep`替换`@element-plus/icons-vue`
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM node:18-alpine as build-stage
|
||||
FROM node:20-alpine as build-stage
|
||||
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
RUN corepack prepare pnpm@8.6.10 --activate
|
||||
RUN corepack prepare pnpm@latest --activate
|
||||
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
|
@ -10,11 +10,9 @@
|
||||
|
||||
`vue-pure-admin` is an open source, free and out-of-the-box middle and backend management system template. Completely adopts `ECMAScript` module (`ESM`) specifications to write and organize code, using the latest `Vue3`, `Vite`, `Element-Plus`, `TypeScript`, `Pinia`, `Tailwindcss` and other mainstream technologies develop
|
||||
|
||||
## Sponsors
|
||||
## R&D philosophy
|
||||
|
||||
<a class="logo" href="https://ai-tools.cn/resume/start" target="_blank" rel="sponsored noopener">
|
||||
<img src="./public/sponsors/aitools.svg" alt="aitools">
|
||||
</a>
|
||||
Seek innovation in stability and see the future in technology
|
||||
|
||||
## Thin version (offering non-internationalized and internationalized versions)
|
||||
|
||||
@ -30,12 +28,12 @@ The simplified version is based on the shelf extracted from [vue-pure-admin](htt
|
||||
|
||||
## Nanny-level documents
|
||||
|
||||
[Click me to view vue-pure-admin documentation](https://yiming_chang.gitee.io/pure-admin-doc)
|
||||
[Click me to view vue-pure-admin documentation](https://pure-admin.cn/)
|
||||
[Click me to view @pureadmin/utils documentation](https://pure-admin-utils.netlify.app)
|
||||
|
||||
## Quality service, software outsourcing, sponsorship support
|
||||
## Premium service
|
||||
|
||||
[Click me for details](https://yiming_chang.gitee.io/pure-admin-doc/pages/service/)
|
||||
[Click me for details](https://pure-admin.cn/pages/service/)
|
||||
|
||||
## Tauri
|
||||
|
||||
@ -47,7 +45,7 @@ The simplified version is based on the shelf extracted from [vue-pure-admin](htt
|
||||
|
||||
## Preview
|
||||
|
||||
[preview station](https://yiming_chang.gitee.io/vue-pure-admin)
|
||||
[preview station](https://pure-admin.github.io/vue-pure-admin)
|
||||
|
||||
`PC`
|
||||
|
||||
@ -184,6 +182,9 @@ Thank you very much for your in-depth understanding of the source code and your
|
||||
| [WitMiao](https://github.com/WitMiao) | [code](https://github.com/pure-admin/vue-pure-admin/commits?author=WitMiao) |
|
||||
| [QFifteen](https://github.com/QFifteen) | [code](https://github.com/pure-admin/vue-pure-admin/commits?author=QFifteen) |
|
||||
| [edgexie](https://github.com/edgexie) | [code](https://github.com/pure-admin/vue-pure-admin/commits?author=edgexie) |
|
||||
| [way-jm](https://github.com/way-jm) | [code](https://github.com/pure-admin/vue-pure-admin/commits?author=way-jm) |
|
||||
| [simple-hui](https://github.com/simple-hui) | [code](https://github.com/pure-admin/vue-pure-admin/commits?author=simple-hui) |
|
||||
| [tinysimple](https://github.com/tinysimple) | [code](https://github.com/pure-admin/vue-pure-admin/commits?author=tinysimple) |
|
||||
|
||||
## Git Contribution submission specification
|
||||
|
||||
|
17
README.md
@ -11,11 +11,9 @@
|
||||
`vue-pure-admin` 是一款开源免费且开箱即用的中后台管理系统模版。完全采用 `ECMAScript` 模块(`ESM`)规范来编写和组织代码,使用了最新的 `Vue3`、
|
||||
`Vite`、`Element-Plus`、`TypeScript`、`Pinia`、`Tailwindcss` 等主流技术开发
|
||||
|
||||
## 赞助商
|
||||
## 研发理念
|
||||
|
||||
<a class="logo" href="https://ai-tools.cn/resume/start" target="_blank" rel="sponsored noopener">
|
||||
<img src="./public/sponsors/aitools.svg" alt="aitools">
|
||||
</a>
|
||||
稳定中求创新,技术中见未来
|
||||
|
||||
## 精简版本(实际项目开发请用精简版本,提供 `非国际化` 、`国际化` 两个版本选择)
|
||||
|
||||
@ -31,12 +29,12 @@
|
||||
|
||||
## 配套保姆级文档
|
||||
|
||||
[点我查看 vue-pure-admin 文档](https://yiming_chang.gitee.io/pure-admin-doc)
|
||||
[点我查看 vue-pure-admin 文档](https://pure-admin.cn/)
|
||||
[点我查看 @pureadmin/utils 文档](https://pure-admin-utils.netlify.app)
|
||||
|
||||
## 优质服务、软件外包、赞助支持
|
||||
## 高级服务
|
||||
|
||||
[点我查看详情](https://yiming_chang.gitee.io/pure-admin-doc/pages/service/)
|
||||
[点我查看详情](https://pure-admin.cn/pages/service/)
|
||||
|
||||
## `Tauri` 版本
|
||||
|
||||
@ -48,7 +46,7 @@
|
||||
|
||||
## 预览
|
||||
|
||||
[点我查看预览](https://yiming_chang.gitee.io/vue-pure-admin)
|
||||
[点我查看预览](https://pure-admin.github.io/vue-pure-admin)
|
||||
|
||||
`PC` 端
|
||||
|
||||
@ -185,6 +183,9 @@ docker run -dp 8080:80 --name pure-admin vue-pure-admin
|
||||
| [WitMiao](https://github.com/WitMiao) | [代码](https://github.com/pure-admin/vue-pure-admin/commits?author=WitMiao) |
|
||||
| [QFifteen](https://github.com/QFifteen) | [代码](https://github.com/pure-admin/vue-pure-admin/commits?author=QFifteen) |
|
||||
| [edgexie](https://github.com/edgexie) | [代码](https://github.com/pure-admin/vue-pure-admin/commits?author=edgexie) |
|
||||
| [way-jm](https://github.com/way-jm) | [代码](https://github.com/pure-admin/vue-pure-admin/commits?author=way-jm) |
|
||||
| [simple-hui](https://github.com/simple-hui) | [代码](https://github.com/pure-admin/vue-pure-admin/commits?author=simple-hui) |
|
||||
| [tinysimple](https://github.com/tinysimple) | [代码](https://github.com/pure-admin/vue-pure-admin/commits?author=tinysimple) |
|
||||
|
||||
## `Git` 贡献提交规范
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
import type { Plugin } from "vite";
|
||||
import gradient from "gradient-string";
|
||||
import { getPackageSize } from "./utils";
|
||||
import dayjs, { type Dayjs } from "dayjs";
|
||||
import duration from "dayjs/plugin/duration";
|
||||
import gradientString from "gradient-string";
|
||||
import boxen, { type Options as BoxenOptions } from "boxen";
|
||||
dayjs.extend(duration);
|
||||
|
||||
const welcomeMessage = gradientString("cyan", "magenta").multiline(
|
||||
`您好! 欢迎使用 pure-admin 开源项目\n我们为您精心准备了下面两个贴心的保姆级文档\nhttps://yiming_chang.gitee.io/pure-admin-doc\nhttps://pure-admin-utils.netlify.app`
|
||||
const welcomeMessage = gradient(["cyan", "magenta"]).multiline(
|
||||
`您好! 欢迎使用 pure-admin 开源项目\n我们为您精心准备了下面两个贴心的保姆级文档\nhttps://pure-admin.cn\nhttps://pure-admin-utils.netlify.app`
|
||||
);
|
||||
|
||||
const boxenOptions: BoxenOptions = {
|
||||
@ -41,7 +41,7 @@ export function viteBuildInfo(): Plugin {
|
||||
callback: (size: string) => {
|
||||
console.log(
|
||||
boxen(
|
||||
gradientString("cyan", "magenta").multiline(
|
||||
gradient(["cyan", "magenta"]).multiline(
|
||||
`🎉 恭喜打包完成(总用时${dayjs
|
||||
.duration(endTime.diff(startTime))
|
||||
.format("mm分ss秒")},打包后的大小为${size})`
|
||||
|
@ -11,21 +11,25 @@ const include = [
|
||||
"dayjs",
|
||||
"axios",
|
||||
"pinia",
|
||||
"vditor",
|
||||
"typeit",
|
||||
"swiper",
|
||||
"qrcode",
|
||||
"intro.js",
|
||||
"vue-i18n",
|
||||
"deep-chat",
|
||||
"vxe-table",
|
||||
"vue-types",
|
||||
"js-cookie",
|
||||
"vue-tippy",
|
||||
"cropperjs",
|
||||
"jsbarcode",
|
||||
"codemirror",
|
||||
"pinyin-pro",
|
||||
"sortablejs",
|
||||
"swiper/vue",
|
||||
"mint-filter",
|
||||
"highlight.js",
|
||||
"@vueuse/core",
|
||||
"vue3-danmaku",
|
||||
"v-contextmenu",
|
||||
@ -36,14 +40,13 @@ const include = [
|
||||
"vue-json-pretty",
|
||||
"@logicflow/core",
|
||||
"@pureadmin/utils",
|
||||
"@vue-office/docx",
|
||||
"@vue-office/excel",
|
||||
"@wangeditor/editor",
|
||||
"responsive-storage",
|
||||
"plus-pro-components",
|
||||
"@howdyjs/mouse-menu",
|
||||
"@logicflow/extension",
|
||||
"vue-virtual-scroller",
|
||||
"codemirror-editor-vue3",
|
||||
"@amap/amap-jsapi-loader",
|
||||
"el-table-infinite-scroll",
|
||||
"vue-waterfall-plugin-next",
|
||||
@ -54,12 +57,8 @@ const include = [
|
||||
|
||||
/**
|
||||
* 在预构建中强制排除的依赖项
|
||||
* 温馨提示:所有以 `@iconify-icons/` 开头引入的的本地图标模块,都应该加入到下面的 `exclude` 里,因为平台推荐的使用方式是哪里需要哪里引入而且都是单个的引入,不需要预构建,直接让浏览器加载就好
|
||||
* 温馨提示:平台推荐的使用方式是哪里需要哪里引入而且都是单个的引入,不需要预构建,直接让浏览器加载就好
|
||||
*/
|
||||
const exclude = [
|
||||
"@iconify-icons/ep",
|
||||
"@iconify-icons/ri",
|
||||
"@pureadmin/theme/dist/browser-utils"
|
||||
];
|
||||
const exclude = ["@iconify/json"];
|
||||
|
||||
export { include, exclude };
|
||||
|
@ -3,15 +3,16 @@ import vue from "@vitejs/plugin-vue";
|
||||
import { pathResolve } from "./utils";
|
||||
import { viteBuildInfo } from "./info";
|
||||
import svgLoader from "vite-svg-loader";
|
||||
import Icons from "unplugin-icons/vite";
|
||||
import type { PluginOption } from "vite";
|
||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import { configCompressPlugin } from "./compress";
|
||||
import removeNoMatch from "vite-plugin-router-warn";
|
||||
import { visualizer } from "rollup-plugin-visualizer";
|
||||
import removeConsole from "vite-plugin-remove-console";
|
||||
import { themePreprocessorPlugin } from "@pureadmin/theme";
|
||||
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
|
||||
import { genScssMultipleScopeVars } from "../src/layout/theme";
|
||||
import { codeInspectorPlugin } from "code-inspector-plugin";
|
||||
import { vitePluginFakeServer } from "vite-plugin-fake-server";
|
||||
|
||||
export function getPluginsList(
|
||||
@ -20,13 +21,29 @@ export function getPluginsList(
|
||||
): PluginOption[] {
|
||||
const lifecycle = process.env.npm_lifecycle_event;
|
||||
return [
|
||||
vue(),
|
||||
tailwindcss(),
|
||||
vue({
|
||||
template: {
|
||||
compilerOptions: {
|
||||
isCustomElement: tag => tag === "deep-chat"
|
||||
}
|
||||
}
|
||||
}),
|
||||
// jsx、tsx语法支持
|
||||
vueJsx(),
|
||||
VueI18nPlugin({
|
||||
jitCompilation: false,
|
||||
include: [pathResolve("../locales/**")]
|
||||
}),
|
||||
/**
|
||||
* 在页面上按住组合键时,鼠标在页面移动即会在 DOM 上出现遮罩层并显示相关信息,点击一下将自动打开 IDE 并将光标定位到元素对应的代码位置
|
||||
* Mac 默认组合键 Option + Shift
|
||||
* Windows 默认组合键 Alt + Shift
|
||||
* 更多用法看 https://inspector.fe-dev.cn/guide/start.html
|
||||
*/
|
||||
codeInspectorPlugin({
|
||||
bundler: "vite",
|
||||
hideConsole: true
|
||||
}),
|
||||
viteBuildInfo(),
|
||||
/**
|
||||
* 开发环境下移除非必要的vue-router动态路由警告No match found for location with path
|
||||
@ -41,15 +58,13 @@ export function getPluginsList(
|
||||
infixName: false,
|
||||
enableProd: true
|
||||
}),
|
||||
// 自定义主题
|
||||
themePreprocessorPlugin({
|
||||
scss: {
|
||||
multipleScopeVars: genScssMultipleScopeVars(),
|
||||
extract: true
|
||||
}
|
||||
}),
|
||||
// svg组件化支持
|
||||
svgLoader(),
|
||||
// 自动按需加载图标
|
||||
Icons({
|
||||
compiler: "vue3",
|
||||
scale: 1
|
||||
}),
|
||||
VITE_CDN ? cdn : null,
|
||||
configCompressPlugin(VITE_COMPRESSION),
|
||||
// 线上环境删除console
|
||||
|
@ -48,7 +48,7 @@ const __APP_INFO__ = {
|
||||
};
|
||||
|
||||
/** 处理环境变量 */
|
||||
const warpperEnv = (envConf: Recordable): ViteEnv => {
|
||||
const wrapperEnv = (envConf: Recordable): ViteEnv => {
|
||||
// 默认值
|
||||
const ret: ViteEnv = {
|
||||
VITE_PORT: 8848,
|
||||
@ -107,4 +107,4 @@ const getPackageSize = options => {
|
||||
});
|
||||
};
|
||||
|
||||
export { root, pathResolve, alias, __APP_INFO__, warpperEnv, getPackageSize };
|
||||
export { root, pathResolve, alias, __APP_INFO__, wrapperEnv, getPackageSize };
|
||||
|
@ -1,26 +1,25 @@
|
||||
import js from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
import pluginVue from "eslint-plugin-vue";
|
||||
import * as parserVue from "vue-eslint-parser";
|
||||
import configPrettier from "eslint-config-prettier";
|
||||
import pluginPrettier from "eslint-plugin-prettier";
|
||||
import { defineFlatConfig } from "eslint-define-config";
|
||||
import * as parserTypeScript from "@typescript-eslint/parser";
|
||||
import pluginTypeScript from "@typescript-eslint/eslint-plugin";
|
||||
import { defineConfig, globalIgnores } from "eslint/config";
|
||||
|
||||
export default defineFlatConfig([
|
||||
{
|
||||
...js.configs.recommended,
|
||||
ignores: [
|
||||
export default defineConfig([
|
||||
globalIgnores([
|
||||
"**/.*",
|
||||
"dist/*",
|
||||
"*.d.ts",
|
||||
"public/*",
|
||||
"src/assets/**",
|
||||
"src/**/iconfont/**"
|
||||
],
|
||||
]),
|
||||
{
|
||||
...js.configs.recommended,
|
||||
languageOptions: {
|
||||
globals: {
|
||||
// index.d.ts
|
||||
// types/index.d.ts
|
||||
RefType: "readonly",
|
||||
EmitType: "readonly",
|
||||
TargetContext: "readonly",
|
||||
@ -73,26 +72,18 @@ export default defineFlatConfig([
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
...tseslint.config({
|
||||
extends: [...tseslint.configs.recommended],
|
||||
files: ["**/*.?([cm])ts", "**/*.?([cm])tsx"],
|
||||
languageOptions: {
|
||||
parser: parserTypeScript,
|
||||
parserOptions: {
|
||||
sourceType: "module"
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
"@typescript-eslint": pluginTypeScript
|
||||
},
|
||||
rules: {
|
||||
...pluginTypeScript.configs.strict.rules,
|
||||
"@typescript-eslint/ban-types": "off",
|
||||
"@typescript-eslint/no-redeclare": "error",
|
||||
"@typescript-eslint/ban-ts-comment": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/prefer-as-const": "warn",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"@typescript-eslint/no-unused-expressions": "off",
|
||||
"@typescript-eslint/no-unsafe-function-type": "off",
|
||||
"@typescript-eslint/no-import-type-side-effects": "error",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"@typescript-eslint/consistent-type-imports": [
|
||||
@ -111,20 +102,20 @@ export default defineFlatConfig([
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
}),
|
||||
{
|
||||
files: ["**/*.d.ts"],
|
||||
rules: {
|
||||
"eslint-comments/no-unlimited-disable": "off",
|
||||
"import/no-duplicates": "off",
|
||||
"no-restricted-syntax": "off",
|
||||
"unused-imports/no-unused-vars": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ["**/*.?([cm])js"],
|
||||
rules: {
|
||||
"@typescript-eslint/no-require-imports": "off",
|
||||
"@typescript-eslint/no-var-requires": "off"
|
||||
"@typescript-eslint/no-require-imports": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -145,18 +136,19 @@ export default defineFlatConfig([
|
||||
jsx: true
|
||||
},
|
||||
extraFileExtensions: [".vue"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
parser: tseslint.parser,
|
||||
sourceType: "module"
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
"@typescript-eslint": tseslint.plugin,
|
||||
vue: pluginVue
|
||||
},
|
||||
processor: pluginVue.processors[".vue"],
|
||||
rules: {
|
||||
...pluginVue.configs.base.rules,
|
||||
...pluginVue.configs["vue3-essential"].rules,
|
||||
...pluginVue.configs["vue3-recommended"].rules,
|
||||
...pluginVue.configs.essential.rules,
|
||||
...pluginVue.configs.recommended.rules,
|
||||
"no-undef": "off",
|
||||
"no-unused-vars": "off",
|
||||
"vue/no-v-html": "off",
|
||||
|
@ -10,9 +10,6 @@
|
||||
/>
|
||||
<title>vue-pure-admin</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
window.process = {};
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -53,6 +53,8 @@ panel:
|
||||
pureTagsStyleSmartTip: Smart tags add fun and brilliance
|
||||
pureTagsStyleCard: Card
|
||||
pureTagsStyleCardTip: Card tags for efficient browsing
|
||||
pureTagsStyleChrome: Chrome
|
||||
pureTagsStyleChromeTip: Chrome style is classic and elegant
|
||||
pureInterfaceDisplay: Interface Display
|
||||
pureGreyModel: Grey Model
|
||||
pureWeakModel: Weak Model
|
||||
@ -74,6 +76,8 @@ menus:
|
||||
pureLoginLog: Login Log
|
||||
pureOperationLog: Operation Log
|
||||
pureSystemLog: System Log
|
||||
pureCodeMirror: CodeMirror
|
||||
pureMarkdown: Markdown
|
||||
pureEditor: Editor
|
||||
pureAbnormal: Abnormal Page
|
||||
pureFourZeroFour: "404"
|
||||
@ -81,6 +85,7 @@ menus:
|
||||
pureFive: "500"
|
||||
pureComponents: Components
|
||||
pureDialog: Dialog
|
||||
pureDrawer: Drawer
|
||||
pureMessage: Message Tips
|
||||
pureVideo: Video
|
||||
pureSegmented: Segmented
|
||||
@ -89,6 +94,7 @@ menus:
|
||||
pureDraggable: Draggable
|
||||
pureSplitPane: Split Pane
|
||||
pureText: Text Ellipsis
|
||||
pureSlider: Slider
|
||||
pureElButton: Button
|
||||
pureButton: Button Animation
|
||||
pureCheckButton: Check Button
|
||||
@ -123,6 +129,8 @@ menus:
|
||||
purePermission: Permission Manage
|
||||
purePermissionPage: Page Permission
|
||||
purePermissionButton: Button Permission
|
||||
purePermissionButtonRouter: Route return button permission
|
||||
purePermissionButtonLogin: Login interface return button permission
|
||||
pureTabs: Tabs Operate
|
||||
pureGuide: Guide
|
||||
pureAble: Able
|
||||
@ -166,8 +174,6 @@ menus:
|
||||
pureSwiper: Swiper Plugin
|
||||
pureVirtualList: Virtual List
|
||||
purePdf: PDF Preview
|
||||
pureWord: Word Preview
|
||||
pureExcels: Excel Preview
|
||||
pureExcel: Export Excel
|
||||
pureInfiniteScroll: Table Infinite Scroll
|
||||
pureSensitive: Sensitive Filter
|
||||
@ -184,7 +190,12 @@ menus:
|
||||
pureChildMenuOverflow: Child Menu Overflow Show Tooltip Text
|
||||
status:
|
||||
pureLoad: Loading...
|
||||
pureMessage: Message
|
||||
pureNotify: Notify
|
||||
pureTodo: Todo
|
||||
pureNoMessage: No Message
|
||||
pureNoNotify: No Notify
|
||||
pureNoTodo: No Todo
|
||||
login:
|
||||
pureUsername: Username
|
||||
purePassword: Password
|
||||
|
@ -53,6 +53,8 @@ panel:
|
||||
pureTagsStyleSmartTip: 灵动标签,添趣生辉
|
||||
pureTagsStyleCard: 卡片
|
||||
pureTagsStyleCardTip: 卡片标签,高效浏览
|
||||
pureTagsStyleChrome: 谷歌
|
||||
pureTagsStyleChromeTip: 谷歌风格,经典美观
|
||||
pureInterfaceDisplay: 界面显示
|
||||
pureGreyModel: 灰色模式
|
||||
pureWeakModel: 色弱模式
|
||||
@ -74,6 +76,8 @@ menus:
|
||||
pureLoginLog: 登录日志
|
||||
pureOperationLog: 操作日志
|
||||
pureSystemLog: 系统日志
|
||||
pureCodeMirror: 代码编辑器
|
||||
pureMarkdown: Markdown
|
||||
pureEditor: 编辑器
|
||||
pureAbnormal: 异常页面
|
||||
pureFourZeroFour: "404"
|
||||
@ -81,6 +85,7 @@ menus:
|
||||
pureFive: "500"
|
||||
pureComponents: 组件
|
||||
pureDialog: 函数式弹框
|
||||
pureDrawer: 函数式抽屉
|
||||
pureMessage: 消息提示
|
||||
pureVideo: 视频
|
||||
pureSegmented: 分段控制器
|
||||
@ -89,6 +94,7 @@ menus:
|
||||
pureDraggable: 拖拽
|
||||
pureSplitPane: 切割面板
|
||||
pureText: 文本省略
|
||||
pureSlider: 滑块
|
||||
pureElButton: 按钮
|
||||
pureCheckButton: 可选按钮
|
||||
pureButton: 按钮动效
|
||||
@ -119,10 +125,12 @@ menus:
|
||||
pureMenu1-2-1: 菜单1-2-1
|
||||
pureMenu1-2-2: 菜单1-2-2
|
||||
pureMenu1-3: 菜单1-3
|
||||
pureMenu2: 菜单2
|
||||
pureMenu2: 菜单二
|
||||
purePermission: 权限管理
|
||||
purePermissionPage: 页面权限
|
||||
purePermissionButton: 按钮权限
|
||||
purePermissionButtonRouter: 路由返回按钮权限
|
||||
purePermissionButtonLogin: 登录接口返回按钮权限
|
||||
pureTabs: 标签页操作
|
||||
pureGuide: 引导页
|
||||
pureAble: 功能
|
||||
@ -166,8 +174,6 @@ menus:
|
||||
pureSwiper: Swiper插件
|
||||
pureVirtualList: 虚拟列表
|
||||
purePdf: PDF预览
|
||||
pureWord: Word预览
|
||||
pureExcels: Excel预览
|
||||
pureExcel: 导出Excel
|
||||
pureInfiniteScroll: 表格无限滚动
|
||||
pureSensitive: 敏感词过滤
|
||||
@ -184,7 +190,12 @@ menus:
|
||||
pureChildMenuOverflow: 菜单超出显示 Tooltip 文字提示
|
||||
status:
|
||||
pureLoad: 加载中...
|
||||
pureMessage: 消息
|
||||
pureNotify: 通知
|
||||
pureTodo: 待办
|
||||
pureNoMessage: 暂无消息
|
||||
pureNoNotify: 暂无通知
|
||||
pureNoTodo: 暂无待办
|
||||
login:
|
||||
pureUsername: 账号
|
||||
purePassword: 密码
|
||||
|
@ -123,17 +123,34 @@ const permissionRouter = {
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/permission/button/index",
|
||||
name: "PermissionButton",
|
||||
path: "/permission/button",
|
||||
meta: {
|
||||
title: "menus.purePermissionButton",
|
||||
roles: ["admin", "common"],
|
||||
roles: ["admin", "common"]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/permission/button/router",
|
||||
component: "permission/button/index",
|
||||
name: "PermissionButtonRouter",
|
||||
meta: {
|
||||
title: "menus.purePermissionButtonRouter",
|
||||
auths: [
|
||||
"permission:btn:add",
|
||||
"permission:btn:edit",
|
||||
"permission:btn:delete"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/permission/button/login",
|
||||
component: "permission/button/perms",
|
||||
name: "PermissionButtonLogin",
|
||||
meta: {
|
||||
title: "menus.purePermissionButtonLogin"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -146,30 +163,6 @@ const frameRouter = {
|
||||
rank: frame
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/iframe/external",
|
||||
meta: {
|
||||
title: "menus.pureExternalDoc"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/external",
|
||||
name: "https://yiming_chang.gitee.io/pure-admin-doc",
|
||||
meta: {
|
||||
title: "menus.pureExternalLink",
|
||||
roles: ["admin", "common"]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/pureUtilsLink",
|
||||
name: "https://pure-admin-utils.netlify.app/",
|
||||
meta: {
|
||||
title: "menus.pureUtilsLink",
|
||||
roles: ["admin", "common"]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/iframe/embedded",
|
||||
meta: {
|
||||
@ -257,6 +250,30 @@ const frameRouter = {
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/iframe/external",
|
||||
meta: {
|
||||
title: "menus.pureExternalDoc"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/external",
|
||||
name: "https://pure-admin.cn/",
|
||||
meta: {
|
||||
title: "menus.pureExternalLink",
|
||||
roles: ["admin", "common"]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/pureUtilsLink",
|
||||
name: "https://pure-admin-utils.netlify.app/",
|
||||
meta: {
|
||||
title: "menus.pureUtilsLink",
|
||||
roles: ["admin", "common"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
@ -15,6 +15,8 @@ export default defineFakeRoute([
|
||||
nickname: "小铭",
|
||||
// 一个用户可能有多个角色
|
||||
roles: ["admin"],
|
||||
// 按钮级别权限
|
||||
permissions: ["*:*:*"],
|
||||
accessToken: "eyJhbGciOiJIUzUxMiJ9.admin",
|
||||
refreshToken: "eyJhbGciOiJIUzUxMiJ9.adminRefresh",
|
||||
expires: "2030/10/30 00:00:00"
|
||||
@ -28,6 +30,7 @@ export default defineFakeRoute([
|
||||
username: "common",
|
||||
nickname: "小林",
|
||||
roles: ["common"],
|
||||
permissions: ["permission:btn:add", "permission:btn:edit"],
|
||||
accessToken: "eyJhbGciOiJIUzUxMiJ9.common",
|
||||
refreshToken: "eyJhbGciOiJIUzUxMiJ9.commonRefresh",
|
||||
expires: "2030/10/30 00:00:00"
|
||||
|
@ -25,7 +25,7 @@ export default defineFakeRoute([
|
||||
url: "/mine-logs",
|
||||
method: "get",
|
||||
response: () => {
|
||||
let list = [
|
||||
const list = [
|
||||
{
|
||||
id: 1,
|
||||
ip: faker.internet.ipv4(),
|
||||
|
130
mock/system.ts
@ -430,7 +430,7 @@ export default defineFakeRoute([
|
||||
id: 102,
|
||||
menuType: 2,
|
||||
title: "menus.pureExternalLink",
|
||||
name: "https://yiming_chang.gitee.io/pure-admin-doc",
|
||||
name: "https://pure-admin.cn/",
|
||||
path: "/external",
|
||||
component: "",
|
||||
rank: null,
|
||||
@ -696,7 +696,7 @@ export default defineFakeRoute([
|
||||
menuType: 0,
|
||||
title: "menus.purePermissionButton",
|
||||
name: "PermissionButton",
|
||||
path: "/permission/button/index",
|
||||
path: "/permission/button",
|
||||
component: "",
|
||||
rank: null,
|
||||
redirect: "",
|
||||
@ -717,6 +717,30 @@ export default defineFakeRoute([
|
||||
{
|
||||
parentId: 202,
|
||||
id: 203,
|
||||
menuType: 0,
|
||||
title: "menus.purePermissionButtonRouter",
|
||||
name: "PermissionButtonRouter",
|
||||
path: "/permission/button/router",
|
||||
component: "permission/button/index",
|
||||
rank: null,
|
||||
redirect: "",
|
||||
icon: "",
|
||||
extraIcon: "",
|
||||
enterTransition: "",
|
||||
leaveTransition: "",
|
||||
activePath: "",
|
||||
auths: "",
|
||||
frameSrc: "",
|
||||
frameLoading: true,
|
||||
keepAlive: false,
|
||||
hiddenTag: false,
|
||||
fixedTag: false,
|
||||
showLink: true,
|
||||
showParent: false
|
||||
},
|
||||
{
|
||||
parentId: 203,
|
||||
id: 210,
|
||||
menuType: 3,
|
||||
title: "添加",
|
||||
name: "",
|
||||
@ -739,8 +763,8 @@ export default defineFakeRoute([
|
||||
showParent: false
|
||||
},
|
||||
{
|
||||
parentId: 202,
|
||||
id: 204,
|
||||
parentId: 203,
|
||||
id: 211,
|
||||
menuType: 3,
|
||||
title: "修改",
|
||||
name: "",
|
||||
@ -762,9 +786,105 @@ export default defineFakeRoute([
|
||||
showLink: true,
|
||||
showParent: false
|
||||
},
|
||||
{
|
||||
parentId: 203,
|
||||
id: 212,
|
||||
menuType: 3,
|
||||
title: "删除",
|
||||
name: "",
|
||||
path: "",
|
||||
component: "",
|
||||
rank: null,
|
||||
redirect: "",
|
||||
icon: "",
|
||||
extraIcon: "",
|
||||
enterTransition: "",
|
||||
leaveTransition: "",
|
||||
activePath: "",
|
||||
auths: "permission:btn:delete",
|
||||
frameSrc: "",
|
||||
frameLoading: true,
|
||||
keepAlive: false,
|
||||
hiddenTag: false,
|
||||
fixedTag: false,
|
||||
showLink: true,
|
||||
showParent: false
|
||||
},
|
||||
{
|
||||
parentId: 202,
|
||||
id: 205,
|
||||
id: 204,
|
||||
menuType: 0,
|
||||
title: "menus.purePermissionButtonLogin",
|
||||
name: "PermissionButtonLogin",
|
||||
path: "/permission/button/login",
|
||||
component: "permission/button/perms",
|
||||
rank: null,
|
||||
redirect: "",
|
||||
icon: "",
|
||||
extraIcon: "",
|
||||
enterTransition: "",
|
||||
leaveTransition: "",
|
||||
activePath: "",
|
||||
auths: "",
|
||||
frameSrc: "",
|
||||
frameLoading: true,
|
||||
keepAlive: false,
|
||||
hiddenTag: false,
|
||||
fixedTag: false,
|
||||
showLink: true,
|
||||
showParent: false
|
||||
},
|
||||
{
|
||||
parentId: 204,
|
||||
id: 220,
|
||||
menuType: 3,
|
||||
title: "添加",
|
||||
name: "",
|
||||
path: "",
|
||||
component: "",
|
||||
rank: null,
|
||||
redirect: "",
|
||||
icon: "",
|
||||
extraIcon: "",
|
||||
enterTransition: "",
|
||||
leaveTransition: "",
|
||||
activePath: "",
|
||||
auths: "permission:btn:add",
|
||||
frameSrc: "",
|
||||
frameLoading: true,
|
||||
keepAlive: false,
|
||||
hiddenTag: false,
|
||||
fixedTag: false,
|
||||
showLink: true,
|
||||
showParent: false
|
||||
},
|
||||
{
|
||||
parentId: 204,
|
||||
id: 221,
|
||||
menuType: 3,
|
||||
title: "修改",
|
||||
name: "",
|
||||
path: "",
|
||||
component: "",
|
||||
rank: null,
|
||||
redirect: "",
|
||||
icon: "",
|
||||
extraIcon: "",
|
||||
enterTransition: "",
|
||||
leaveTransition: "",
|
||||
activePath: "",
|
||||
auths: "permission:btn:edit",
|
||||
frameSrc: "",
|
||||
frameLoading: true,
|
||||
keepAlive: false,
|
||||
hiddenTag: false,
|
||||
fixedTag: false,
|
||||
showLink: true,
|
||||
showParent: false
|
||||
},
|
||||
{
|
||||
parentId: 204,
|
||||
id: 222,
|
||||
menuType: 3,
|
||||
title: "删除",
|
||||
name: "",
|
||||
|
208
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-pure-admin",
|
||||
"version": "5.4.0",
|
||||
"version": "6.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
@ -48,30 +48,32 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@howdyjs/mouse-menu": "^2.1.3",
|
||||
"@howdyjs/mouse-menu": "^2.1.7",
|
||||
"@infectoone/vue-ganttastic": "^2.3.2",
|
||||
"@logicflow/core": "^1.2.26",
|
||||
"@logicflow/extension": "^1.2.26",
|
||||
"@logicflow/core": "^1.2.28",
|
||||
"@logicflow/extension": "^1.2.28",
|
||||
"@pureadmin/descriptions": "^1.2.1",
|
||||
"@pureadmin/table": "^3.1.2",
|
||||
"@pureadmin/utils": "^2.4.7",
|
||||
"@vue-flow/background": "^1.3.0",
|
||||
"@vue-flow/core": "^1.33.5",
|
||||
"@vue-office/docx": "^1.6.0",
|
||||
"@vue-office/excel": "^1.7.6",
|
||||
"@vueuse/core": "^10.9.0",
|
||||
"@vueuse/motion": "^2.1.0",
|
||||
"@pureadmin/table": "^3.2.1",
|
||||
"@pureadmin/utils": "^2.6.1",
|
||||
"@vue-flow/background": "^1.3.2",
|
||||
"@vue-flow/core": "^1.44.0",
|
||||
"@vueuse/core": "^13.3.0",
|
||||
"@vueuse/motion": "^3.0.3",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"@zxcvbn-ts/core": "^3.0.4",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.6.8",
|
||||
"axios": "^1.9.0",
|
||||
"china-area-data": "^5.0.1",
|
||||
"cropperjs": "^1.6.1",
|
||||
"dayjs": "^1.11.10",
|
||||
"echarts": "^5.5.0",
|
||||
"el-table-infinite-scroll": "^3.0.3",
|
||||
"element-plus": "2.6.3",
|
||||
"codemirror": "^5.65.19",
|
||||
"codemirror-editor-vue3": "^2.8.0",
|
||||
"cropperjs": "^1.6.2",
|
||||
"dayjs": "^1.11.13",
|
||||
"deep-chat": "^2.2.1",
|
||||
"echarts": "^5.6.0",
|
||||
"el-table-infinite-scroll": "^3.0.6",
|
||||
"element-plus": "^2.9.11",
|
||||
"highlight.js": "^11.11.1",
|
||||
"intro.js": "^7.2.0",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jsbarcode": "^3.11.6",
|
||||
@ -80,115 +82,127 @@
|
||||
"mitt": "^3.0.1",
|
||||
"mqtt": "4.3.7",
|
||||
"nprogress": "^0.2.0",
|
||||
"path": "^0.12.7",
|
||||
"pinia": "^2.1.7",
|
||||
"pinyin-pro": "^3.20.1",
|
||||
"plus-pro-components": "^0.0.11",
|
||||
"qrcode": "^1.5.3",
|
||||
"qs": "^6.12.1",
|
||||
"path-browserify": "^1.0.1",
|
||||
"pinia": "^3.0.2",
|
||||
"pinyin-pro": "^3.26.0",
|
||||
"plus-pro-components": "^0.1.23",
|
||||
"qrcode": "^1.5.4",
|
||||
"qs": "^6.14.0",
|
||||
"responsive-storage": "^2.2.0",
|
||||
"sortablejs": "^1.15.2",
|
||||
"swiper": "^11.1.1",
|
||||
"typeit": "^8.8.3",
|
||||
"sortablejs": "^1.15.6",
|
||||
"swiper": "^11.2.8",
|
||||
"typeit": "^8.8.7",
|
||||
"v-contextmenu": "^3.2.0",
|
||||
"v3-infinite-loading": "^1.3.1",
|
||||
"version-rocket": "^1.7.1",
|
||||
"vue": "^3.4.23",
|
||||
"vue-i18n": "^9.12.1",
|
||||
"v3-infinite-loading": "^1.3.2",
|
||||
"vditor": "^3.11.1",
|
||||
"version-rocket": "^1.7.4",
|
||||
"vue": "^3.5.16",
|
||||
"vue-i18n": "^11.1.5",
|
||||
"vue-json-pretty": "^2.4.0",
|
||||
"vue-pdf-embed": "^2.0.3",
|
||||
"vue-router": "^4.3.1",
|
||||
"vue-tippy": "^6.4.1",
|
||||
"vue-types": "^5.1.1",
|
||||
"vue-pdf-embed": "^2.1.2",
|
||||
"vue-router": "^4.5.1",
|
||||
"vue-tippy": "^6.7.1",
|
||||
"vue-types": "^6.0.0",
|
||||
"vue-virtual-scroller": "2.0.0-beta.8",
|
||||
"vue-waterfall-plugin-next": "^2.4.3",
|
||||
"vue3-danmaku": "^1.6.0",
|
||||
"vue-waterfall-plugin-next": "^2.6.5",
|
||||
"vue3-danmaku": "^1.6.1",
|
||||
"vue3-puzzle-vcode": "^1.1.7",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vxe-table": "^4.5.22",
|
||||
"wavesurfer.js": "^7.7.11",
|
||||
"xgplayer": "^3.0.16",
|
||||
"vxe-table": "4.6.25",
|
||||
"wavesurfer.js": "^7.9.5",
|
||||
"xgplayer": "^3.0.22",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^19.2.2",
|
||||
"@commitlint/config-conventional": "^19.2.2",
|
||||
"@commitlint/types": "^19.0.3",
|
||||
"@eslint/js": "^9.0.0",
|
||||
"@faker-js/faker": "^8.4.1",
|
||||
"@iconify-icons/ep": "^1.2.12",
|
||||
"@iconify-icons/ri": "^1.2.10",
|
||||
"@iconify/vue": "^4.1.1",
|
||||
"@intlify/unplugin-vue-i18n": "^4.0.0",
|
||||
"@pureadmin/theme": "^3.2.0",
|
||||
"@commitlint/cli": "^19.8.1",
|
||||
"@commitlint/config-conventional": "^19.8.1",
|
||||
"@commitlint/types": "^19.8.1",
|
||||
"@eslint/js": "^9.28.0",
|
||||
"@faker-js/faker": "^9.8.0",
|
||||
"@iconify/json": "^2.2.343",
|
||||
"@iconify/vue": "4.2.0",
|
||||
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
||||
"@tailwindcss/vite": "^4.1.8",
|
||||
"@types/codemirror": "^5.60.16",
|
||||
"@types/dagre": "^0.7.52",
|
||||
"@types/gradient-string": "^1.1.6",
|
||||
"@types/intro.js": "^5.1.5",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/node": "^20.12.7",
|
||||
"@types/node": "^20.17.57",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/path-browserify": "^1.0.3",
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"@types/qs": "^6.9.15",
|
||||
"@types/qs": "^6.14.0",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
||||
"@typescript-eslint/parser": "^7.7.0",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"boxen": "^7.1.1",
|
||||
"cssnano": "^6.1.2",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"@vitejs/plugin-vue-jsx": "^4.2.0",
|
||||
"boxen": "^8.0.1",
|
||||
"code-inspector-plugin": "^0.20.12",
|
||||
"cssnano": "^7.0.7",
|
||||
"dagre": "^0.8.5",
|
||||
"eslint": "^9.0.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-define-config": "^2.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-vue": "^9.25.0",
|
||||
"gradient-string": "^2.0.2",
|
||||
"husky": "^9.0.11",
|
||||
"lint-staged": "^15.2.2",
|
||||
"postcss": "^8.4.38",
|
||||
"postcss-html": "^1.6.0",
|
||||
"postcss-import": "^16.1.0",
|
||||
"eslint": "^9.28.0",
|
||||
"eslint-config-prettier": "^10.1.5",
|
||||
"eslint-plugin-prettier": "^5.4.1",
|
||||
"eslint-plugin-vue": "^10.1.0",
|
||||
"gradient-string": "^3.0.0",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.5.2",
|
||||
"postcss": "^8.5.4",
|
||||
"postcss-html": "^1.8.0",
|
||||
"postcss-load-config": "^6.0.1",
|
||||
"postcss-scss": "^4.0.9",
|
||||
"prettier": "^3.2.5",
|
||||
"rimraf": "^5.0.5",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"sass": "^1.75.0",
|
||||
"stylelint": "^16.3.1",
|
||||
"stylelint-config-recess-order": "^5.0.1",
|
||||
"stylelint-config-recommended-vue": "^1.5.0",
|
||||
"stylelint-config-standard-scss": "^13.1.0",
|
||||
"stylelint-prettier": "^5.0.0",
|
||||
"svgo": "^3.2.0",
|
||||
"tailwindcss": "^3.4.3",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.2.9",
|
||||
"vite-plugin-cdn-import": "^0.3.5",
|
||||
"prettier": "^3.5.3",
|
||||
"rimraf": "^6.0.1",
|
||||
"rollup-plugin-visualizer": "^5.14.0",
|
||||
"sass": "^1.89.1",
|
||||
"stylelint": "^16.20.0",
|
||||
"stylelint-config-recess-order": "^6.0.0",
|
||||
"stylelint-config-recommended-vue": "^1.6.0",
|
||||
"stylelint-config-standard-scss": "^14.0.0",
|
||||
"stylelint-prettier": "^5.0.3",
|
||||
"svgo": "^3.3.2",
|
||||
"tailwindcss": "^4.1.8",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.33.0",
|
||||
"unplugin-icons": "^22.1.0",
|
||||
"vite": "^6.3.5",
|
||||
"vite-plugin-cdn-import": "^1.0.1",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-fake-server": "^2.1.1",
|
||||
"vite-plugin-fake-server": "^2.2.0",
|
||||
"vite-plugin-remove-console": "^2.2.0",
|
||||
"vite-plugin-router-warn": "^1.0.0",
|
||||
"vite-svg-loader": "^5.1.0",
|
||||
"vue-eslint-parser": "^9.4.2",
|
||||
"vue-tsc": "^1.8.27"
|
||||
"vue-eslint-parser": "^10.1.3",
|
||||
"vue-tsc": "^2.2.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0",
|
||||
"pnpm": ">=8.6.10"
|
||||
"node": "^18.18.0 || ^20.9.0 || >=22.0.0",
|
||||
"pnpm": ">=9"
|
||||
},
|
||||
"packageManager": "pnpm@8.6.10",
|
||||
"pnpm": {
|
||||
"allowedDeprecatedVersions": {
|
||||
"are-we-there-yet": "*",
|
||||
"sourcemap-codec": "*",
|
||||
"lodash.isequal": "*",
|
||||
"domexception": "*",
|
||||
"w3c-hr-time": "*",
|
||||
"inflight": "*",
|
||||
"npmlog": "*",
|
||||
"rimraf": "*",
|
||||
"stable": "*",
|
||||
"abab": "*"
|
||||
"gauge": "*",
|
||||
"abab": "*",
|
||||
"glob": "*"
|
||||
},
|
||||
"peerDependencyRules": {
|
||||
"allowedVersions": {
|
||||
"eslint": "9"
|
||||
}
|
||||
}
|
||||
"onlyBuiltDependencies": [
|
||||
"@parcel/watcher",
|
||||
"core-js",
|
||||
"es5-ext",
|
||||
"esbuild",
|
||||
"typeit",
|
||||
"vue-demi"
|
||||
],
|
||||
"ignoredBuiltDependencies": [
|
||||
"@tailwindcss/oxide"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
15225
pnpm-lock.yaml
generated
@ -3,10 +3,6 @@
|
||||
/** @type {import('postcss-load-config').Config} */
|
||||
export default {
|
||||
plugins: {
|
||||
"postcss-import": {},
|
||||
"tailwindcss/nesting": {},
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
...(process.env.NODE_ENV === "production" ? { cssnano: {} } : {})
|
||||
}
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"Version": "5.4.0",
|
||||
"Version": "6.0.0",
|
||||
"Title": "PureAdmin",
|
||||
"FixedHeader": true,
|
||||
"HiddenSideBar": false,
|
||||
|
Before Width: | Height: | Size: 80 KiB |
@ -2,6 +2,7 @@
|
||||
<el-config-provider :locale="currentLocale">
|
||||
<router-view />
|
||||
<ReDialog />
|
||||
<ReDrawer />
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
@ -10,6 +11,7 @@ import { defineComponent } from "vue";
|
||||
import { checkVersion } from "version-rocket";
|
||||
import { ElConfigProvider } from "element-plus";
|
||||
import { ReDialog } from "@/components/ReDialog";
|
||||
import { ReDrawer } from "@/components/ReDrawer";
|
||||
import en from "element-plus/es/locale/lang/en";
|
||||
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
||||
import plusEn from "plus-pro-components/es/locale/lang/en";
|
||||
@ -19,7 +21,8 @@ export default defineComponent({
|
||||
name: "app",
|
||||
components: {
|
||||
[ElConfigProvider.name]: ElConfigProvider,
|
||||
ReDialog
|
||||
ReDialog,
|
||||
ReDrawer
|
||||
},
|
||||
computed: {
|
||||
currentLocale() {
|
||||
|
@ -3,10 +3,16 @@ import { http } from "@/utils/http";
|
||||
export type UserResult = {
|
||||
success: boolean;
|
||||
data: {
|
||||
/** 头像 */
|
||||
avatar: string;
|
||||
/** 用户名 */
|
||||
username: string;
|
||||
/** 昵称 */
|
||||
nickname: string;
|
||||
/** 当前登录用户的角色 */
|
||||
roles: Array<string>;
|
||||
/** 按钮级别权限 */
|
||||
permissions: Array<string>;
|
||||
/** `token` */
|
||||
accessToken: string;
|
||||
/** 用于调用刷新`accessToken`的接口时所需的`token` */
|
||||
|
@ -28,8 +28,7 @@
|
||||
c = document.createElement("div");
|
||||
(c.innerHTML = e._iconfont_svg_string_2208059),
|
||||
(c = c.getElementsByTagName("svg")[0]) &&
|
||||
(c.setAttribute("aria-hidden", "true"),
|
||||
(c.style.position = "absolute"),
|
||||
((c.style.position = "absolute"),
|
||||
(c.style.width = 0),
|
||||
(c.style.height = 0),
|
||||
(c.style.overflow = "hidden"),
|
||||
|
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" aria-hidden="true" class="iconify iconify--ant-design" viewBox="0 0 1024 1024"><path fill="currentColor" d="M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 0 0 0 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" class="iconify iconify--ant-design" viewBox="0 0 1024 1024"><path fill="currentColor" d="M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 0 0 0 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8"/></svg>
|
Before Width: | Height: | Size: 351 B After Width: | Height: | Size: 332 B |
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" aria-hidden="true" class="re-screen" color="#00000073" viewBox="0 0 16 16"><path fill="currentColor" d="M3.5 4H1V3h2V1h1v2.5zM13 3V1h-1v2.5l.5.5H15V3zm-1 9.5V15h1v-2h2v-1h-2.5zM1 12v1h2v2h1v-2.5l-.5-.5zm11-1.5-.5.5h-7l-.5-.5v-5l.5-.5h7l.5.5zM10 7H6v2h4z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" class="re-screen" color="#00000073" viewBox="0 0 16 16"><path fill="currentColor" d="M3.5 4H1V3h2V1h1v2.5zM13 3V1h-1v2.5l.5.5H15V3zm-1 9.5V15h1v-2h2v-1h-2.5zM1 12v1h2v2h1v-2.5l-.5-.5zm11-1.5-.5.5h-7l-.5-.5v-5l.5-.5h7l.5.5zM10 7H6v2h4z"/></svg>
|
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 308 B |
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" aria-hidden="true" class="re-screen" color="#00000073" viewBox="0 0 16 16"><path fill="currentColor" d="M3 12h10V4H3zm2-6h6v4H5zM2 6H1V2.5l.5-.5H5v1H2zm13-3.5V6h-1V3h-3V2h3.5zM14 10h1v3.5l-.5.5H11v-1h3zM2 13h3v1H1.5l-.5-.5V10h1z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" class="re-screen" color="#00000073" viewBox="0 0 16 16"><path fill="currentColor" d="M3 12h10V4H3zm2-6h6v4H5zM2 6H1V2.5l.5-.5H5v1H2zm13-3.5V6h-1V3h-3V2h3.5zM14 10h1v3.5l-.5.5H11v-1h3zM2 13h3v1H1.5l-.5-.5V10h1z"/></svg>
|
Before Width: | Height: | Size: 302 B After Width: | Height: | Size: 283 B |
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" aria-hidden="true" class="globalization" viewBox="0 0 512 512"><path fill="currentColor" d="m478.33 433.6-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362 368 281.65 401.17 362zm-66.99-19.08a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73 39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93.92 1.19 1.83 2.35 2.74 3.51-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59 22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" class="globalization" viewBox="0 0 512 512"><path fill="currentColor" d="m478.33 433.6-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362 368 281.65 401.17 362zm-66.99-19.08a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73 39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93.92 1.19 1.83 2.35 2.74 3.51-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59 22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z"/></svg>
|
Before Width: | Height: | Size: 826 B After Width: | Height: | Size: 807 B |
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" aria-hidden="true" class="iconify iconify--mdi" viewBox="0 0 24 24"><path fill="currentColor" d="M1 7h6v2H3v2h4v2H3v2h4v2H1zm10 0h4v2h-4v2h2a2 2 0 0 1 2 2v2c0 1.11-.89 2-2 2H9v-2h4v-2h-2a2 2 0 0 1-2-2V9c0-1.1.9-2 2-2m8 0h2a2 2 0 0 1 2 2v1h-2V9h-2v6h2v-1h2v1c0 1.11-.89 2-2 2h-2a2 2 0 0 1-2-2V9c0-1.1.9-2 2-2"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" class="iconify iconify--mdi" viewBox="0 0 24 24"><path fill="currentColor" d="M1 7h6v2H3v2h4v2H3v2h4v2H1zm10 0h4v2h-4v2h2a2 2 0 0 1 2 2v2c0 1.11-.89 2-2 2H9v-2h4v-2h-2a2 2 0 0 1-2-2V9c0-1.1.9-2 2-2m8 0h2a2 2 0 0 1 2 2v1h-2V9h-2v6h2v-1h2v1c0 1.11-.89 2-2 2h-2a2 2 0 0 1-2-2V9c0-1.1.9-2 2-2"/></svg>
|
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 360 B |
Before Width: | Height: | Size: 439 B After Width: | Height: | Size: 439 B |
1
src/assets/table-bar/drag.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg width="32" height="32" fill="currentColor" data-icon="holder" viewBox="64 64 896 896"><path d="M300 276.5a56 56 0 1 0 56-97 56 56 0 0 0-56 97m0 284a56 56 0 1 0 56-97 56 56 0 0 0-56 97M640 228a56 56 0 1 0 112 0 56 56 0 0 0-112 0m0 284a56 56 0 1 0 112 0 56 56 0 0 0-112 0M300 844.5a56 56 0 1 0 56-97 56 56 0 0 0-56 97M640 796a56 56 0 1 0 112 0 56 56 0 0 0-112 0"/></svg>
|
After Width: | Height: | Size: 373 B |
Before Width: | Height: | Size: 161 B After Width: | Height: | Size: 161 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 840 B After Width: | Height: | Size: 840 B |
@ -7,7 +7,7 @@ defineOptions({
|
||||
name: "ReAnimateSelector"
|
||||
});
|
||||
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: "请选择动画"
|
||||
@ -81,7 +81,7 @@ function onMouseleave() {
|
||||
<el-select
|
||||
clearable
|
||||
filterable
|
||||
:placeholder="props.placeholder"
|
||||
:placeholder="placeholder"
|
||||
popper-class="pure-animate-popper"
|
||||
:model-value="inputValue"
|
||||
:filter-method="filterMethod"
|
||||
@ -95,7 +95,7 @@ function onMouseleave() {
|
||||
:view-style="{ overflow: 'hidden' }"
|
||||
class="border-t border-[#e5e7eb]"
|
||||
>
|
||||
<ul class="flex flex-wrap justify-around mb-1">
|
||||
<ul class="flex flex-wrap justify-around mb-1!">
|
||||
<li
|
||||
v-for="(animate, index) in animatesList"
|
||||
:key="index"
|
||||
|
@ -119,7 +119,7 @@ export default defineComponent({
|
||||
"p-[6px]",
|
||||
"h-[30px]",
|
||||
"w-[30px]",
|
||||
"outline-none",
|
||||
"outline-hidden",
|
||||
"rounded-[4px]",
|
||||
"cursor-pointer",
|
||||
"hover:bg-[rgba(0,0,0,0.06)]"
|
||||
|
@ -7,7 +7,7 @@ defineOptions({
|
||||
name: "ReCropperPreview"
|
||||
});
|
||||
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
imgSrc: String
|
||||
});
|
||||
|
||||
@ -44,7 +44,7 @@ defineExpose({ hidePopover });
|
||||
<div class="w-[18vw]">
|
||||
<ReCropper
|
||||
ref="refCropper"
|
||||
:src="props.imgSrc"
|
||||
:src="imgSrc"
|
||||
circled
|
||||
@cropper="onCropper"
|
||||
@readied="showPopover = true"
|
||||
|
@ -29,9 +29,11 @@ const addDialog = (options: DialogOptions) => {
|
||||
const closeDialog = (options: DialogOptions, index: number, args?: any) => {
|
||||
dialogStore.value[index].visible = false;
|
||||
options.closeCallBack && options.closeCallBack({ options, index, args });
|
||||
|
||||
const closeDelay = options?.closeDelay ?? 200;
|
||||
useTimeoutFn(() => {
|
||||
dialogStore.value.splice(index, 1);
|
||||
}, 200);
|
||||
}, closeDelay);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -8,13 +8,14 @@ import {
|
||||
} from "./index";
|
||||
import { ref, computed } from "vue";
|
||||
import { isFunction } from "@pureadmin/utils";
|
||||
import Fullscreen from "@iconify-icons/ri/fullscreen-fill";
|
||||
import ExitFullscreen from "@iconify-icons/ri/fullscreen-exit-fill";
|
||||
import Fullscreen from "~icons/ri/fullscreen-fill";
|
||||
import ExitFullscreen from "~icons/ri/fullscreen-exit-fill";
|
||||
|
||||
defineOptions({
|
||||
name: "ReDialog"
|
||||
});
|
||||
|
||||
const sureBtnMap = ref({});
|
||||
const fullscreen = ref(false);
|
||||
|
||||
const footerButtons = computed(() => {
|
||||
@ -43,10 +44,26 @@ const footerButtons = computed(() => {
|
||||
bg: true,
|
||||
popconfirm: options?.popconfirm,
|
||||
btnClick: ({ dialog: { options, index } }) => {
|
||||
const done = () =>
|
||||
if (options?.sureBtnLoading) {
|
||||
sureBtnMap.value[index] = Object.assign(
|
||||
{},
|
||||
sureBtnMap.value[index],
|
||||
{
|
||||
loading: true
|
||||
}
|
||||
);
|
||||
}
|
||||
const closeLoading = () => {
|
||||
if (options?.sureBtnLoading) {
|
||||
sureBtnMap.value[index].loading = false;
|
||||
}
|
||||
};
|
||||
const done = () => {
|
||||
closeLoading();
|
||||
closeDialog(options, index, { command: "sure" });
|
||||
};
|
||||
if (options?.beforeSure && isFunction(options?.beforeSure)) {
|
||||
options.beforeSure(done, { options, index });
|
||||
options.beforeSure(done, { options, index, closeLoading });
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
@ -62,7 +79,7 @@ const fullscreenClass = computed(() => {
|
||||
"el-dialog__close",
|
||||
"-translate-x-2",
|
||||
"cursor-pointer",
|
||||
"hover:!text-[red]"
|
||||
"hover:text-[red]!"
|
||||
];
|
||||
});
|
||||
|
||||
@ -172,6 +189,7 @@ function handleClose(
|
||||
<el-button
|
||||
v-else
|
||||
v-bind="btn"
|
||||
:loading="key === 1 && sureBtnMap[index]?.loading"
|
||||
@click="
|
||||
btn.btnClick({
|
||||
dialog: { options, index },
|
||||
|
@ -69,11 +69,11 @@ type DialogProps = {
|
||||
type Popconfirm = {
|
||||
/** 标题 */
|
||||
title?: string;
|
||||
/** 确认按钮文字 */
|
||||
/** 确定按钮文字 */
|
||||
confirmButtonText?: string;
|
||||
/** 取消按钮文字 */
|
||||
cancelButtonText?: string;
|
||||
/** 确认按钮类型,默认 `primary` */
|
||||
/** 确定按钮类型,默认 `primary` */
|
||||
confirmButtonType?: ButtonType;
|
||||
/** 取消按钮类型,默认 `text` */
|
||||
cancelButtonType?: ButtonType;
|
||||
@ -121,7 +121,7 @@ type ButtonProps = {
|
||||
round?: boolean;
|
||||
/** 是否为圆形按钮,默认 `false` */
|
||||
circle?: boolean;
|
||||
/** 确认按钮的 `Popconfirm` 气泡确认框相关配置 */
|
||||
/** 确定按钮的 `Popconfirm` 气泡确认框相关配置 */
|
||||
popconfirm?: Popconfirm;
|
||||
/** 是否为加载中状态,默认 `false` */
|
||||
loading?: boolean;
|
||||
@ -160,8 +160,10 @@ interface DialogOptions extends DialogProps {
|
||||
props?: any;
|
||||
/** 是否隐藏 `Dialog` 按钮操作区的内容 */
|
||||
hideFooter?: boolean;
|
||||
/** 确认按钮的 `Popconfirm` 气泡确认框相关配置 */
|
||||
/** 确定按钮的 `Popconfirm` 气泡确认框相关配置 */
|
||||
popconfirm?: Popconfirm;
|
||||
/** 点击确定按钮后是否开启 `loading` 加载动画 */
|
||||
sureBtnLoading?: boolean;
|
||||
/**
|
||||
* @description 自定义对话框标题的内容渲染器
|
||||
* @see {@link https://element-plus.org/zh-CN/component/dialog.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%A4%B4%E9%83%A8}
|
||||
@ -259,10 +261,13 @@ interface DialogOptions extends DialogProps {
|
||||
done: Function,
|
||||
{
|
||||
options,
|
||||
index
|
||||
index,
|
||||
closeLoading
|
||||
}: {
|
||||
options: DialogOptions;
|
||||
index: number;
|
||||
/** 关闭确定按钮的 `loading` 加载动画 */
|
||||
closeLoading: Function;
|
||||
}
|
||||
) => void;
|
||||
}
|
||||
|
64
src/components/ReDrawer/index.ts
Normal file
@ -0,0 +1,64 @@
|
||||
import { ref } from "vue";
|
||||
import reDrawer from "./index.vue";
|
||||
import { useTimeoutFn } from "@vueuse/core";
|
||||
import { withInstall } from "@pureadmin/utils";
|
||||
import type {
|
||||
EventType,
|
||||
ArgsType,
|
||||
DrawerProps,
|
||||
DrawerOptions,
|
||||
ButtonProps
|
||||
} from "./type";
|
||||
|
||||
const drawerStore = ref<Array<DrawerOptions>>([]);
|
||||
|
||||
/** 打开抽屉 */
|
||||
const addDrawer = (options: DrawerOptions) => {
|
||||
const open = () =>
|
||||
drawerStore.value.push(Object.assign(options, { visible: true }));
|
||||
if (options?.openDelay) {
|
||||
useTimeoutFn(() => {
|
||||
open();
|
||||
}, options.openDelay);
|
||||
} else {
|
||||
open();
|
||||
}
|
||||
};
|
||||
|
||||
/** 关闭抽屉 */
|
||||
const closeDrawer = (options: DrawerOptions, index: number, args?: any) => {
|
||||
drawerStore.value[index].visible = false;
|
||||
options.closeCallBack && options.closeCallBack({ options, index, args });
|
||||
|
||||
const closeDelay = options?.closeDelay ?? 200;
|
||||
useTimeoutFn(() => {
|
||||
drawerStore.value.splice(index, 1);
|
||||
}, closeDelay);
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 更改抽屉自身属性值
|
||||
* @param value 属性值
|
||||
* @param key 属性,默认`title`
|
||||
* @param index 弹框索引(默认`0`,代表只有一个弹框,对于嵌套弹框要改哪个弹框的属性值就把该弹框索引赋给`index`)
|
||||
*/
|
||||
const updateDrawer = (value: any, key = "title", index = 0) => {
|
||||
drawerStore.value[index][key] = value;
|
||||
};
|
||||
|
||||
/** 关闭所有弹框 */
|
||||
const closeAllDrawer = () => {
|
||||
drawerStore.value = [];
|
||||
};
|
||||
|
||||
const ReDrawer = withInstall(reDrawer);
|
||||
|
||||
export type { EventType, ArgsType, DrawerOptions, DrawerProps, ButtonProps };
|
||||
export {
|
||||
ReDrawer,
|
||||
drawerStore,
|
||||
addDrawer,
|
||||
closeDrawer,
|
||||
updateDrawer,
|
||||
closeAllDrawer
|
||||
};
|
169
src/components/ReDrawer/index.vue
Normal file
@ -0,0 +1,169 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
type EventType,
|
||||
type ButtonProps,
|
||||
type DrawerOptions,
|
||||
closeDrawer,
|
||||
drawerStore
|
||||
} from "./index";
|
||||
import { computed, ref } from "vue";
|
||||
import { isFunction } from "@pureadmin/utils";
|
||||
|
||||
defineOptions({
|
||||
name: "ReDrawer"
|
||||
});
|
||||
|
||||
const sureBtnMap = ref({});
|
||||
|
||||
const footerButtons = computed(() => {
|
||||
return (options: DrawerOptions) => {
|
||||
return options?.footerButtons?.length > 0
|
||||
? options.footerButtons
|
||||
: ([
|
||||
{
|
||||
label: "取消",
|
||||
text: true,
|
||||
bg: true,
|
||||
btnClick: ({ drawer: { options, index } }) => {
|
||||
const done = () =>
|
||||
closeDrawer(options, index, { command: "cancel" });
|
||||
if (options?.beforeCancel && isFunction(options?.beforeCancel)) {
|
||||
options.beforeCancel(done, { options, index });
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "确定",
|
||||
type: "primary",
|
||||
text: true,
|
||||
bg: true,
|
||||
popConfirm: options?.popConfirm,
|
||||
btnClick: ({ drawer: { options, index } }) => {
|
||||
if (options?.sureBtnLoading) {
|
||||
sureBtnMap.value[index] = Object.assign(
|
||||
{},
|
||||
sureBtnMap.value[index],
|
||||
{
|
||||
loading: true
|
||||
}
|
||||
);
|
||||
}
|
||||
const closeLoading = () => {
|
||||
if (options?.sureBtnLoading) {
|
||||
sureBtnMap.value[index].loading = false;
|
||||
}
|
||||
};
|
||||
const done = () => {
|
||||
closeLoading();
|
||||
closeDrawer(options, index, { command: "sure" });
|
||||
};
|
||||
if (options?.beforeSure && isFunction(options?.beforeSure)) {
|
||||
options.beforeSure(done, { options, index, closeLoading });
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
}
|
||||
}
|
||||
] as Array<ButtonProps>);
|
||||
};
|
||||
});
|
||||
|
||||
function eventsCallBack(
|
||||
event: EventType,
|
||||
options: DrawerOptions,
|
||||
index: number
|
||||
) {
|
||||
if (options?.[event] && isFunction(options?.[event])) {
|
||||
return options?.[event]({ options, index });
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {DrawerOptions} options - 包含抽屉相关配置的对象
|
||||
* @param {number} index - 抽屉的索引
|
||||
* @param {Object} args - 传递给关闭抽屉操作的参数对象,默认为 { command: 'close' }
|
||||
* @returns {void} 这个函数不返回任何值
|
||||
*/
|
||||
function handleClose(
|
||||
options: DrawerOptions,
|
||||
index: number,
|
||||
args = { command: "close" }
|
||||
) {
|
||||
closeDrawer(options, index, args);
|
||||
eventsCallBack("close", options, index);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-drawer
|
||||
v-for="(options, index) in drawerStore"
|
||||
:key="index"
|
||||
v-bind="options"
|
||||
v-model="options.visible"
|
||||
class="pure-drawer"
|
||||
:append-to-body="!!options?.appendToBody"
|
||||
:append-to="options?.appendTo ? options.appendTo : 'body'"
|
||||
:destroy-on-close="!!options?.destroyOnClose"
|
||||
:lock-scroll="!!options?.lockScroll"
|
||||
@closed="handleClose(options, index)"
|
||||
@opened="eventsCallBack('open', options, index)"
|
||||
@open-auto-focus="eventsCallBack('openAutoFocus', options, index)"
|
||||
@close-auto-focus="eventsCallBack('closeAutoFocus', options, index)"
|
||||
>
|
||||
<!-- header -->
|
||||
<template
|
||||
v-if="options?.headerRenderer"
|
||||
#header="{ close, titleId, titleClass }"
|
||||
>
|
||||
<component
|
||||
:is="options?.headerRenderer({ close, titleId, titleClass })"
|
||||
/>
|
||||
</template>
|
||||
<!-- body -->
|
||||
<component
|
||||
v-bind="options?.props"
|
||||
:is="options.contentRenderer({ options, index })"
|
||||
@close="args => handleClose(options, index, args)"
|
||||
/>
|
||||
<!-- footer -->
|
||||
<template v-if="!options?.hideFooter" #footer>
|
||||
<template v-if="options?.footerRenderer">
|
||||
<component :is="options?.footerRenderer({ options, index })" />
|
||||
</template>
|
||||
<span v-else>
|
||||
<template v-for="(btn, key) in footerButtons(options)" :key="key">
|
||||
<el-popconfirm
|
||||
v-if="btn.popConfirm"
|
||||
v-bind="btn.popConfirm"
|
||||
@confirm="
|
||||
btn.btnClick({
|
||||
drawer: { options, index },
|
||||
button: { btn, index: key }
|
||||
})
|
||||
"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button v-bind="btn">{{ btn?.label }}</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
<el-button
|
||||
v-else
|
||||
v-bind="btn"
|
||||
:loading="key === 1 && sureBtnMap[index]?.loading"
|
||||
@click="
|
||||
btn.btnClick({
|
||||
drawer: { options, index },
|
||||
button: { btn, index: key }
|
||||
})
|
||||
"
|
||||
>
|
||||
{{ btn?.label }}
|
||||
</el-button>
|
||||
</template>
|
||||
</span>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
262
src/components/ReDrawer/type.ts
Normal file
@ -0,0 +1,262 @@
|
||||
import type { CSSProperties, VNode, Component } from "vue";
|
||||
|
||||
type DoneFn = (cancel?: boolean) => void;
|
||||
type EventType = "open" | "close" | "openAutoFocus" | "closeAutoFocus";
|
||||
type ArgsType = {
|
||||
/** `cancel` 点击取消按钮、`sure` 点击确定按钮、`close` 点击右上角关闭按钮或空白页或按下了 `esc` 键 */
|
||||
command: "cancel" | "sure" | "close";
|
||||
};
|
||||
|
||||
type ButtonType =
|
||||
| "primary"
|
||||
| "success"
|
||||
| "warning"
|
||||
| "danger"
|
||||
| "info"
|
||||
| "text";
|
||||
|
||||
type DrawerProps = {
|
||||
/** `Drawer` 的显示与隐藏 */
|
||||
visible?: boolean;
|
||||
/** `Drawer` 自身是否插入至 `body` 元素上。嵌套的 `Drawer` 必须指定该属性并赋值为 `true`,默认 `false` */
|
||||
appendToBody?: boolean;
|
||||
/** 挂载到哪个 `DOM` 元素 将覆盖 `appendToBody` */
|
||||
appendTo?: string;
|
||||
/** 是否在 `Drawer` 出现时将 `body` 滚动锁定,默认 `true` */
|
||||
lockScroll?: boolean;
|
||||
/** 关闭前的回调,会暂停 `Drawer` 的关闭 回调函数内执行 `done` 参数方法的时候才是真正关闭对话框的时候 */
|
||||
beforeClose?: (done: DoneFn) => void;
|
||||
/** 是否可以通过点击 `modal` 关闭 `Drawer` ,默认 `true` */
|
||||
closeOnClickModal?: boolean;
|
||||
/** 是否可以通过按下 `ESC` 关闭 `Drawer` ,默认 `true` */
|
||||
closeOnPressEscape?: boolean;
|
||||
/** 是否显示关闭按钮,默认 `true` */
|
||||
showClose?: boolean;
|
||||
/** `Drawer` 打开的延时时间,单位毫秒,默认 `0` */
|
||||
openDelay?: number;
|
||||
/** `Drawer` 关闭的延时时间,单位毫秒,默认 `0` */
|
||||
closeDelay?: number;
|
||||
/** `Drawer` 自定义类名 */
|
||||
class?: string;
|
||||
/** `Drawer` 的自定义样式 */
|
||||
style?: CSSProperties;
|
||||
/** 控制是否在关闭 `Drawer` 之后将子元素全部销毁,默认 `false` */
|
||||
destroyOnClose?: boolean;
|
||||
/** 是否需要遮罩层,默认 `true` */
|
||||
modal?: boolean;
|
||||
/** `Drawer` 打开的方向,默认 `rtl` */
|
||||
direction?: "rtl" | "ltr" | "ttb" | "btt";
|
||||
/** `Drawer` 窗体的大小, 当使用 `number` 类型时, 以像素为单位, 当使用 `string` 类型时, 请传入 `'x%'`, 否则便会以 `number` 类型解释 */
|
||||
size?: string | number;
|
||||
/** `Drawer` 的标题 */
|
||||
title?: string;
|
||||
/** 控制是否显示 `header` 栏, 默认为 `true`, 当此项为 `false` 时, `title attribute` 和 `title slot` 均不生效 */
|
||||
withHeader?: boolean;
|
||||
/** 遮罩层的自定义类名 */
|
||||
modalClass?: string;
|
||||
/** 设置 `z-index` */
|
||||
zIndex?: number;
|
||||
/** `header` 的 `aria-level` 属性,默认 `2` */
|
||||
headerAriaLevel?: string;
|
||||
};
|
||||
|
||||
//element-plus.org/zh-CN/component/popConfirm.html#attributes
|
||||
type PopConfirm = {
|
||||
/** 标题 */
|
||||
title?: string;
|
||||
/** 确认按钮文字 */
|
||||
confirmButtonText?: string;
|
||||
/** 取消按钮文字 */
|
||||
cancelButtonText?: string;
|
||||
/** 确认按钮类型,默认 `primary` */
|
||||
confirmButtonType?: ButtonType;
|
||||
/** 取消按钮类型,默认 `text` */
|
||||
cancelButtonType?: ButtonType;
|
||||
/** 自定义图标,默认 `QuestionFilled` */
|
||||
icon?: string | Component;
|
||||
/** `Icon` 颜色,默认 `#f90` */
|
||||
iconColor?: string;
|
||||
/** 是否隐藏 `Icon`,默认 `false` */
|
||||
hideIcon?: boolean;
|
||||
/** 关闭时的延迟,默认 `200` */
|
||||
hideAfter?: number;
|
||||
/** 是否将 `popover` 的下拉列表插入至 `body` 元素,默认 `true` */
|
||||
teleported?: boolean;
|
||||
/** 当 `popover` 组件长时间不触发且 `persistent` 属性设置为 `false` 时, `popover` 将会被删除,默认 `false` */
|
||||
persistent?: boolean;
|
||||
/** 弹层宽度,最小宽度 `150px`,默认 `150` */
|
||||
width?: string | number;
|
||||
};
|
||||
|
||||
type BtnClickDrawer = {
|
||||
options?: DrawerOptions;
|
||||
index?: number;
|
||||
};
|
||||
type BtnClickButton = {
|
||||
btn?: ButtonProps;
|
||||
index?: number;
|
||||
};
|
||||
/** https://element-plus.org/zh-CN/component/button.html#button-attributes */
|
||||
type ButtonProps = {
|
||||
/** 按钮文字 */
|
||||
label: string;
|
||||
/** 按钮尺寸 */
|
||||
size?: "large" | "default" | "small";
|
||||
/** 按钮类型 */
|
||||
type?: "primary" | "success" | "warning" | "danger" | "info";
|
||||
/** 是否为朴素按钮,默认 `false` */
|
||||
plain?: boolean;
|
||||
/** 是否为文字按钮,默认 `false` */
|
||||
text?: boolean;
|
||||
/** 是否显示文字按钮背景颜色,默认 `false` */
|
||||
bg?: boolean;
|
||||
/** 是否为链接按钮,默认 `false` */
|
||||
link?: boolean;
|
||||
/** 是否为圆角按钮,默认 `false` */
|
||||
round?: boolean;
|
||||
/** 是否为圆形按钮,默认 `false` */
|
||||
circle?: boolean;
|
||||
/** 确认按钮的 `PopConfirm` 气泡确认框相关配置 */
|
||||
popConfirm?: PopConfirm;
|
||||
/** 是否为加载中状态,默认 `false` */
|
||||
loading?: boolean;
|
||||
/** 自定义加载中状态图标组件 */
|
||||
loadingIcon?: string | Component;
|
||||
/** 按钮是否为禁用状态,默认 `false` */
|
||||
disabled?: boolean;
|
||||
/** 图标组件 */
|
||||
icon?: string | Component;
|
||||
/** 是否开启原生 `autofocus` 属性,默认 `false` */
|
||||
autofocus?: boolean;
|
||||
/** 原生 `type` 属性,默认 `button` */
|
||||
nativeType?: "button" | "submit" | "reset";
|
||||
/** 自动在两个中文字符之间插入空格 */
|
||||
autoInsertSpace?: boolean;
|
||||
/** 自定义按钮颜色, 并自动计算 `hover` 和 `active` 触发后的颜色 */
|
||||
color?: string;
|
||||
/** `dark` 模式, 意味着自动设置 `color` 为 `dark` 模式的颜色,默认 `false` */
|
||||
dark?: boolean;
|
||||
/** 自定义元素标签 */
|
||||
tag?: string | Component;
|
||||
/** 点击按钮后触发的回调 */
|
||||
btnClick?: ({
|
||||
drawer,
|
||||
button
|
||||
}: {
|
||||
/** 当前 `Drawer` 信息 */
|
||||
drawer: BtnClickDrawer;
|
||||
/** 当前 `button` 信息 */
|
||||
button: BtnClickButton;
|
||||
}) => void;
|
||||
};
|
||||
|
||||
interface DrawerOptions extends DrawerProps {
|
||||
/** 内容区组件的 `props`,可通过 `defineProps` 接收 */
|
||||
props?: any;
|
||||
/** 是否隐藏 `Drawer` 按钮操作区的内容 */
|
||||
hideFooter?: boolean;
|
||||
/** 确认按钮的 `PopConfirm` 气泡确认框相关配置 */
|
||||
popConfirm?: PopConfirm;
|
||||
/** 点击确定按钮后是否开启 `loading` 加载动画 */
|
||||
sureBtnLoading?: boolean;
|
||||
/**
|
||||
* @description 自定义抽屉标题的内容渲染器
|
||||
* @see {@link https://element-plus.org/zh-CN/component/drawer.html#%E6%8F%92%E6%A7%BD}
|
||||
*/
|
||||
headerRenderer?: ({
|
||||
close,
|
||||
titleId,
|
||||
titleClass
|
||||
}: {
|
||||
close: Function;
|
||||
titleId: string;
|
||||
titleClass: string;
|
||||
}) => VNode | Component;
|
||||
/** 自定义内容渲染器 */
|
||||
contentRenderer?: ({
|
||||
options,
|
||||
index
|
||||
}: {
|
||||
options: DrawerOptions;
|
||||
index: number;
|
||||
}) => VNode | Component;
|
||||
/** 自定义按钮操作区的内容渲染器,会覆盖`footerButtons`以及默认的 `取消` 和 `确定` 按钮 */
|
||||
footerRenderer?: ({
|
||||
options,
|
||||
index
|
||||
}: {
|
||||
options: DrawerOptions;
|
||||
index: number;
|
||||
}) => VNode | Component;
|
||||
/** 自定义底部按钮操作 */
|
||||
footerButtons?: Array<ButtonProps>;
|
||||
/** `Drawer` 打开后的回调 */
|
||||
open?: ({
|
||||
options,
|
||||
index
|
||||
}: {
|
||||
options: DrawerOptions;
|
||||
index: number;
|
||||
}) => void;
|
||||
/** `Drawer` 关闭后的回调(只有点击右上角关闭按钮或空白页或按下了esc键关闭页面时才会触发) */
|
||||
close?: ({
|
||||
options,
|
||||
index
|
||||
}: {
|
||||
options: DrawerOptions;
|
||||
index: number;
|
||||
}) => void;
|
||||
/** `Drawer` 关闭后的回调。 `args` 返回的 `command` 值解析:`cancel` 点击取消按钮、`sure` 点击确定按钮、`close` 点击右上角关闭按钮或空白页或按下了esc键 */
|
||||
closeCallBack?: ({
|
||||
options,
|
||||
index,
|
||||
args
|
||||
}: {
|
||||
options: DrawerOptions;
|
||||
index: number;
|
||||
args: any;
|
||||
}) => void;
|
||||
/** 输入焦点聚焦在 `Drawer` 内容时的回调 */
|
||||
openAutoFocus?: ({
|
||||
options,
|
||||
index
|
||||
}: {
|
||||
options: DrawerOptions;
|
||||
index: number;
|
||||
}) => void;
|
||||
/** 输入焦点从 `Drawer` 内容失焦时的回调 */
|
||||
closeAutoFocus?: ({
|
||||
options,
|
||||
index
|
||||
}: {
|
||||
options: DrawerOptions;
|
||||
index: number;
|
||||
}) => void;
|
||||
|
||||
/** 点击底部取消按钮的回调,会暂停 `Drawer` 的关闭. 回调函数内执行 `done` 参数方法的时候才是真正关闭对话框的时候 */
|
||||
beforeCancel?: (
|
||||
done: Function,
|
||||
{
|
||||
options,
|
||||
index
|
||||
}: {
|
||||
options: DrawerOptions;
|
||||
index: number;
|
||||
}
|
||||
) => void;
|
||||
/** 点击底部确定按钮的回调,会暂停 `Drawer` 的关闭. 回调函数内执行 `done` 参数方法的时候才是真正关闭对话框的时候 */
|
||||
beforeSure?: (
|
||||
done: Function,
|
||||
{
|
||||
options,
|
||||
index,
|
||||
closeLoading
|
||||
}: {
|
||||
options: DrawerOptions;
|
||||
index: number;
|
||||
closeLoading: Function;
|
||||
}
|
||||
) => void;
|
||||
}
|
||||
|
||||
export type { ButtonProps, DrawerOptions, ArgsType, DrawerProps, EventType };
|
@ -3,7 +3,7 @@ import { ref, unref, onMounted } from "vue";
|
||||
import { LogicFlow } from "@logicflow/core";
|
||||
|
||||
interface Props {
|
||||
lf: LogicFlow;
|
||||
lf?: LogicFlow;
|
||||
catTurboData?: boolean;
|
||||
}
|
||||
|
||||
@ -114,7 +114,8 @@ onMounted(() => {
|
||||
:style="{
|
||||
cursor: item.disabled === false ? 'pointer' : 'not-allowed',
|
||||
color: item.disabled === false ? '' : '#00000040',
|
||||
background: 'transparent'
|
||||
background: 'transparent',
|
||||
border: 'none'
|
||||
}"
|
||||
@click="onControl(item, key)"
|
||||
>
|
||||
|
@ -2,7 +2,7 @@
|
||||
import VueJsonPretty from "vue-json-pretty";
|
||||
import "vue-json-pretty/lib/styles.css";
|
||||
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
graphData: Object
|
||||
});
|
||||
</script>
|
||||
@ -12,6 +12,6 @@ const props = defineProps({
|
||||
:path="'res'"
|
||||
:deep="3"
|
||||
:showLength="true"
|
||||
:data="props.graphData"
|
||||
:data="graphData"
|
||||
/>
|
||||
</template>
|
||||
|
@ -9,8 +9,8 @@ type nodeListType = {
|
||||
};
|
||||
|
||||
interface Props {
|
||||
lf: LogicFlow;
|
||||
nodeList: Array<nodeListType>;
|
||||
lf?: LogicFlow;
|
||||
nodeList?: Array<nodeListType>;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@ -35,7 +35,7 @@ const nodeDragNode = item => {
|
||||
<!-- 左侧bpmn元素选择器 -->
|
||||
<div class="node-panel">
|
||||
<div
|
||||
v-for="item in props.nodeList"
|
||||
v-for="item in nodeList"
|
||||
:key="item.text"
|
||||
class="node-item dark:text-bg_color"
|
||||
@mousedown="nodeDragNode(item)"
|
||||
|
@ -28,8 +28,7 @@
|
||||
((o = document.createElement("div")).innerHTML = i),
|
||||
(i = null),
|
||||
(e = o.getElementsByTagName("svg")[0]) &&
|
||||
(e.setAttribute("aria-hidden", "true"),
|
||||
(e.style.position = "absolute"),
|
||||
((e.style.position = "absolute"),
|
||||
(e.style.width = 0),
|
||||
(e.style.height = 0),
|
||||
(e.style.overflow = "hidden"),
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { IconJson } from "@/components/ReIcon/data";
|
||||
import { cloneDeep, isAllEmpty } from "@pureadmin/utils";
|
||||
import { ref, computed, CSSProperties, watch } from "vue";
|
||||
import Search from "@iconify-icons/ri/search-eye-line";
|
||||
import Search from "~icons/ri/search-eye-line";
|
||||
|
||||
type ParameterCSSProperties = (item?: string) => CSSProperties | undefined;
|
||||
|
||||
@ -158,7 +158,7 @@ watch(
|
||||
:name="pane.name"
|
||||
>
|
||||
<el-scrollbar height="220px">
|
||||
<ul class="flex flex-wrap px-2 ml-2">
|
||||
<ul class="flex flex-wrap px-2! ml-2!">
|
||||
<li
|
||||
v-for="(item, key) in pageList"
|
||||
:key="key"
|
||||
@ -194,11 +194,11 @@ watch(
|
||||
:pager-count="5"
|
||||
layout="pager"
|
||||
background
|
||||
small
|
||||
size="small"
|
||||
@current-change="onCurrentChange"
|
||||
/>
|
||||
<el-button
|
||||
class="justify-end mr-2 ml-2"
|
||||
class="justify-end mx-2!"
|
||||
type="danger"
|
||||
size="small"
|
||||
text
|
||||
@ -219,8 +219,8 @@ watch(
|
||||
&:hover {
|
||||
color: var(--el-color-primary);
|
||||
border-color: var(--el-color-primary);
|
||||
transition: all 0.4s;
|
||||
transform: scaleX(1.05);
|
||||
transition: all 0.4s;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import type { iconType } from "./types";
|
||||
import { h, defineComponent, type Component } from "vue";
|
||||
import { IconifyIconOnline, IconifyIconOffline, FontIcon } from "../index";
|
||||
import { FontIcon, IconifyIconOnline, IconifyIconOffline } from "../index";
|
||||
|
||||
/**
|
||||
* 支持 `iconfont`、自定义 `svg` 以及 `iconify` 中所有的图标
|
||||
* @see 点击查看文档图标篇 {@link https://yiming_chang.gitee.io/pure-admin-doc/pages/icon/}
|
||||
* @see 点击查看文档图标篇 {@link https://pure-admin.cn/pages/icon/}
|
||||
* @param icon 必传 图标
|
||||
* @param attrs 可选 iconType 属性
|
||||
* @returns Component
|
||||
@ -49,10 +49,12 @@ export function useRenderIcon(icon: any, attrs?: iconType): Component {
|
||||
return defineComponent({
|
||||
name: "Icon",
|
||||
render() {
|
||||
const IconifyIcon =
|
||||
icon && icon.includes(":") ? IconifyIconOnline : IconifyIconOffline;
|
||||
if (!icon) return;
|
||||
const IconifyIcon = icon.includes(":")
|
||||
? IconifyIconOnline
|
||||
: IconifyIconOffline;
|
||||
return h(IconifyIcon, {
|
||||
icon: icon,
|
||||
icon,
|
||||
...attrs
|
||||
});
|
||||
}
|
||||
|
@ -27,8 +27,7 @@ export default defineComponent({
|
||||
return h(
|
||||
"svg",
|
||||
{
|
||||
class: "icon-svg",
|
||||
"aria-hidden": true
|
||||
class: "icon-svg"
|
||||
},
|
||||
{
|
||||
default: () => [
|
||||
|
@ -13,10 +13,26 @@ export default defineComponent({
|
||||
render() {
|
||||
if (typeof this.icon === "object") addIcon(this.icon, this.icon);
|
||||
const attrs = this.$attrs;
|
||||
if (typeof this.icon === "string") {
|
||||
return h(
|
||||
IconifyIcon,
|
||||
{
|
||||
icon: this.icon,
|
||||
"aria-hidden": false,
|
||||
style: attrs?.style
|
||||
? Object.assign(attrs.style, { outline: "none" })
|
||||
: { outline: "none" },
|
||||
...attrs
|
||||
},
|
||||
{
|
||||
default: () => []
|
||||
}
|
||||
);
|
||||
} else {
|
||||
return h(
|
||||
this.icon,
|
||||
{
|
||||
"aria-hidden": false,
|
||||
style: attrs?.style
|
||||
? Object.assign(attrs.style, { outline: "none" })
|
||||
: { outline: "none" },
|
||||
@ -27,4 +43,5 @@ export default defineComponent({
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -17,6 +17,7 @@ export default defineComponent({
|
||||
IconifyIcon,
|
||||
{
|
||||
icon: `${this.icon}`,
|
||||
"aria-hidden": false,
|
||||
style: attrs?.style
|
||||
? Object.assign(attrs.style, { outline: "none" })
|
||||
: { outline: "none" },
|
||||
|
@ -1,70 +1,87 @@
|
||||
// 这里存放本地图标,在 src/layout/index.vue 文件中加载,避免在首启动加载
|
||||
import { getSvgInfo } from "@pureadmin/utils";
|
||||
import { addIcon } from "@iconify/vue/dist/offline";
|
||||
|
||||
// https://icon-sets.iconify.design/ep/?keyword=ep
|
||||
import EpMenu from "~icons/ep/menu?raw";
|
||||
import EpEdit from "~icons/ep/edit?raw";
|
||||
import EpGuide from "~icons/ep/guide?raw";
|
||||
import EpSetUp from "~icons/ep/set-up?raw";
|
||||
import EpMonitor from "~icons/ep/monitor?raw";
|
||||
import EpLollipop from "~icons/ep/lollipop?raw";
|
||||
import EpHistogram from "~icons/ep/histogram?raw";
|
||||
import EpHomeFilled from "~icons/ep/home-filled?raw";
|
||||
|
||||
// https://icon-sets.iconify.design/ri/?keyword=ri
|
||||
import RiMindMap from "~icons/ri/mind-map?raw";
|
||||
import RiAdminFill from "~icons/ri/admin-fill?raw";
|
||||
import RiTableLine from "~icons/ri/table-line?raw";
|
||||
import RiLinksFill from "~icons/ri/links-fill?raw";
|
||||
import RiAdminLine from "~icons/ri/admin-line?raw";
|
||||
import RiListCheck from "~icons/ri/list-check?raw";
|
||||
import RiSearchLine from "~icons/ri/search-line?raw";
|
||||
import RiWindowLine from "~icons/ri/window-line?raw";
|
||||
import RiUbuntuFill from "~icons/ri/ubuntu-fill?raw";
|
||||
import RiHistoryFill from "~icons/ri/history-fill?raw";
|
||||
import RiEditBoxLine from "~icons/ri/edit-box-line?raw";
|
||||
import RiCodeBoxLine from "~icons/ri/code-box-line?raw";
|
||||
import RiArtboardLine from "~icons/ri/artboard-line?raw";
|
||||
import RiMarkdownLine from "~icons/ri/markdown-line?raw";
|
||||
import RiFileInfoLine from "~icons/ri/file-info-line?raw";
|
||||
import RiBankCardLine from "~icons/ri/bank-card-line?raw";
|
||||
import RiFilePpt2Line from "~icons/ri/file-ppt-2-line?raw";
|
||||
import RiGitBranchLine from "~icons/ri/git-branch-line?raw";
|
||||
import RiSettings3Line from "~icons/ri/settings-3-line?raw";
|
||||
import RiUserVoiceLine from "~icons/ri/user-voice-line?raw";
|
||||
import RiBookmark2Line from "~icons/ri/bookmark-2-line?raw";
|
||||
import RiFileSearchLine from "~icons/ri/file-search-line?raw";
|
||||
import RiChatSearchLine from "~icons/ri/chat-search-line?raw";
|
||||
import RiInformationLine from "~icons/ri/information-line?raw";
|
||||
import RiTerminalWindowLine from "~icons/ri/terminal-window-line?raw";
|
||||
import RiCheckboxCircleLine from "~icons/ri/checkbox-circle-line?raw";
|
||||
import RiBarChartHorizontalLine from "~icons/ri/bar-chart-horizontal-line?raw";
|
||||
|
||||
const icons = [
|
||||
// Element Plus Icon: https://github.com/element-plus/element-plus-icons
|
||||
["ep/menu", EpMenu],
|
||||
["ep/edit", EpEdit],
|
||||
["ep/guide", EpGuide],
|
||||
["ep/set-up", EpSetUp],
|
||||
["ep/monitor", EpMonitor],
|
||||
["ep/lollipop", EpLollipop],
|
||||
["ep/histogram", EpHistogram],
|
||||
["ep/home-filled", EpHomeFilled],
|
||||
// Remix Icon: https://github.com/Remix-Design/RemixIcon
|
||||
["ri/mind-map", RiMindMap],
|
||||
["ri/admin-fill", RiAdminFill],
|
||||
["ri/table-line", RiTableLine],
|
||||
["ri/links-fill", RiLinksFill],
|
||||
["ri/admin-line", RiAdminLine],
|
||||
["ri/list-check", RiListCheck],
|
||||
["ri/search-line", RiSearchLine],
|
||||
["ri/window-line", RiWindowLine],
|
||||
["ri/ubuntu-fill", RiUbuntuFill],
|
||||
["ri/history-fill", RiHistoryFill],
|
||||
["ri/edit-box-line", RiEditBoxLine],
|
||||
["ri/code-box-line", RiCodeBoxLine],
|
||||
["ri/artboard-line", RiArtboardLine],
|
||||
["ri/markdown-line", RiMarkdownLine],
|
||||
["ri/file-info-line", RiFileInfoLine],
|
||||
["ri/bank-card-line", RiBankCardLine],
|
||||
["ri/file-ppt-2-line", RiFilePpt2Line],
|
||||
["ri/git-branch-line", RiGitBranchLine],
|
||||
["ri/settings-3-line", RiSettings3Line],
|
||||
["ri/user-voice-line", RiUserVoiceLine],
|
||||
["ri/bookmark-2-line", RiBookmark2Line],
|
||||
["ri/file-search-line", RiFileSearchLine],
|
||||
["ri/chat-search-line", RiChatSearchLine],
|
||||
["ri/information-line", RiInformationLine],
|
||||
["ri/terminal-window-line", RiTerminalWindowLine],
|
||||
["ri/checkbox-circle-line", RiCheckboxCircleLine],
|
||||
["ri/bar-chart-horizontal-line", RiBarChartHorizontalLine]
|
||||
];
|
||||
|
||||
// 本地菜单图标,后端在路由的 icon 中返回对应的图标字符串并且前端在此处使用 addIcon 添加即可渲染菜单图标
|
||||
// @iconify-icons/ep
|
||||
import Menu from "@iconify-icons/ep/menu";
|
||||
import Edit from "@iconify-icons/ep/edit";
|
||||
import SetUp from "@iconify-icons/ep/set-up";
|
||||
import Guide from "@iconify-icons/ep/guide";
|
||||
import Monitor from "@iconify-icons/ep/monitor";
|
||||
import Lollipop from "@iconify-icons/ep/lollipop";
|
||||
import Histogram from "@iconify-icons/ep/histogram";
|
||||
import HomeFilled from "@iconify-icons/ep/home-filled";
|
||||
addIcon("ep:menu", Menu);
|
||||
addIcon("ep:edit", Edit);
|
||||
addIcon("ep:set-up", SetUp);
|
||||
addIcon("ep:guide", Guide);
|
||||
addIcon("ep:monitor", Monitor);
|
||||
addIcon("ep:lollipop", Lollipop);
|
||||
addIcon("ep:histogram", Histogram);
|
||||
addIcon("ep:home-filled", HomeFilled);
|
||||
// @iconify-icons/ri
|
||||
import Tag from "@iconify-icons/ri/bookmark-2-line";
|
||||
import Ppt from "@iconify-icons/ri/file-ppt-2-line";
|
||||
import Card from "@iconify-icons/ri/bank-card-line";
|
||||
import Role from "@iconify-icons/ri/admin-fill";
|
||||
import Info from "@iconify-icons/ri/file-info-line";
|
||||
import Dept from "@iconify-icons/ri/git-branch-line";
|
||||
import Table from "@iconify-icons/ri/table-line";
|
||||
import Links from "@iconify-icons/ri/links-fill";
|
||||
import Search from "@iconify-icons/ri/search-line";
|
||||
import FlUser from "@iconify-icons/ri/admin-line";
|
||||
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||
import MindMap from "@iconify-icons/ri/mind-map";
|
||||
import BarChart from "@iconify-icons/ri/bar-chart-horizontal-line";
|
||||
import LoginLog from "@iconify-icons/ri/window-line";
|
||||
import Artboard from "@iconify-icons/ri/artboard-line";
|
||||
import SystemLog from "@iconify-icons/ri/file-search-line";
|
||||
import ListCheck from "@iconify-icons/ri/list-check";
|
||||
import UbuntuFill from "@iconify-icons/ri/ubuntu-fill";
|
||||
import OnlineUser from "@iconify-icons/ri/user-voice-line";
|
||||
import EditBoxLine from "@iconify-icons/ri/edit-box-line";
|
||||
import OperationLog from "@iconify-icons/ri/history-fill";
|
||||
import InformationLine from "@iconify-icons/ri/information-line";
|
||||
import TerminalWindowLine from "@iconify-icons/ri/terminal-window-line";
|
||||
import CheckboxCircleLine from "@iconify-icons/ri/checkbox-circle-line";
|
||||
addIcon("ri:bookmark-2-line", Tag);
|
||||
addIcon("ri:file-ppt-2-line", Ppt);
|
||||
addIcon("ri:bank-card-line", Card);
|
||||
addIcon("ri:admin-fill", Role);
|
||||
addIcon("ri:file-info-line", Info);
|
||||
addIcon("ri:git-branch-line", Dept);
|
||||
addIcon("ri:links-fill", Links);
|
||||
addIcon("ri:table-line", Table);
|
||||
addIcon("ri:search-line", Search);
|
||||
addIcon("ri:admin-line", FlUser);
|
||||
addIcon("ri:settings-3-line", Setting);
|
||||
addIcon("ri:mind-map", MindMap);
|
||||
addIcon("ri:bar-chart-horizontal-line", BarChart);
|
||||
addIcon("ri:window-line", LoginLog);
|
||||
addIcon("ri:file-search-line", SystemLog);
|
||||
addIcon("ri:artboard-line", Artboard);
|
||||
addIcon("ri:list-check", ListCheck);
|
||||
addIcon("ri:ubuntu-fill", UbuntuFill);
|
||||
addIcon("ri:user-voice-line", OnlineUser);
|
||||
addIcon("ri:edit-box-line", EditBoxLine);
|
||||
addIcon("ri:history-fill", OperationLog);
|
||||
addIcon("ri:information-line", InformationLine);
|
||||
addIcon("ri:terminal-window-line", TerminalWindowLine);
|
||||
addIcon("ri:checkbox-circle-line", CheckboxCircleLine);
|
||||
icons.forEach(([name, icon]) => {
|
||||
addIcon(name as string, getSvgInfo(icon as string));
|
||||
});
|
||||
|
5
src/components/RePerms/index.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import perms from "./src/perms";
|
||||
|
||||
const Perms = perms;
|
||||
|
||||
export { Perms };
|
20
src/components/RePerms/src/perms.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
import { defineComponent, Fragment } from "vue";
|
||||
import { hasPerms } from "@/utils/auth";
|
||||
|
||||
export default defineComponent({
|
||||
name: "Perms",
|
||||
props: {
|
||||
value: {
|
||||
type: undefined,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
setup(props, { slots }) {
|
||||
return () => {
|
||||
if (!slots) return null;
|
||||
return hasPerms(props.value) ? (
|
||||
<Fragment>{slots.default?.()}</Fragment>
|
||||
) : null;
|
||||
};
|
||||
}
|
||||
});
|
@ -18,11 +18,13 @@ import {
|
||||
getKeyList
|
||||
} from "@pureadmin/utils";
|
||||
|
||||
import DragIcon from "./svg/drag.svg?component";
|
||||
import ExpandIcon from "./svg/expand.svg?component";
|
||||
import RefreshIcon from "./svg/refresh.svg?component";
|
||||
import SettingIcon from "./svg/settings.svg?component";
|
||||
import CollapseIcon from "./svg/collapse.svg?component";
|
||||
import Fullscreen from "~icons/ri/fullscreen-fill";
|
||||
import ExitFullscreen from "~icons/ri/fullscreen-exit-fill";
|
||||
import DragIcon from "@/assets/table-bar/drag.svg?component";
|
||||
import ExpandIcon from "@/assets/table-bar/expand.svg?component";
|
||||
import RefreshIcon from "@/assets/table-bar/refresh.svg?component";
|
||||
import SettingIcon from "@/assets/table-bar/settings.svg?component";
|
||||
import CollapseIcon from "@/assets/table-bar/collapse.svg?component";
|
||||
|
||||
const props = {
|
||||
/** 头部最左边的标题 */
|
||||
@ -52,11 +54,12 @@ const props = {
|
||||
export default defineComponent({
|
||||
name: "PureTableBar",
|
||||
props,
|
||||
emits: ["refresh"],
|
||||
emits: ["refresh", "fullscreen"],
|
||||
setup(props, { emit, slots, attrs }) {
|
||||
const size = ref("default");
|
||||
const loading = ref(false);
|
||||
const checkAll = ref(true);
|
||||
const isFullscreen = ref(false);
|
||||
const isIndeterminate = ref(false);
|
||||
const instance = getCurrentInstance()!;
|
||||
const isExpandAll = ref(props.isExpandAll);
|
||||
@ -84,9 +87,9 @@ export default defineComponent({
|
||||
"text-black",
|
||||
"dark:text-white",
|
||||
"duration-100",
|
||||
"hover:!text-primary",
|
||||
"hover:text-primary!",
|
||||
"cursor-pointer",
|
||||
"outline-none"
|
||||
"outline-hidden"
|
||||
];
|
||||
});
|
||||
|
||||
@ -114,6 +117,11 @@ export default defineComponent({
|
||||
toggleRowExpansionAll(props.tableRef.data, isExpandAll.value);
|
||||
}
|
||||
|
||||
function onFullscreen() {
|
||||
isFullscreen.value = !isFullscreen.value;
|
||||
emit("fullscreen", isFullscreen.value);
|
||||
}
|
||||
|
||||
function toggleRowExpansionAll(data, isExpansion) {
|
||||
data.forEach(item => {
|
||||
props.tableRef.toggleRowExpansion(item, isExpansion);
|
||||
@ -244,7 +252,18 @@ export default defineComponent({
|
||||
|
||||
return () => (
|
||||
<>
|
||||
<div {...attrs} class="w-[99/100] mt-2 px-2 pb-2 bg-bg_color">
|
||||
<div
|
||||
{...attrs}
|
||||
class={[
|
||||
"w-full",
|
||||
"px-2",
|
||||
"pb-2",
|
||||
"bg-bg_color",
|
||||
isFullscreen.value
|
||||
? ["h-full!", "z-2002", "fixed", "inset-0"]
|
||||
: "mt-2"
|
||||
]}
|
||||
>
|
||||
<div class="flex justify-between w-full h-[60px] p-4">
|
||||
{slots?.title ? (
|
||||
slots.title()
|
||||
@ -298,7 +317,7 @@ export default defineComponent({
|
||||
>
|
||||
<div class={[topClass.value]}>
|
||||
<el-checkbox
|
||||
class="!-mr-1"
|
||||
class="-mr-1!"
|
||||
label="列展示"
|
||||
v-model={checkAll.value}
|
||||
indeterminate={isIndeterminate.value}
|
||||
@ -328,8 +347,8 @@ export default defineComponent({
|
||||
class={[
|
||||
"drag-btn w-[16px] mr-2",
|
||||
isFixedColumn(item)
|
||||
? "!cursor-no-drop"
|
||||
: "!cursor-grab"
|
||||
? "cursor-no-drop!"
|
||||
: "cursor-grab!"
|
||||
]}
|
||||
onMouseenter={(event: {
|
||||
preventDefault: () => void;
|
||||
@ -358,6 +377,14 @@ export default defineComponent({
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-popover>
|
||||
<el-divider direction="vertical" />
|
||||
|
||||
<iconifyIconOffline
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
|
||||
v-tippy={isFullscreen.value ? "退出全屏" : "全屏"}
|
||||
onClick={() => onFullscreen()}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{slots.default({
|
||||
|
@ -1 +0,0 @@
|
||||
<svg width="32" height="32" fill="currentColor" aria-hidden="true" data-icon="holder" viewBox="64 64 896 896"><path d="M300 276.5a56 56 0 1 0 56-97 56 56 0 0 0-56 97m0 284a56 56 0 1 0 56-97 56 56 0 0 0-56 97M640 228a56 56 0 1 0 112 0 56 56 0 0 0-112 0m0 284a56 56 0 1 0 112 0 56 56 0 0 0-112 0M300 844.5a56 56 0 1 0 56-97 56 56 0 0 0-56 97M640 796a56 56 0 1 0 112 0 56 56 0 0 0-112 0"/></svg>
|
Before Width: | Height: | Size: 392 B |
@ -11,7 +11,7 @@ import "./index.scss";
|
||||
import propTypes from "@/utils/propTypes";
|
||||
import { isString, cloneDeep } from "@pureadmin/utils";
|
||||
import QRCode, { type QRCodeRenderersOptions } from "qrcode";
|
||||
import RefreshRight from "@iconify-icons/ep/refresh-right";
|
||||
import RefreshRight from "~icons/ep/refresh-right";
|
||||
|
||||
interface QrcodeLogo {
|
||||
src?: string;
|
||||
|
@ -502,7 +502,7 @@ defineExpose({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div :ref="'wrap' + props.classOption['key']">
|
||||
<div :ref="'wrap' + classOption['key']">
|
||||
<div
|
||||
v-if="navigation"
|
||||
:style="leftSwitch"
|
||||
@ -520,7 +520,7 @@ defineExpose({
|
||||
<slot name="right-switch" />
|
||||
</div>
|
||||
<div
|
||||
:ref="'realBox' + props.classOption['key']"
|
||||
:ref="'realBox' + classOption['key']"
|
||||
:style="pos"
|
||||
@mouseenter="enter"
|
||||
@mouseleave="leave"
|
||||
@ -529,7 +529,7 @@ defineExpose({
|
||||
@touchend="touchEnd"
|
||||
@mousewheel.passive="wheel"
|
||||
>
|
||||
<div :ref="'slotList' + props.classOption['key']" :style="float">
|
||||
<div :ref="'slotList' + classOption['key']" :style="float">
|
||||
<slot />
|
||||
</div>
|
||||
<div :style="float" v-html="copyHtml" />
|
||||
|
@ -60,12 +60,15 @@ export function copyObj() {
|
||||
copyIsArray,
|
||||
clone,
|
||||
i = 1,
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
target = arguments[0] || {}, // 使用||运算符,排除隐式强制类型转换为false的数据类型
|
||||
deep = false,
|
||||
// eslint-disable-next-line prefer-const
|
||||
len = arguments.length;
|
||||
if (typeof target === "boolean") {
|
||||
deep = target;
|
||||
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
target = arguments[1] || {};
|
||||
i++;
|
||||
}
|
||||
@ -79,6 +82,7 @@ export function copyObj() {
|
||||
for (; i < len; i++) {
|
||||
//所以如果源对象中数据类型为Undefined或Null那么就会跳过本次循环,接着循环下一个源对象
|
||||
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
if ((options = arguments[i]) != null) {
|
||||
// 如果遇到源对象的数据类型为Boolean, Number for in循环会被跳过,不执行for in循环// src用于判断target对象是否存在name属性
|
||||
for (name in options) {
|
||||
|
@ -98,7 +98,6 @@
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
transition: 0.1s;
|
||||
}
|
||||
|
||||
.pure-segmented-group {
|
||||
|
@ -127,7 +127,9 @@ export default defineComponent({
|
||||
}
|
||||
);
|
||||
|
||||
watch(() => props.size, handleResizeInit);
|
||||
watch(() => props.size, handleResizeInit, {
|
||||
immediate: true
|
||||
});
|
||||
|
||||
const rendLabel = () => {
|
||||
return props.options.map((option, index) => {
|
||||
|
@ -6,7 +6,7 @@ export interface OptionsType {
|
||||
label?: string | (() => VNode | Component);
|
||||
/**
|
||||
* @description 图标,采用平台内置的 `useRenderIcon` 函数渲染
|
||||
* @see {@link 用法参考 https://yiming_chang.gitee.io/pure-admin-doc/pages/icon/#%E9%80%9A%E7%94%A8%E5%9B%BE%E6%A0%87-userendericon-hooks }
|
||||
* @see {@link 用法参考 https://pure-admin.cn/pages/icon/#%E9%80%9A%E7%94%A8%E5%9B%BE%E6%A0%87-userendericon-hooks }
|
||||
*/
|
||||
icon?: string | Component;
|
||||
/** 图标属性、样式配置 */
|
||||
|
@ -39,8 +39,7 @@
|
||||
(t.innerHTML = i),
|
||||
(i = null),
|
||||
(t = t.getElementsByTagName("svg")[0]) &&
|
||||
(t.setAttribute("aria-hidden", "true"),
|
||||
(t.style.position = "absolute"),
|
||||
((t.style.position = "absolute"),
|
||||
(t.style.width = 0),
|
||||
(t.style.height = 0),
|
||||
(t.style.overflow = "hidden"),
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { h, onMounted, ref, useSlots } from "vue";
|
||||
import { type TippyOptions, useTippy } from "vue-tippy";
|
||||
<script setup lang="ts">
|
||||
import { h, onMounted, ref } from "vue";
|
||||
import { type TippyOptions, type TippyContent, useTippy } from "vue-tippy";
|
||||
|
||||
defineOptions({
|
||||
name: "ReText"
|
||||
@ -17,7 +17,10 @@ const props = defineProps({
|
||||
}
|
||||
});
|
||||
|
||||
const $slots = useSlots();
|
||||
const slots = defineSlots<{
|
||||
content: () => TippyContent;
|
||||
default: () => any;
|
||||
}>();
|
||||
|
||||
const textRef = ref();
|
||||
const tippyFunc = ref();
|
||||
@ -33,7 +36,7 @@ const isTextEllipsis = (el: HTMLElement) => {
|
||||
};
|
||||
|
||||
const getTippyProps = () => ({
|
||||
content: h($slots.content || $slots.default),
|
||||
content: h(slots.content || slots.default),
|
||||
...props.tippyProps
|
||||
});
|
||||
|
||||
|
@ -90,9 +90,9 @@ export default defineComponent({
|
||||
];
|
||||
// 取得每一层的当前节点是不是在当前层级列表的最后一个
|
||||
const lastnodeArr = [];
|
||||
let currentNode = this.node;
|
||||
let currentNode: any = this.node;
|
||||
while (currentNode) {
|
||||
let parentNode = currentNode.parent;
|
||||
let parentNode: any = currentNode.parent;
|
||||
// 兼容element-plus的 el-tree-v2 (Virtualized Tree 虚拟树)
|
||||
if (currentNode.level === 1 && !currentNode.parent) {
|
||||
// el-tree-v2的第一层node是没有parent的,必需 treeData 创建一个parent
|
||||
|
5
src/components/ReVxeTableBar/index.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import vxeTableBar from "./src/bar";
|
||||
import { withInstall } from "@pureadmin/utils";
|
||||
|
||||
/** 配合 `vxe-table` 实现快速便捷的表格操作 */
|
||||
export const VxeTableBar = withInstall(vxeTableBar);
|
389
src/components/ReVxeTableBar/src/bar.tsx
Normal file
@ -0,0 +1,389 @@
|
||||
import Sortable from "sortablejs";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||
import { delay, cloneDeep, getKeyList } from "@pureadmin/utils";
|
||||
import {
|
||||
type PropType,
|
||||
ref,
|
||||
unref,
|
||||
computed,
|
||||
nextTick,
|
||||
defineComponent,
|
||||
getCurrentInstance
|
||||
} from "vue";
|
||||
|
||||
import Fullscreen from "~icons/ri/fullscreen-fill";
|
||||
import ExitFullscreen from "~icons/ri/fullscreen-exit-fill";
|
||||
import DragIcon from "@/assets/table-bar/drag.svg?component";
|
||||
import ExpandIcon from "@/assets/table-bar/expand.svg?component";
|
||||
import RefreshIcon from "@/assets/table-bar/refresh.svg?component";
|
||||
import SettingIcon from "@/assets/table-bar/settings.svg?component";
|
||||
import CollapseIcon from "@/assets/table-bar/collapse.svg?component";
|
||||
|
||||
const props = {
|
||||
/** 头部最左边的标题 */
|
||||
title: {
|
||||
type: String,
|
||||
default: "列表"
|
||||
},
|
||||
vxeTableRef: {
|
||||
type: Object as PropType<any>
|
||||
},
|
||||
/** 需要展示的列 */
|
||||
columns: {
|
||||
type: Array as PropType<any>,
|
||||
default: () => []
|
||||
},
|
||||
/** 是否为树列表 */
|
||||
tree: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isExpandAll: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
tableKey: {
|
||||
type: [String, Number] as PropType<string | number>,
|
||||
default: "0"
|
||||
}
|
||||
};
|
||||
|
||||
export default defineComponent({
|
||||
name: "VxeTableBar",
|
||||
props,
|
||||
emits: ["refresh", "fullscreen"],
|
||||
setup(props, { emit, slots, attrs }) {
|
||||
const size = ref("small");
|
||||
const loading = ref(false);
|
||||
const checkAll = ref(true);
|
||||
const isFullscreen = ref(false);
|
||||
const isIndeterminate = ref(false);
|
||||
const instance = getCurrentInstance()!;
|
||||
const isExpandAll = ref(props.isExpandAll);
|
||||
let checkColumnList = getKeyList(cloneDeep(props?.columns), "title");
|
||||
const checkedColumns = ref(getKeyList(cloneDeep(props?.columns), "title"));
|
||||
const dynamicColumns = ref(cloneDeep(props?.columns));
|
||||
|
||||
const getDropdownItemStyle = computed(() => {
|
||||
return s => {
|
||||
return {
|
||||
background:
|
||||
s === size.value ? useEpThemeStoreHook().epThemeColor : "",
|
||||
color: s === size.value ? "#fff" : "var(--el-text-color-primary)"
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
const iconClass = computed(() => {
|
||||
return [
|
||||
"text-black",
|
||||
"dark:text-white",
|
||||
"duration-100",
|
||||
"hover:text-primary!",
|
||||
"cursor-pointer",
|
||||
"outline-hidden"
|
||||
];
|
||||
});
|
||||
|
||||
const topClass = computed(() => {
|
||||
return [
|
||||
"flex",
|
||||
"justify-between",
|
||||
"pt-[3px]",
|
||||
"px-[11px]",
|
||||
"border-b-[1px]",
|
||||
"border-solid",
|
||||
"border-[#dcdfe6]",
|
||||
"dark:border-[#303030]"
|
||||
];
|
||||
});
|
||||
|
||||
function onReFresh() {
|
||||
loading.value = true;
|
||||
emit("refresh");
|
||||
delay(500).then(() => (loading.value = false));
|
||||
}
|
||||
|
||||
function onExpand() {
|
||||
isExpandAll.value = !isExpandAll.value;
|
||||
isExpandAll.value
|
||||
? props.vxeTableRef.setAllTreeExpand(true)
|
||||
: props.vxeTableRef.clearTreeExpand();
|
||||
props.vxeTableRef.refreshColumn();
|
||||
}
|
||||
|
||||
function onFullscreen() {
|
||||
isFullscreen.value = !isFullscreen.value;
|
||||
emit("fullscreen", isFullscreen.value);
|
||||
}
|
||||
|
||||
function reloadColumn() {
|
||||
const curCheckedColumns = cloneDeep(dynamicColumns.value).filter(item =>
|
||||
checkedColumns.value.includes(item.title)
|
||||
);
|
||||
props.vxeTableRef.reloadColumn(curCheckedColumns);
|
||||
}
|
||||
|
||||
function handleCheckAllChange(val: boolean) {
|
||||
checkedColumns.value = val ? checkColumnList : [];
|
||||
isIndeterminate.value = false;
|
||||
reloadColumn();
|
||||
}
|
||||
|
||||
function handleCheckedColumnsChange(value: string[]) {
|
||||
checkedColumns.value = value;
|
||||
const checkedCount = value.length;
|
||||
checkAll.value = checkedCount === checkColumnList.length;
|
||||
isIndeterminate.value =
|
||||
checkedCount > 0 && checkedCount < checkColumnList.length;
|
||||
}
|
||||
|
||||
async function onReset() {
|
||||
checkAll.value = true;
|
||||
isIndeterminate.value = false;
|
||||
dynamicColumns.value = cloneDeep(props?.columns);
|
||||
checkColumnList = [];
|
||||
checkColumnList = await getKeyList(cloneDeep(props?.columns), "title");
|
||||
checkedColumns.value = getKeyList(cloneDeep(props?.columns), "title");
|
||||
props.vxeTableRef.refreshColumn();
|
||||
}
|
||||
|
||||
function changeSize(curSize: string) {
|
||||
size.value = curSize;
|
||||
props.vxeTableRef.refreshColumn();
|
||||
}
|
||||
|
||||
const dropdown = {
|
||||
dropdown: () => (
|
||||
<el-dropdown-menu class="translation">
|
||||
<el-dropdown-item
|
||||
style={getDropdownItemStyle.value("medium")}
|
||||
onClick={() => changeSize("medium")}
|
||||
>
|
||||
宽松
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
style={getDropdownItemStyle.value("small")}
|
||||
onClick={() => changeSize("small")}
|
||||
>
|
||||
默认
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
style={getDropdownItemStyle.value("mini")}
|
||||
onClick={() => changeSize("mini")}
|
||||
>
|
||||
紧凑
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
)
|
||||
};
|
||||
|
||||
/** 列展示拖拽排序 */
|
||||
const rowDrop = (event: { preventDefault: () => void }) => {
|
||||
event.preventDefault();
|
||||
nextTick(() => {
|
||||
const wrapper: HTMLElement = (
|
||||
instance?.proxy?.$refs[`VxeGroupRef${unref(props.tableKey)}`] as any
|
||||
).$el.firstElementChild;
|
||||
Sortable.create(wrapper, {
|
||||
animation: 300,
|
||||
handle: ".drag-btn",
|
||||
onEnd: ({ newIndex, oldIndex, item }) => {
|
||||
const targetThElem = item;
|
||||
const wrapperElem = targetThElem.parentNode as HTMLElement;
|
||||
const oldColumn = dynamicColumns.value[oldIndex];
|
||||
const newColumn = dynamicColumns.value[newIndex];
|
||||
if (oldColumn?.fixed || newColumn?.fixed) {
|
||||
// 当前列存在fixed属性 则不可拖拽
|
||||
const oldThElem = wrapperElem.children[oldIndex] as HTMLElement;
|
||||
if (newIndex > oldIndex) {
|
||||
wrapperElem.insertBefore(targetThElem, oldThElem);
|
||||
} else {
|
||||
wrapperElem.insertBefore(
|
||||
targetThElem,
|
||||
oldThElem ? oldThElem.nextElementSibling : oldThElem
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
const currentRow = dynamicColumns.value.splice(oldIndex, 1)[0];
|
||||
dynamicColumns.value.splice(newIndex, 0, currentRow);
|
||||
reloadColumn();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const isFixedColumn = (title: string) => {
|
||||
return dynamicColumns.value.filter(
|
||||
item => transformI18n(item.title) === transformI18n(title)
|
||||
)[0].fixed
|
||||
? true
|
||||
: false;
|
||||
};
|
||||
|
||||
const rendTippyProps = (content: string) => {
|
||||
// https://vue-tippy.netlify.app/props
|
||||
return {
|
||||
content,
|
||||
offset: [0, 18],
|
||||
duration: [300, 0],
|
||||
followCursor: true,
|
||||
hideOnClick: "toggle"
|
||||
};
|
||||
};
|
||||
|
||||
const reference = {
|
||||
reference: () => (
|
||||
<SettingIcon
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
v-tippy={rendTippyProps("列设置")}
|
||||
/>
|
||||
)
|
||||
};
|
||||
|
||||
return () => (
|
||||
<>
|
||||
<div
|
||||
{...attrs}
|
||||
class={[
|
||||
"w-full",
|
||||
"px-2",
|
||||
"pb-2",
|
||||
"bg-bg_color",
|
||||
isFullscreen.value
|
||||
? ["h-full!", "z-2002", "fixed", "inset-0"]
|
||||
: "mt-2"
|
||||
]}
|
||||
>
|
||||
<div class="flex justify-between w-full h-[60px] p-4">
|
||||
{slots?.title ? (
|
||||
slots.title()
|
||||
) : (
|
||||
<p class="font-bold truncate">{props.title}</p>
|
||||
)}
|
||||
<div class="flex items-center justify-around">
|
||||
{slots?.buttons ? (
|
||||
<div class="flex mr-4">{slots.buttons()}</div>
|
||||
) : null}
|
||||
{props.tree ? (
|
||||
<>
|
||||
<ExpandIcon
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
style={{
|
||||
transform: isExpandAll.value ? "none" : "rotate(-90deg)"
|
||||
}}
|
||||
v-tippy={rendTippyProps(
|
||||
isExpandAll.value ? "折叠" : "展开"
|
||||
)}
|
||||
onClick={() => onExpand()}
|
||||
/>
|
||||
<el-divider direction="vertical" />
|
||||
</>
|
||||
) : null}
|
||||
<RefreshIcon
|
||||
class={[
|
||||
"w-[16px]",
|
||||
iconClass.value,
|
||||
loading.value ? "animate-spin" : ""
|
||||
]}
|
||||
v-tippy={rendTippyProps("刷新")}
|
||||
onClick={() => onReFresh()}
|
||||
/>
|
||||
<el-divider direction="vertical" />
|
||||
<el-dropdown
|
||||
v-slots={dropdown}
|
||||
trigger="click"
|
||||
v-tippy={rendTippyProps("密度")}
|
||||
>
|
||||
<CollapseIcon class={["w-[16px]", iconClass.value]} />
|
||||
</el-dropdown>
|
||||
<el-divider direction="vertical" />
|
||||
|
||||
<el-popover
|
||||
v-slots={reference}
|
||||
placement="bottom-start"
|
||||
popper-style={{ padding: 0 }}
|
||||
width="200"
|
||||
trigger="click"
|
||||
>
|
||||
<div class={[topClass.value]}>
|
||||
<el-checkbox
|
||||
class="-mr-1!"
|
||||
label="列展示"
|
||||
v-model={checkAll.value}
|
||||
indeterminate={isIndeterminate.value}
|
||||
onChange={value => handleCheckAllChange(value)}
|
||||
/>
|
||||
<el-button type="primary" link onClick={() => onReset()}>
|
||||
重置
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div class="pt-[6px] pl-[11px]">
|
||||
<el-scrollbar max-height="36vh">
|
||||
<el-checkbox-group
|
||||
ref={`VxeGroupRef${unref(props.tableKey)}`}
|
||||
modelValue={checkedColumns.value}
|
||||
onChange={value => handleCheckedColumnsChange(value)}
|
||||
>
|
||||
<el-space
|
||||
direction="vertical"
|
||||
alignment="flex-start"
|
||||
size={0}
|
||||
>
|
||||
{checkColumnList.map((item, index) => {
|
||||
return (
|
||||
<div class="flex items-center">
|
||||
<DragIcon
|
||||
class={[
|
||||
"drag-btn w-[16px] mr-2",
|
||||
isFixedColumn(item)
|
||||
? "cursor-no-drop!"
|
||||
: "cursor-grab!"
|
||||
]}
|
||||
onMouseenter={(event: {
|
||||
preventDefault: () => void;
|
||||
}) => rowDrop(event)}
|
||||
/>
|
||||
<el-checkbox
|
||||
key={index}
|
||||
label={item}
|
||||
value={item}
|
||||
onChange={reloadColumn}
|
||||
>
|
||||
<span
|
||||
title={transformI18n(item)}
|
||||
class="inline-block w-[120px] truncate hover:text-text_color_primary"
|
||||
>
|
||||
{transformI18n(item)}
|
||||
</span>
|
||||
</el-checkbox>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</el-space>
|
||||
</el-checkbox-group>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-popover>
|
||||
<el-divider direction="vertical" />
|
||||
|
||||
<iconifyIconOffline
|
||||
class={["w-[16px]", iconClass.value]}
|
||||
icon={isFullscreen.value ? ExitFullscreen : Fullscreen}
|
||||
v-tippy={isFullscreen.value ? "退出全屏" : "全屏"}
|
||||
onClick={() => onFullscreen()}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{slots.default({
|
||||
size: size.value,
|
||||
dynamicColumns: dynamicColumns.value
|
||||
})}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
});
|
@ -2,7 +2,7 @@ import { hasAuth } from "@/router/utils";
|
||||
import type { Directive, DirectiveBinding } from "vue";
|
||||
|
||||
export const auth: Directive = {
|
||||
mounted(el: HTMLElement, binding: DirectiveBinding) {
|
||||
mounted(el: HTMLElement, binding: DirectiveBinding<string | Array<string>>) {
|
||||
const { value } = binding;
|
||||
if (value) {
|
||||
!hasAuth(value) && el.parentNode?.removeChild(el);
|
||||
|
@ -3,13 +3,13 @@ import { useEventListener } from "@vueuse/core";
|
||||
import { copyTextToClipboard } from "@pureadmin/utils";
|
||||
import type { Directive, DirectiveBinding } from "vue";
|
||||
|
||||
interface CopyEl extends HTMLElement {
|
||||
export interface CopyEl extends HTMLElement {
|
||||
copyValue: string;
|
||||
}
|
||||
|
||||
/** 文本复制指令(默认双击复制) */
|
||||
export const copy: Directive = {
|
||||
mounted(el: CopyEl, binding: DirectiveBinding) {
|
||||
mounted(el: CopyEl, binding: DirectiveBinding<string>) {
|
||||
const { value } = binding;
|
||||
if (value) {
|
||||
el.copyValue = value;
|
||||
|
@ -2,4 +2,5 @@ export * from "./auth";
|
||||
export * from "./copy";
|
||||
export * from "./longpress";
|
||||
export * from "./optimize";
|
||||
export * from "./perms";
|
||||
export * from "./ripple";
|
||||
|
@ -3,7 +3,7 @@ import type { Directive, DirectiveBinding } from "vue";
|
||||
import { subBefore, subAfter, isFunction } from "@pureadmin/utils";
|
||||
|
||||
export const longpress: Directive = {
|
||||
mounted(el: HTMLElement, binding: DirectiveBinding) {
|
||||
mounted(el: HTMLElement, binding: DirectiveBinding<Function>) {
|
||||
const cb = binding.value;
|
||||
if (cb && isFunction(cb)) {
|
||||
let timer = null;
|
||||
|
@ -8,9 +8,22 @@ import {
|
||||
import { useEventListener } from "@vueuse/core";
|
||||
import type { Directive, DirectiveBinding } from "vue";
|
||||
|
||||
export interface OptimizeOptions {
|
||||
/** 事件名 */
|
||||
event: string;
|
||||
/** 事件触发的方法 */
|
||||
fn: (...params: any) => any;
|
||||
/** 是否立即执行 */
|
||||
immediate?: boolean;
|
||||
/** 防抖或节流的延迟时间(防抖默认:`200`毫秒、节流默认:`1000`毫秒) */
|
||||
timeout?: number;
|
||||
/** 传递的参数 */
|
||||
params?: any;
|
||||
}
|
||||
|
||||
/** 防抖(v-optimize或v-optimize:debounce)、节流(v-optimize:throttle)指令 */
|
||||
export const optimize: Directive = {
|
||||
mounted(el: HTMLElement, binding: DirectiveBinding) {
|
||||
mounted(el: HTMLElement, binding: DirectiveBinding<OptimizeOptions>) {
|
||||
const { value } = binding;
|
||||
const optimizeType = binding.arg ?? "debounce";
|
||||
const type = ["debounce", "throttle"].find(t => t === optimizeType);
|
||||
|
15
src/directives/perms/index.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { hasPerms } from "@/utils/auth";
|
||||
import type { Directive, DirectiveBinding } from "vue";
|
||||
|
||||
export const perms: Directive = {
|
||||
mounted(el: HTMLElement, binding: DirectiveBinding<string | Array<string>>) {
|
||||
const { value } = binding;
|
||||
if (value) {
|
||||
!hasPerms(value) && el.parentNode?.removeChild(el);
|
||||
} else {
|
||||
throw new Error(
|
||||
"[Directive: perms]: need perms! Like v-perms=\"['btn.add','btn.edit']\""
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
@ -2,8 +2,10 @@ import "./index.scss";
|
||||
import { isObject } from "@pureadmin/utils";
|
||||
import type { Directive, DirectiveBinding } from "vue";
|
||||
|
||||
interface RippleOptions {
|
||||
export interface RippleOptions {
|
||||
/** 自定义`ripple`颜色,支持`tailwindcss` */
|
||||
class?: string;
|
||||
/** 是否从中心扩散 */
|
||||
center?: boolean;
|
||||
circle?: boolean;
|
||||
}
|
||||
@ -30,8 +32,8 @@ const calculate = (
|
||||
const offset = el.getBoundingClientRect();
|
||||
|
||||
// 获取点击位置距离 el 的垂直和水平距离
|
||||
let localX = e.clientX - offset.left;
|
||||
let localY = e.clientY - offset.top;
|
||||
const localX = e.clientX - offset.left;
|
||||
const localY = e.clientY - offset.top;
|
||||
|
||||
let radius = 0;
|
||||
let scale = 0.3;
|
||||
@ -220,13 +222,6 @@ function updated(el: HTMLElement, binding: RippleDirectiveBinding) {
|
||||
updateRipple(el, binding, wasEnabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 指令 v-ripple
|
||||
* @use 用法如下
|
||||
* 1. v-ripple 代表启用基本的 ripple 功能
|
||||
* 2. v-ripple="{ class: 'text-red' }" 代表自定义 ripple 颜色,支持 tailwindcss,生效样式是 color
|
||||
* 3. v-ripple.center 代表从中心扩散
|
||||
*/
|
||||
export const Ripple: Directive = {
|
||||
mounted,
|
||||
unmounted,
|
||||
|
@ -1,9 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from "vue-i18n";
|
||||
import Footer from "./footer/index.vue";
|
||||
import LayFrame from "../lay-frame/index.vue";
|
||||
import LayFooter from "../lay-footer/index.vue";
|
||||
import { useTags } from "@/layout/hooks/useTag";
|
||||
import { useGlobal, isNumber } from "@pureadmin/utils";
|
||||
import KeepAliveFrame from "./keepAliveFrame/index.vue";
|
||||
import backTop from "@/assets/svg/back_top.svg?component";
|
||||
import BackTopIcon from "@/assets/svg/back_top.svg?component";
|
||||
import { h, computed, Transition, defineComponent } from "vue";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
|
||||
@ -12,6 +13,7 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
const { showModel } = useTags();
|
||||
const { $storage, $config } = useGlobal<GlobalPropertiesApi>();
|
||||
|
||||
const isKeepAlive = computed(() => {
|
||||
@ -51,9 +53,17 @@ const getMainWidth = computed(() => {
|
||||
const getSectionStyle = computed(() => {
|
||||
return [
|
||||
hideTabs.value && layout ? "padding-top: 48px;" : "",
|
||||
!hideTabs.value && layout ? "padding-top: 81px;" : "",
|
||||
!hideTabs.value && layout
|
||||
? showModel.value == "chrome"
|
||||
? "padding-top: 85px;"
|
||||
: "padding-top: 81px;"
|
||||
: "",
|
||||
hideTabs.value && !layout.value ? "padding-top: 48px;" : "",
|
||||
!hideTabs.value && !layout.value ? "padding-top: 81px;" : "",
|
||||
!hideTabs.value && !layout.value
|
||||
? showModel.value == "chrome"
|
||||
? "padding-top: 85px;"
|
||||
: "padding-top: 81px;"
|
||||
: "",
|
||||
props.fixedHeader
|
||||
? ""
|
||||
: `padding-top: 0;${
|
||||
@ -99,15 +109,15 @@ const transitionMain = defineComponent({
|
||||
|
||||
<template>
|
||||
<section
|
||||
:class="[props.fixedHeader ? 'app-main' : 'app-main-nofixed-header']"
|
||||
:class="[fixedHeader ? 'app-main' : 'app-main-nofixed-header']"
|
||||
:style="getSectionStyle"
|
||||
>
|
||||
<router-view>
|
||||
<template #default="{ Component, route }">
|
||||
<KeepAliveFrame :currComp="Component" :currRoute="route">
|
||||
<LayFrame :currComp="Component" :currRoute="route">
|
||||
<template #default="{ Comp, fullPath, frameInfo }">
|
||||
<el-scrollbar
|
||||
v-if="props.fixedHeader"
|
||||
v-if="fixedHeader"
|
||||
:wrap-style="{
|
||||
display: 'flex',
|
||||
'flex-wrap': 'wrap',
|
||||
@ -126,7 +136,7 @@ const transitionMain = defineComponent({
|
||||
:title="t('buttons.pureBackTop')"
|
||||
target=".app-main .el-scrollbar__wrap"
|
||||
>
|
||||
<backTop />
|
||||
<BackTopIcon />
|
||||
</el-backtop>
|
||||
<div class="grow">
|
||||
<transitionMain :route="route">
|
||||
@ -150,7 +160,7 @@ const transitionMain = defineComponent({
|
||||
/>
|
||||
</transitionMain>
|
||||
</div>
|
||||
<Footer v-if="!hideFooter" />
|
||||
<LayFooter v-if="!hideFooter" />
|
||||
</el-scrollbar>
|
||||
<div v-else class="grow">
|
||||
<transitionMain :route="route">
|
||||
@ -175,12 +185,12 @@ const transitionMain = defineComponent({
|
||||
</transitionMain>
|
||||
</div>
|
||||
</template>
|
||||
</KeepAliveFrame>
|
||||
</LayFrame>
|
||||
</template>
|
||||
</router-view>
|
||||
|
||||
<!-- 页脚 -->
|
||||
<Footer v-if="!hideFooter && !props.fixedHeader" />
|
||||
<LayFooter v-if="!hideFooter && !fixedHeader" />
|
||||
</section>
|
||||
</template>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { getConfig } from "@/config";
|
||||
|
||||
const TITLE = getConfig("Title");
|
||||
@ -10,7 +10,7 @@ const TITLE = getConfig("Title");
|
||||
>
|
||||
Copyright © 2020-present
|
||||
<a
|
||||
class="hover:text-primary"
|
||||
class="hover:text-primary!"
|
||||
href="https://github.com/pure-admin"
|
||||
target="_blank"
|
||||
>
|
@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { getConfig } from "@/config";
|
||||
import { useMultiFrame } from "@/layout/hooks/useMultiFrame";
|
||||
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
|
||||
import { type Component, shallowRef, watch, computed } from "vue";
|
||||
import { type RouteRecordRaw, RouteLocationNormalizedLoaded } from "vue-router";
|
||||
import { useMultiFrame } from "@/layout/components/keepAliveFrame/useMultiFrame";
|
||||
|
||||
const props = defineProps<{
|
||||
currRoute: RouteLocationNormalizedLoaded;
|
||||
@ -20,7 +20,7 @@ const keep = computed(() => {
|
||||
!!props.currRoute.meta?.frameSrc
|
||||
);
|
||||
});
|
||||
// 避免重新渲染 frameView
|
||||
// 避免重新渲染 LayFrame
|
||||
const normalComp = computed(() => !keep.value && props.currComp);
|
||||
|
||||
watch(useMultiTagsStoreHook().multiTags, (tags: any) => {
|
||||
@ -65,7 +65,7 @@ watch(
|
||||
</script>
|
||||
<template>
|
||||
<template v-for="[fullPath, Comp] in compList" :key="fullPath">
|
||||
<div v-show="fullPath === props.currRoute.fullPath" class="w-full h-full">
|
||||
<div v-show="fullPath === currRoute.fullPath" class="w-full h-full">
|
||||
<slot
|
||||
:fullPath="fullPath"
|
||||
:Comp="Comp"
|
||||
@ -74,6 +74,6 @@ watch(
|
||||
</div>
|
||||
</template>
|
||||
<div v-show="!keep" class="w-full h-full">
|
||||
<slot :Comp="normalComp" :fullPath="props.currRoute.fullPath" frameInfo />
|
||||
<slot :Comp="normalComp" :fullPath="currRoute.fullPath" frameInfo />
|
||||
</div>
|
||||
</template>
|
@ -1,17 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
import Search from "./search/index.vue";
|
||||
import Notice from "./notice/index.vue";
|
||||
import mixNav from "./sidebar/mixNav.vue";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import FullScreen from "./sidebar/fullScreen.vue";
|
||||
import Breadcrumb from "./sidebar/breadCrumb.vue";
|
||||
import topCollapse from "./sidebar/topCollapse.vue";
|
||||
import { useTranslationLang } from "../hooks/useTranslationLang";
|
||||
import globalization from "@/assets/svg/globalization.svg?component";
|
||||
import AccountSettingsIcon from "@iconify-icons/ri/user-settings-line";
|
||||
import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line";
|
||||
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||
import Check from "@iconify-icons/ep/check";
|
||||
import LaySearch from "../lay-search/index.vue";
|
||||
import LayNotice from "../lay-notice/index.vue";
|
||||
import LayNavMix from "../lay-sidebar/NavMix.vue";
|
||||
import { useTranslationLang } from "@/layout/hooks/useTranslationLang";
|
||||
import LaySidebarFullScreen from "../lay-sidebar/components/SidebarFullScreen.vue";
|
||||
import LaySidebarBreadCrumb from "../lay-sidebar/components/SidebarBreadCrumb.vue";
|
||||
import LaySidebarTopCollapse from "../lay-sidebar/components/SidebarTopCollapse.vue";
|
||||
|
||||
import GlobalizationIcon from "@/assets/svg/globalization.svg?component";
|
||||
import AccountSettingsIcon from "~icons/ri/user-settings-line";
|
||||
import LogoutCircleRLine from "~icons/ri/logout-circle-r-line";
|
||||
import Setting from "~icons/ri/settings-3-line";
|
||||
import Check from "~icons/ep/check";
|
||||
|
||||
const {
|
||||
layout,
|
||||
@ -32,34 +33,34 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="navbar bg-[#fff] shadow-sm shadow-[rgba(0,21,41,0.08)]">
|
||||
<topCollapse
|
||||
<div class="navbar bg-[#fff] shadow-xs shadow-[rgba(0,21,41,0.08)]">
|
||||
<LaySidebarTopCollapse
|
||||
v-if="device === 'mobile'"
|
||||
class="hamburger-container"
|
||||
:is-active="pureApp.sidebar.opened"
|
||||
@toggleClick="toggleSideBar"
|
||||
/>
|
||||
|
||||
<Breadcrumb
|
||||
<LaySidebarBreadCrumb
|
||||
v-if="layout !== 'mix' && device !== 'mobile'"
|
||||
class="breadcrumb-container"
|
||||
/>
|
||||
|
||||
<mixNav v-if="layout === 'mix'" />
|
||||
<LayNavMix v-if="layout === 'mix'" />
|
||||
|
||||
<div v-if="layout === 'vertical'" class="vertical-header-right">
|
||||
<!-- 菜单搜索 -->
|
||||
<Search id="header-search" />
|
||||
<LaySearch id="header-search" />
|
||||
<!-- 国际化 -->
|
||||
<el-dropdown id="header-translation" trigger="click">
|
||||
<globalization
|
||||
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-none"
|
||||
<GlobalizationIcon
|
||||
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||
/>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu class="translation">
|
||||
<el-dropdown-item
|
||||
:style="getDropdownItemStyle(locale, 'zh')"
|
||||
:class="['dark:!text-white', getDropdownItemClass(locale, 'zh')]"
|
||||
:class="['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
|
||||
@click="translationCh"
|
||||
>
|
||||
<IconifyIconOffline
|
||||
@ -71,7 +72,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:style="getDropdownItemStyle(locale, 'en')"
|
||||
:class="['dark:!text-white', getDropdownItemClass(locale, 'en')]"
|
||||
:class="['dark:text-white!', getDropdownItemClass(locale, 'en')]"
|
||||
@click="translationEn"
|
||||
>
|
||||
<span v-show="locale === 'en'" class="check-en">
|
||||
@ -83,9 +84,9 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<!-- 全屏 -->
|
||||
<FullScreen id="full-screen" />
|
||||
<LaySidebarFullScreen id="full-screen" />
|
||||
<!-- 消息通知 -->
|
||||
<Notice id="header-notice" />
|
||||
<LayNotice id="header-notice" />
|
||||
<!-- 退出登录 -->
|
||||
<el-dropdown trigger="click">
|
||||
<span class="el-dropdown-link navbar-bg-hover select-none">
|
@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { ListItem } from "./data";
|
||||
import { ListItem } from "../data";
|
||||
import { ref, PropType, nextTick } from "vue";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { deviceDetection } from "@pureadmin/utils";
|
||||
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
noticeItem: {
|
||||
type: Object as PropType<ListItem>,
|
||||
default: () => {}
|
||||
@ -49,12 +49,12 @@ function hoverDescription(event, description) {
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="notice-container border-b-[1px] border-solid border-[#f0f0f0] dark:border-[#303030]"
|
||||
class="notice-container border-0 border-b-[1px] border-solid border-[#f0f0f0] dark:border-[#303030]"
|
||||
>
|
||||
<el-avatar
|
||||
v-if="props.noticeItem.avatar"
|
||||
v-if="noticeItem.avatar"
|
||||
:size="30"
|
||||
:src="props.noticeItem.avatar"
|
||||
:src="noticeItem.avatar"
|
||||
class="notice-container-avatar"
|
||||
/>
|
||||
<div class="notice-container-text">
|
||||
@ -63,7 +63,7 @@ function hoverDescription(event, description) {
|
||||
popper-class="notice-title-popper"
|
||||
:effect="tooltipEffect"
|
||||
:disabled="!titleTooltip"
|
||||
:content="props.noticeItem.title"
|
||||
:content="noticeItem.title"
|
||||
placement="top-start"
|
||||
:enterable="!isMobile"
|
||||
>
|
||||
@ -72,16 +72,16 @@ function hoverDescription(event, description) {
|
||||
class="notice-title-content"
|
||||
@mouseover="hoverTitle"
|
||||
>
|
||||
{{ props.noticeItem.title }}
|
||||
{{ noticeItem.title }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tag
|
||||
v-if="props.noticeItem?.extra"
|
||||
:type="props.noticeItem?.status"
|
||||
v-if="noticeItem?.extra"
|
||||
:type="noticeItem?.status"
|
||||
size="small"
|
||||
class="notice-title-extra"
|
||||
>
|
||||
{{ props.noticeItem?.extra }}
|
||||
{{ noticeItem?.extra }}
|
||||
</el-tag>
|
||||
</div>
|
||||
|
||||
@ -89,19 +89,19 @@ function hoverDescription(event, description) {
|
||||
popper-class="notice-title-popper"
|
||||
:effect="tooltipEffect"
|
||||
:disabled="!descriptionTooltip"
|
||||
:content="props.noticeItem.description"
|
||||
:content="noticeItem.description"
|
||||
placement="top-start"
|
||||
>
|
||||
<div
|
||||
ref="descriptionRef"
|
||||
class="notice-text-description"
|
||||
@mouseover="hoverDescription($event, props.noticeItem.description)"
|
||||
@mouseover="hoverDescription($event, noticeItem.description)"
|
||||
>
|
||||
{{ props.noticeItem.description }}
|
||||
{{ noticeItem.description }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<div class="notice-text-datetime text-[#00000073] dark:text-white">
|
||||
{{ props.noticeItem.datetime }}
|
||||
{{ noticeItem.datetime }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -112,7 +112,7 @@ function hoverDescription(event, description) {
|
||||
max-width: 238px;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.notice-container {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
24
src/layout/components/lay-notice/components/NoticeList.vue
Normal file
@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import { PropType } from "vue";
|
||||
import { ListItem } from "../data";
|
||||
import NoticeItem from "./NoticeItem.vue";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
|
||||
defineProps({
|
||||
list: {
|
||||
type: Array as PropType<Array<ListItem>>,
|
||||
default: () => []
|
||||
},
|
||||
emptyText: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="list.length">
|
||||
<NoticeItem v-for="(item, index) in list" :key="index" :noticeItem="item" />
|
||||
</div>
|
||||
<el-empty v-else :description="transformI18n(emptyText)" />
|
||||
</template>
|
99
src/layout/components/lay-notice/data.ts
Normal file
@ -0,0 +1,99 @@
|
||||
import { $t } from "@/plugins/i18n";
|
||||
|
||||
export interface ListItem {
|
||||
avatar: string;
|
||||
title: string;
|
||||
datetime: string;
|
||||
type: string;
|
||||
description: string;
|
||||
status?: "primary" | "success" | "warning" | "info" | "danger";
|
||||
extra?: string;
|
||||
}
|
||||
|
||||
export interface TabItem {
|
||||
key: string;
|
||||
name: string;
|
||||
list: ListItem[];
|
||||
emptyText: string;
|
||||
}
|
||||
|
||||
export const noticesData: TabItem[] = [
|
||||
{
|
||||
key: "1",
|
||||
name: $t("status.pureNotify"),
|
||||
list: [],
|
||||
emptyText: $t("status.pureNoNotify")
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
name: $t("status.pureMessage"),
|
||||
list: [
|
||||
{
|
||||
avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile1.svg",
|
||||
title: "小铭 评论了你",
|
||||
description: "诚在于心,信在于行,诚信在于心行合一。",
|
||||
datetime: "今天",
|
||||
type: "2"
|
||||
},
|
||||
{
|
||||
avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile2.svg",
|
||||
title: "李白 回复了你",
|
||||
description: "长风破浪会有时,直挂云帆济沧海。",
|
||||
datetime: "昨天",
|
||||
type: "2"
|
||||
},
|
||||
{
|
||||
avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile5.svg",
|
||||
title: "标题",
|
||||
description:
|
||||
"请将鼠标移动到此处,以便测试超长的消息在此处将如何处理。本例中设置的描述最大行数为2,超过2行的描述内容将被省略并且可以通过tooltip查看完整内容",
|
||||
datetime: "时间",
|
||||
type: "2"
|
||||
}
|
||||
],
|
||||
emptyText: $t("status.pureNoMessage")
|
||||
},
|
||||
{
|
||||
key: "3",
|
||||
name: $t("status.pureTodo"),
|
||||
list: [
|
||||
{
|
||||
avatar: "",
|
||||
title: "第三方紧急代码变更",
|
||||
description:
|
||||
"小林提交于 2024-05-10,需在 2024-05-11 前完成代码变更任务",
|
||||
datetime: "",
|
||||
extra: "马上到期",
|
||||
status: "danger",
|
||||
type: "3"
|
||||
},
|
||||
{
|
||||
avatar: "",
|
||||
title: "版本发布",
|
||||
description: "指派小铭于 2024-06-18 前完成更新并发布",
|
||||
datetime: "",
|
||||
extra: "已耗时 8 天",
|
||||
status: "warning",
|
||||
type: "3"
|
||||
},
|
||||
{
|
||||
avatar: "",
|
||||
title: "新功能开发",
|
||||
description: "开发多租户管理",
|
||||
datetime: "",
|
||||
extra: "进行中",
|
||||
type: "3"
|
||||
},
|
||||
{
|
||||
avatar: "",
|
||||
title: "任务名称",
|
||||
description: "任务需要在 2030-10-30 10:00 前启动",
|
||||
datetime: "",
|
||||
extra: "未开始",
|
||||
status: "info",
|
||||
type: "3"
|
||||
}
|
||||
],
|
||||
emptyText: $t("status.pureNoTodo")
|
||||
}
|
||||
];
|
@ -1,24 +1,36 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { ref, computed } from "vue";
|
||||
import { noticesData } from "./data";
|
||||
import NoticeList from "./noticeList.vue";
|
||||
import Bell from "@iconify-icons/ep/bell";
|
||||
import NoticeList from "./components/NoticeList.vue";
|
||||
import BellIcon from "~icons/ep/bell";
|
||||
|
||||
const { t } = useI18n();
|
||||
const noticesNum = ref(0);
|
||||
const notices = ref(noticesData);
|
||||
const activeKey = ref(noticesData[0].key);
|
||||
const activeKey = ref(noticesData[0]?.key);
|
||||
|
||||
notices.value.map(v => (noticesNum.value += v.list.length));
|
||||
|
||||
const getLabel = computed(
|
||||
() => item =>
|
||||
t(item.name) + (item.list.length > 0 ? `(${item.list.length})` : "")
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-dropdown trigger="click" placement="bottom-end">
|
||||
<span class="dropdown-badge navbar-bg-hover select-none">
|
||||
<el-badge :value="noticesNum" :max="99">
|
||||
<span
|
||||
:class="[
|
||||
'dropdown-badge',
|
||||
'navbar-bg-hover',
|
||||
'select-none',
|
||||
Number(noticesNum) !== 0 && 'mr-[10px]'
|
||||
]"
|
||||
>
|
||||
<el-badge :value="Number(noticesNum) === 0 ? '' : noticesNum" :max="99">
|
||||
<span class="header-notice-icon">
|
||||
<IconifyIconOffline :icon="Bell" />
|
||||
<IconifyIconOffline :icon="BellIcon" />
|
||||
</span>
|
||||
</el-badge>
|
||||
</span>
|
||||
@ -37,13 +49,10 @@ notices.value.map(v => (noticesNum.value += v.list.length));
|
||||
/>
|
||||
<span v-else>
|
||||
<template v-for="item in notices" :key="item.key">
|
||||
<el-tab-pane
|
||||
:label="`${item.name}(${item.list.length})`"
|
||||
:name="`${item.key}`"
|
||||
>
|
||||
<el-tab-pane :label="getLabel(item)" :name="`${item.key}`">
|
||||
<el-scrollbar max-height="330px">
|
||||
<div class="noticeList-container">
|
||||
<NoticeList :list="item.list" />
|
||||
<NoticeList :list="item.list" :emptyText="item.emptyText" />
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</el-tab-pane>
|
||||
@ -62,7 +71,6 @@ notices.value.map(v => (noticesNum.value += v.list.length));
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 48px;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
.header-notice-icon {
|
@ -4,7 +4,7 @@ import { emitter } from "@/utils/mitt";
|
||||
import { onClickOutside } from "@vueuse/core";
|
||||
import { ref, computed, onMounted, onBeforeUnmount } from "vue";
|
||||
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
|
||||
import Close from "@iconify-icons/ep/close";
|
||||
import CloseIcon from "~icons/ep/close";
|
||||
|
||||
const target = ref(null);
|
||||
const show = ref<Boolean>(false);
|
||||
@ -16,7 +16,7 @@ const iconClass = computed(() => {
|
||||
"flex",
|
||||
"justify-center",
|
||||
"items-center",
|
||||
"outline-none",
|
||||
"outline-hidden",
|
||||
"rounded-[4px]",
|
||||
"cursor-pointer",
|
||||
"transition-colors",
|
||||
@ -51,7 +51,7 @@ onBeforeUnmount(() => {
|
||||
<div class="right-panel-background" />
|
||||
<div ref="target" class="right-panel bg-bg_color">
|
||||
<div
|
||||
class="project-configuration border-b-[1px] border-solid border-[var(--pure-border-color)]"
|
||||
class="project-configuration border-0 border-b-[1px] border-solid border-[var(--pure-border-color)]"
|
||||
>
|
||||
<h4 class="dark:text-white">
|
||||
{{ t("panel.pureSystemSet") }}
|
||||
@ -68,7 +68,7 @@ onBeforeUnmount(() => {
|
||||
class="dark:text-white"
|
||||
width="18px"
|
||||
height="18px"
|
||||
:icon="Close"
|
||||
:icon="CloseIcon"
|
||||
@click="show = !show"
|
||||
/>
|
||||
</span>
|
||||
@ -78,7 +78,7 @@ onBeforeUnmount(() => {
|
||||
</el-scrollbar>
|
||||
|
||||
<div
|
||||
class="flex justify-end p-3 border-t-[1px] border-solid border-[var(--pure-border-color)]"
|
||||
class="flex justify-end p-3 border-0 border-t-[1px] border-solid border-[var(--pure-border-color)]"
|
||||
>
|
||||
<el-button
|
||||
v-tippy="{
|
||||
@ -121,8 +121,8 @@ onBeforeUnmount(() => {
|
||||
width: 100%;
|
||||
max-width: 280px;
|
||||
box-shadow: 0 0 15px 0 rgb(0 0 0 / 5%);
|
||||
transition: all 0.25s cubic-bezier(0.7, 0.3, 0.1, 1);
|
||||
transform: translate(100%);
|
||||
transition: all 0.25s cubic-bezier(0.7, 0.3, 0.1, 1);
|
||||
}
|
||||
|
||||
.show {
|
@ -1,12 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import mdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
|
||||
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||
import ArrowUpLine from "@iconify-icons/ri/arrow-up-line";
|
||||
import ArrowDownLine from "@iconify-icons/ri/arrow-down-line";
|
||||
import MdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
|
||||
import EnterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||
import ArrowUpLine from "~icons/ri/arrow-up-line";
|
||||
import ArrowDownLine from "~icons/ri/arrow-down-line";
|
||||
|
||||
const props = withDefaults(defineProps<{ total: number }>(), {
|
||||
withDefaults(defineProps<{ total?: number }>(), {
|
||||
total: 0
|
||||
});
|
||||
|
||||
@ -17,7 +17,7 @@ const { device } = useNav();
|
||||
<template>
|
||||
<div class="search-footer text-[#333] dark:text-white">
|
||||
<span class="search-footer-item">
|
||||
<enterOutlined class="icon" />
|
||||
<EnterOutlined class="icon" />
|
||||
{{ t("buttons.pureConfirm") }}
|
||||
</span>
|
||||
<span class="search-footer-item">
|
||||
@ -26,14 +26,11 @@ const { device } = useNav();
|
||||
{{ t("buttons.pureSwitch") }}
|
||||
</span>
|
||||
<span class="search-footer-item">
|
||||
<mdiKeyboardEsc class="icon" />
|
||||
<MdiKeyboardEsc class="icon" />
|
||||
{{ t("buttons.pureClose") }}
|
||||
</span>
|
||||
<p
|
||||
v-if="device !== 'mobile' && props.total > 0"
|
||||
class="search-footer-total"
|
||||
>
|
||||
{{ `${t("search.pureTotal")} ${props.total}` }}
|
||||
<p v-if="device !== 'mobile' && total > 0" class="search-footer-total">
|
||||
{{ `${t("search.pureTotal")} ${total}` }}
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
@ -2,8 +2,8 @@
|
||||
import type { optionsItem } from "../types";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
import Star from "@iconify-icons/ep/star";
|
||||
import Close from "@iconify-icons/ep/close";
|
||||
import StarIcon from "~icons/ep/star";
|
||||
import CloseIcon from "~icons/ep/close";
|
||||
|
||||
interface Props {
|
||||
item: optionsItem;
|
||||
@ -33,12 +33,12 @@ function handleDelete(item) {
|
||||
</span>
|
||||
<IconifyIconOffline
|
||||
v-show="item.type === 'history'"
|
||||
:icon="Star"
|
||||
:icon="StarIcon"
|
||||
class="w-[18px] h-[18px] mr-2 hover:text-[#d7d5d4]"
|
||||
@click.stop="handleCollect(item)"
|
||||
/>
|
||||
<IconifyIconOffline
|
||||
:icon="Close"
|
||||
:icon="CloseIcon"
|
||||
class="w-[18px] h-[18px] hover:text-[#d7d5d4] cursor-pointer"
|
||||
@click.stop="handleDelete(item)"
|
||||
/>
|
@ -6,14 +6,14 @@ import { useRouter } from "vue-router";
|
||||
import SearchResult from "./SearchResult.vue";
|
||||
import SearchFooter from "./SearchFooter.vue";
|
||||
import { useNav } from "@/layout/hooks/useNav";
|
||||
import { transformI18n } from "@/plugins/i18n";
|
||||
import SearchHistory from "./SearchHistory.vue";
|
||||
import { transformI18n, $t } from "@/plugins/i18n";
|
||||
import type { optionsItem, dragItem } from "../types";
|
||||
import { ref, computed, shallowRef, watch } from "vue";
|
||||
import { useDebounceFn, onKeyStroke } from "@vueuse/core";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||
import { cloneDeep, isAllEmpty, storageLocal } from "@pureadmin/utils";
|
||||
import Search from "@iconify-icons/ri/search-line";
|
||||
import SearchIcon from "~icons/ri/search-line";
|
||||
|
||||
interface Props {
|
||||
/** 弹窗显隐 */
|
||||
@ -298,7 +298,7 @@ onKeyStroke("ArrowDown", handleDown);
|
||||
>
|
||||
<template #prefix>
|
||||
<IconifyIconOffline
|
||||
:icon="Search"
|
||||
:icon="SearchIcon"
|
||||
class="text-primary w-[24px] h-[24px]"
|
||||
/>
|
||||
</template>
|
@ -5,7 +5,7 @@ import { useResizeObserver } from "@pureadmin/utils";
|
||||
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
|
||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
|
||||
import { ref, computed, getCurrentInstance, onMounted } from "vue";
|
||||
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||
import EnterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||
|
||||
interface Emits {
|
||||
(e: "update:value", val: string): void;
|
||||
@ -84,7 +84,7 @@ defineExpose({ handleScroll });
|
||||
<span class="result-item-title">
|
||||
{{ transformI18n(item.meta?.title) }}
|
||||
</span>
|
||||
<enterOutlined />
|
||||
<EnterOutlined />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { SearchModal } from "./components";
|
||||
import { useBoolean } from "../../hooks/useBoolean";
|
||||
import SearchModal from "./components/SearchModal.vue";
|
||||
|
||||
const { bool: show, toggle } = useBoolean();
|
||||
function handleSearch() {
|
||||
@ -14,7 +14,7 @@ function handleSearch() {
|
||||
class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover"
|
||||
@click="handleSearch"
|
||||
>
|
||||
<IconifyIconOffline icon="ri:search-line" />
|
||||
<IconifyIconOffline icon="ri/search-line" />
|
||||
</div>
|
||||
<SearchModal v-model:value="show" />
|
||||
</div>
|