From 905984367c8459dac336285b1a838cf5305f4c39 Mon Sep 17 00:00:00 2001 From: xiaoma <735878602@qq.com> Date: Sat, 14 Aug 2021 14:35:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=20Vue=203.2.x=20=E8=AF=AD?= =?UTF-8?q?=E6=B3=95=E5=8D=87=E7=BA=A7=E4=B8=BA=EF=BC=8Cscript=20setup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 17 + README.md | 4 + package.json | 17 +- src/App.vue | 123 ++--- src/api/system/role.ts | 2 +- src/components/Form/src/BasicForm.vue | 2 +- src/components/Modal/src/basicModal.vue | 148 +++--- src/components/Modal/src/hooks/useModal.ts | 61 ++- src/components/Modal/src/type/index.ts | 12 +- .../src/components/editable/EditableCell.vue | 43 +- src/hooks/setting/useProjectSetting.ts | 6 + .../components/Header/ProjectSetting.vue | 31 +- src/layout/components/Logo/index.vue | 3 +- src/layout/components/Main/index.vue | 12 +- src/layout/components/TagsView/index.vue | 7 +- src/layout/index.vue | 189 ++++---- src/plugins/naive.ts | 2 + src/router/modules/about.ts | 2 +- src/router/modules/comp.ts | 20 +- src/router/modules/list.ts | 3 +- src/settings/animateSetting.ts | 8 + src/settings/projectSetting.ts | 4 + src/store/modules/projectSetting.ts | 12 + src/styles/common.less | 10 +- src/styles/index.less | 3 + src/styles/transition/base.less | 18 + src/styles/transition/fade.less | 81 ++++ src/styles/transition/index.less | 10 + src/styles/transition/scale.less | 21 + src/styles/transition/scroll.less | 67 +++ src/styles/transition/slide.less | 39 ++ src/styles/transition/zoom.less | 27 ++ src/utils/Drag.ts | 2 +- src/utils/http/axios/index.ts | 2 + src/utils/http/axios/types.ts | 2 - src/utils/index.ts | 1 + src/views/about/index.vue | 42 +- src/views/comp/drag/index.vue | 162 +++++++ src/views/comp/form/basic.vue | 40 +- src/views/comp/form/useForm.vue | 61 +-- src/views/comp/richtext/vue-quill.vue | 114 +++++ src/views/comp/table/basic.vue | 167 +++---- src/views/comp/table/editCell.vue | 121 ++--- src/views/comp/table/editRow.vue | 184 ++++--- src/views/comp/table/rowColumns.ts | 2 +- src/views/comp/upload/index.vue | 86 ++-- src/views/dashboard/console/console.vue | 351 ++++++++------ src/views/dashboard/monitor/monitor.vue | 11 +- src/views/dashboard/workplace/workplace.vue | 26 +- src/views/exception/403.vue | 18 +- src/views/exception/404.vue | 18 +- src/views/exception/500.vue | 18 +- src/views/form/basicForm/index.vue | 104 ++-- src/views/form/detail/index.vue | 16 +- src/views/form/stepForm/Step1.vue | 103 ++-- src/views/form/stepForm/Step2.vue | 77 ++- src/views/form/stepForm/Step3.vue | 35 +- src/views/form/stepForm/stepForm.vue | 47 +- src/views/iframe/index.vue | 70 ++- src/views/list/basicList/index.vue | 284 +++++------ src/views/login/index.vue | 148 +++--- src/views/result/fail.vue | 19 +- src/views/result/info.vue | 19 +- src/views/result/success.vue | 18 +- src/views/setting/account/BasicSetting.vue | 52 +- src/views/setting/account/SafetySetting.vue | 56 +-- src/views/setting/account/account.vue | 28 +- src/views/system/menu/menu.vue | 215 ++++----- src/views/system/role/role.vue | 297 +++++------- tsconfig.json | 2 +- yarn.lock | 456 +++++++++++------- 71 files changed, 2362 insertions(+), 2116 deletions(-) create mode 100644 src/settings/animateSetting.ts create mode 100644 src/styles/index.less create mode 100644 src/styles/transition/base.less create mode 100644 src/styles/transition/fade.less create mode 100644 src/styles/transition/index.less create mode 100644 src/styles/transition/scale.less create mode 100644 src/styles/transition/scroll.less create mode 100644 src/styles/transition/slide.less create mode 100644 src/styles/transition/zoom.less create mode 100644 src/views/comp/drag/index.vue create mode 100644 src/views/comp/richtext/vue-quill.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 41b766d..6d3c890 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # CHANGELOG +## 1.5.5 (2021-08-14) + +### 🐛 Bug Fixes +- 修复路由只存在一个子路由,图标不显示问题 +- UI样式美化 + +- ### ✨ Features +- 支持 Vue 3.2.x +- 代码全部按 `script setup` 语法重写(完成80%) +- 新增 `回到顶部` 功能 +- 新增 `拖拽` 示例页面 +- 新增 `富文本` 组件 +- 新增 `路由切换动画` 可在项目设置切换 +- 依赖升级 + +# CHANGELOG + ## 1.5.4 (2021-08-10) ### 🐛 Bug Fixes diff --git a/README.md b/README.md index fbe2041..92b267a 100644 --- a/README.md +++ b/README.md @@ -117,3 +117,7 @@ yarn build - QQ 群 `328347666` +## 赞助 +#### 如果你觉得这个项目帮助到了你,你可以帮作者买一杯果汁表示鼓励 🍹。 + +![donate](https://jekip.github.io/docs/images/sponsor.png) diff --git a/package.json b/package.json index ff89eb5..2d2c9b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "naive-ui-admin", - "version": "1.5.4", + "version": "1.5.5", "author": { "name": "Ahjung", "email": "735878602@qq.com", @@ -27,6 +27,7 @@ "dependencies": { "@vicons/antd": "^0.10.0", "@vicons/ionicons5": "^0.10.0", + "@vueup/vue-quill": "^1.0.0-beta.7", "@vueuse/core": "^5.0.3", "axios": "^0.21.1", "blueimp-md5": "^2.18.0", @@ -39,11 +40,11 @@ "mitt": "^2.1.0", "mockjs": "^1.1.0", "naive-ui": "^2.16.2", - "pinia": "^2.0.0-beta.3", + "pinia": "^2.0.0-rc.4", "qs": "^6.10.1", "vfonts": "^0.1.0", - "vue": "^3.1.2", - "vue-router": "^4.0.10", + "vue": "^3.2.2", + "vue-router": "^4.0.11", "vue-types": "^4.0.0", "vuedraggable": "^4.0.3", "vuex": "^4.0.2" @@ -53,17 +54,17 @@ "@commitlint/config-conventional": "^12.1.4", "@types/lodash": "^4.14.170", "@types/node": "^15.12.2", - "@typescript-eslint/eslint-plugin": "^4.26.1", - "@typescript-eslint/parser": "^4.26.1", + "@typescript-eslint/eslint-plugin": "^4.29.1", + "@typescript-eslint/parser": "^4.29.1", "@vitejs/plugin-vue": "^1.2.3", "@vitejs/plugin-vue-jsx": "^1.1.5", - "@vue/compiler-sfc": "3.1.1", + "@vue/compiler-sfc": "^3.2.2", "@vue/eslint-config-typescript": "^7.0.0", "autoprefixer": "^10.3.1", "commitizen": "^4.2.4", "core-js": "^3.14.0", "dotenv": "^10.0.0", - "eslint": "^7.28.0", + "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-define-config": "^1.0.9", "eslint-plugin-jest": "^24.4.0", diff --git a/src/App.vue b/src/App.vue index e58a1e4..34ec08e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -16,8 +16,8 @@ - diff --git a/src/api/system/role.ts b/src/api/system/role.ts index 60590ff..40876fd 100644 --- a/src/api/system/role.ts +++ b/src/api/system/role.ts @@ -3,7 +3,7 @@ import http from '@/utils/http/axios'; /** * @description: 角色列表 */ -export function getRoleList() { +export function getRoleList(params) { return http.request({ url: '/role/list', method: 'GET', diff --git a/src/components/Form/src/BasicForm.vue b/src/components/Form/src/BasicForm.vue index b9fe4c0..3bfb600 100644 --- a/src/components/Form/src/BasicForm.vue +++ b/src/components/Form/src/BasicForm.vue @@ -102,7 +102,7 @@ type="primary" text icon-placement="right" - v-if="overflow && isInline && getProps.showAdvancedButton" + v-if="isInline && getProps.showAdvancedButton" @click="unfoldToggle" > - diff --git a/src/views/comp/form/basic.vue b/src/views/comp/form/basic.vue index 3e6dda3..c45659a 100644 --- a/src/views/comp/form/basic.vue +++ b/src/views/comp/form/basic.vue @@ -3,13 +3,15 @@
基础表单,用于向用户收集表单信息
- +
- diff --git a/src/views/comp/table/basic.vue b/src/views/comp/table/basic.vue index bf1e0c2..00b8c45 100644 --- a/src/views/comp/table/basic.vue +++ b/src/views/comp/table/basic.vue @@ -18,105 +18,90 @@ - diff --git a/src/views/comp/table/editCell.vue b/src/views/comp/table/editCell.vue index 504bb77..9d0c20f 100644 --- a/src/views/comp/table/editCell.vue +++ b/src/views/comp/table/editCell.vue @@ -19,100 +19,41 @@ - diff --git a/src/views/comp/table/editRow.vue b/src/views/comp/table/editRow.vue index 918dd9b..c50eeaf 100644 --- a/src/views/comp/table/editRow.vue +++ b/src/views/comp/table/editRow.vue @@ -11,7 +11,7 @@ @edit-end="editEnd" @edit-change="onEditChange" @update:checked-row-keys="onCheckedRow" - :scroll-x="1510" + :scroll-x="1590" > - diff --git a/src/views/comp/table/rowColumns.ts b/src/views/comp/table/rowColumns.ts index f521e69..5af3dbb 100644 --- a/src/views/comp/table/rowColumns.ts +++ b/src/views/comp/table/rowColumns.ts @@ -59,7 +59,7 @@ export const columns = [ key: 'beginTime', editRow: true, edit: true, - width: 160, + width: 240, editComponent: 'NDatePicker', editComponentProps: { type: 'datetime', diff --git a/src/views/comp/upload/index.vue b/src/views/comp/upload/index.vue index 0a505f5..05e2c70 100644 --- a/src/views/comp/upload/index.vue +++ b/src/views/comp/upload/index.vue @@ -3,7 +3,7 @@
上传图片,用于向用户收集图片信息
- + - diff --git a/src/views/dashboard/console/console.vue b/src/views/dashboard/console/console.vue index 2d5bd7e..e95dd70 100644 --- a/src/views/dashboard/console/console.vue +++ b/src/views/dashboard/console/console.vue @@ -13,30 +13,40 @@
- + +
- 日同比 - - - - + +
- 周同比 - - - - + +
@@ -52,7 +62,14 @@
- + +
@@ -66,10 +83,13 @@
@@ -85,30 +105,40 @@
- + +
- 日同比 - - - - + +
- 周同比 - - - - + +
@@ -124,30 +154,40 @@
- + +
- 月同比 - - - - + +
- 月同比 - - - - + +
@@ -160,7 +200,8 @@ - diff --git a/src/views/dashboard/monitor/monitor.vue b/src/views/dashboard/monitor/monitor.vue index f2981d5..df5efb3 100644 --- a/src/views/dashboard/monitor/monitor.vue +++ b/src/views/dashboard/monitor/monitor.vue @@ -2,15 +2,6 @@
监控台
- + diff --git a/src/views/dashboard/workplace/workplace.vue b/src/views/dashboard/workplace/workplace.vue index d42026f..40930fc 100644 --- a/src/views/dashboard/workplace/workplace.vue +++ b/src/views/dashboard/workplace/workplace.vue @@ -298,7 +298,7 @@
- diff --git a/src/views/form/stepForm/Step1.vue b/src/views/form/stepForm/Step1.vue index 673f673..2ec098b 100644 --- a/src/views/form/stepForm/Step1.vue +++ b/src/views/form/stepForm/Step1.vue @@ -47,8 +47,8 @@
- diff --git a/src/views/form/stepForm/Step2.vue b/src/views/form/stepForm/Step2.vue index 8669101..73bca11 100644 --- a/src/views/form/stepForm/Step2.vue +++ b/src/views/form/stepForm/Step2.vue @@ -32,50 +32,41 @@ - diff --git a/src/views/form/stepForm/Step3.vue b/src/views/form/stepForm/Step3.vue index c731c63..30ef1d7 100644 --- a/src/views/form/stepForm/Step3.vue +++ b/src/views/form/stepForm/Step3.vue @@ -31,34 +31,17 @@
- diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 98f7dab..dbbfbf6 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -50,7 +50,7 @@ 自动登录 @@ -65,21 +65,21 @@ 其它登录方式 @@ -89,95 +89,83 @@ -