From a67510fe34cc798f4c5e5fad5b78cf202e4a4f74 Mon Sep 17 00:00:00 2001
From: zclzone
Date: Thu, 6 Jun 2024 18:05:36 +0800
Subject: [PATCH] style: lint
---
README.md | 5 +-
build/index.js | 4 +-
build/plugin-isme/icons.js | 5 +-
build/plugin-isme/page-pathes.js | 5 +-
eslint.config.js | 10 ++-
index.html | 2 +-
src/App.vue | 13 +--
src/api/index.js | 4 +-
src/components/common/AppPage.vue | 4 +-
src/components/common/CommonPage.vue | 6 +-
src/components/common/TheLogo.vue | 2 +-
src/components/common/ThemeSetting.vue | 1 +
src/components/me/crud/QueryItem.vue | 4 +-
src/components/me/crud/index.vue | 25 +++---
src/components/me/modal/index.vue | 39 ++++----
src/components/me/modal/utils.js | 14 +--
src/composables/useAliveData.js | 4 +-
src/composables/useCrud.js | 16 ++--
src/composables/useForm.js | 2 +-
src/composables/useModal.js | 2 +-
src/directives/index.js | 2 +-
src/layouts/components/BreadCrumb.vue | 7 +-
src/layouts/components/RoleSelect.vue | 9 +-
src/layouts/components/SideLogo.vue | 1 +
src/layouts/components/SideMenu.vue | 3 +-
src/layouts/components/UserAvatar.vue | 7 +-
src/layouts/components/tab/ContextMenu.vue | 4 +-
src/layouts/components/tab/index.vue | 2 +-
src/layouts/full/header/index.vue | 6 +-
src/layouts/full/index.vue | 4 +-
src/layouts/normal/header/index.vue | 6 +-
src/layouts/normal/index.vue | 2 +-
src/layouts/simple/index.vue | 2 +-
src/layouts/simple/sidebar/index.vue | 2 +-
src/router/guards/page-title-guard.js | 3 +-
src/router/guards/permission-guard.js | 12 ++-
src/router/guards/tab-guard.js | 3 +-
src/router/index.js | 2 +-
src/store/helper.js | 3 +-
src/store/modules/auth.js | 2 +-
src/store/modules/permission.js | 31 ++++---
src/store/modules/tab.js | 27 +++---
src/utils/common.js | 39 ++++----
src/utils/http/helpers.js | 6 +-
src/utils/http/interceptors.js | 4 +-
src/utils/is.js | 17 ++--
src/utils/naiveTools.js | 10 ++-
src/utils/storage/storage.js | 6 +-
src/views/base/index.vue | 45 +++++++---
src/views/base/keep-alive.vue | 4 +-
src/views/base/test-modal.vue | 4 +-
src/views/base/unocss-icon.vue | 20 +++--
src/views/demo/upload/index.vue | 9 +-
src/views/error-page/403.vue | 7 +-
src/views/error-page/404.vue | 4 +-
src/views/home/index.vue | 12 ++-
src/views/iframe/index.vue | 2 +-
src/views/login/api.js | 4 +-
src/views/login/index.vue | 28 +++---
src/views/pms/resource/api.js | 4 +-
.../pms/resource/components/MenuTree.vue | 17 ++--
.../pms/resource/components/ResAddOrEdit.vue | 47 ++++++----
src/views/pms/resource/index.vue | 59 +++++++-----
src/views/pms/role/api.js | 6 +-
src/views/pms/role/index.vue | 58 ++++++------
src/views/pms/role/role-user.vue | 90 ++++++++++---------
src/views/pms/user/api.js | 6 +-
src/views/pms/user/index.vue | 84 +++++++++--------
src/views/profile/api.js | 4 +-
src/views/profile/index.vue | 18 ++--
uno.config.js | 4 +-
vite.config.js | 6 +-
72 files changed, 542 insertions(+), 389 deletions(-)
diff --git a/README.md b/README.md
index bb704ec..c55a977 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,7 @@
## 简介
+
Vue Naive Admin 是一款极简风格的后台管理模板,包含前后端解决方案,前端使用 Vite + Vue3 + Pinia + Unocss,后端使用 Nestjs + TypeOrm + MySql,简单易用,赏心悦目,历经十几次重构和细节打磨,诚意满满!!
## 设计理念
@@ -51,9 +52,8 @@ Vue Naive Admin 提供一套后端代码,技术栈使用 Nestjs + TypeOrm + My
- 源码-github: [isme-nest-serve | github](https://github.com/zclzone/isme-nest-serve)
- 源码-gitee: [isme-nest-serve | gitee](https://gitee.com/isme-admin/isme-nest-serve)
-
## 文档
-
+
- 项目文档: [docs | vue-naive-admin](https://docs.isme.top/web/#/624306705/188522224)
- 接口文档: [apidoc | isme-nest-serve](https://apifox.com/apidoc/shared-ff4a4d32-c0d1-4caf-b0ee-6abc130f734a)
@@ -81,4 +81,3 @@ Vue Naive Admin 提供一套后端代码,技术栈使用 Nestjs + TypeOrm + My
添加微信,拉你进群

-
diff --git a/build/index.js b/build/index.js
index 448517d..985ced8 100644
--- a/build/index.js
+++ b/build/index.js
@@ -6,8 +6,8 @@
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
**********************************/
+import path from 'node:path'
import { globSync } from 'glob'
-import path from 'path'
import dynamicIcons from '../src/assets/icons/dynamic-icons'
/**
@@ -35,5 +35,5 @@ export function getIcons() {
*/
export function getPagePathes() {
const files = globSync('src/views/**/*.vue')
- return files.map((item) => '/' + path.normalize(item).replace(/\\/g, '/'))
+ return files.map(item => `/${path.normalize(item).replace(/\\/g, '/')}`)
}
diff --git a/build/plugin-isme/icons.js b/build/plugin-isme/icons.js
index 336d0bf..4da9779 100644
--- a/build/plugin-isme/icons.js
+++ b/build/plugin-isme/icons.js
@@ -13,10 +13,11 @@ export function pluginIcons() {
return {
name: 'isme:icons',
resolveId(id) {
- if (id === PLUGIN_ICONS_ID) return '\0' + PLUGIN_ICONS_ID
+ if (id === PLUGIN_ICONS_ID)
+ return `\0${PLUGIN_ICONS_ID}`
},
load(id) {
- if (id === '\0' + PLUGIN_ICONS_ID) {
+ if (id === `\0${PLUGIN_ICONS_ID}`) {
return `export default ${JSON.stringify(getIcons())}`
}
},
diff --git a/build/plugin-isme/page-pathes.js b/build/plugin-isme/page-pathes.js
index 44bdf49..a29d8e2 100644
--- a/build/plugin-isme/page-pathes.js
+++ b/build/plugin-isme/page-pathes.js
@@ -13,10 +13,11 @@ export function pluginPagePathes() {
return {
name: 'isme:page-pathes',
resolveId(id) {
- if (id === PLUGIN_PAGE_PATHES_ID) return '\0' + PLUGIN_PAGE_PATHES_ID
+ if (id === PLUGIN_PAGE_PATHES_ID)
+ return `\0${PLUGIN_PAGE_PATHES_ID}`
},
load(id) {
- if (id === '\0' + PLUGIN_PAGE_PATHES_ID) {
+ if (id === `\0${PLUGIN_PAGE_PATHES_ID}`) {
return `export default ${JSON.stringify(getPagePathes())}`
}
},
diff --git a/eslint.config.js b/eslint.config.js
index c6b431f..b15d4e5 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -9,10 +9,13 @@ export default antfu({
'no-undef': 'error',
'no-fallthrough': 'off',
'vue/block-order': 'off',
+ '@typescript-eslint/no-this-alias': 'off',
+ 'prefer-promise-reject-errors': 'off',
},
languageOptions: {
globals: {
h: 'readonly',
+ unref: 'readonly',
provide: 'readonly',
inject: 'readonly',
markRaw: 'readonly',
@@ -21,8 +24,11 @@ export default antfu({
useRoute: 'readonly',
useRouter: 'readonly',
Message: 'readonly',
- Modal: 'readonly',
- NProgress: 'readonly',
+ $loadingBar: 'readonly',
+ $message: 'readonly',
+ $dialog: 'readonly',
+ $notification: 'readonly',
+ $modal: 'readonly',
},
},
})
diff --git a/index.html b/index.html
index 8484405..6767d3d 100644
--- a/index.html
+++ b/index.html
@@ -1,4 +1,4 @@
-
+
diff --git a/src/App.vue b/src/App.vue
index f901596..1014785 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -27,14 +27,15 @@
diff --git a/src/layouts/normal/header/index.vue b/src/layouts/normal/header/index.vue
index c01f31f..2009e53 100644
--- a/src/layouts/normal/header/index.vue
+++ b/src/layouts/normal/header/index.vue
@@ -43,13 +43,13 @@
diff --git a/src/layouts/simple/index.vue b/src/layouts/simple/index.vue
index 09d64fc..ef192dd 100644
--- a/src/layouts/simple/index.vue
+++ b/src/layouts/simple/index.vue
@@ -23,8 +23,8 @@
diff --git a/src/layouts/simple/sidebar/index.vue b/src/layouts/simple/sidebar/index.vue
index 4163670..27a7e6f 100644
--- a/src/layouts/simple/sidebar/index.vue
+++ b/src/layouts/simple/sidebar/index.vue
@@ -16,7 +16,7 @@
diff --git a/src/views/error-page/404.vue b/src/views/error-page/404.vue
index d455763..322aeeb 100644
--- a/src/views/error-page/404.vue
+++ b/src/views/error-page/404.vue
@@ -17,7 +17,9 @@
size="large"
>
- 返回首页
+
+ 返回首页
+
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 7d780d5..3b5211d 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -20,8 +20,12 @@
- 一个人几乎可以在任何他怀有无限热忱的事情上成功。
- —— 查尔斯·史考伯
+
+ 一个人几乎可以在任何他怀有无限热忱的事情上成功。
+
+
+ —— 查尔斯·史考伯
+
@@ -156,13 +160,13 @@
diff --git a/src/views/pms/role/role-user.vue b/src/views/pms/role/role-user.vue
index d38408a..1773b5d 100644
--- a/src/views/pms/role/role-user.vue
+++ b/src/views/pms/role/role-user.vue
@@ -9,15 +9,17 @@
- {{ route.query.roleName }}
+
+ {{ route.query.roleName }}
+
-
+
批量取消授权
-
-
+
批量授权
-
+
@@ -66,10 +68,10 @@