From 702747243a9d9ad5f8715f683c799e265d1478f0 Mon Sep 17 00:00:00 2001 From: xiangshu233 Date: Sat, 22 Oct 2022 10:15:38 +0800 Subject: [PATCH] =?UTF-8?q?chore=20=E4=BE=9D=E8=B5=96=E6=9B=B4=E6=96=B0=20?= =?UTF-8?q?fix=20=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 12 ++++++------ pnpm-lock.yaml | 10 ++++++++-- src/api/dashboard/console.ts | 9 --------- src/api/system/menu.ts | 23 ----------------------- src/api/system/role.ts | 11 ----------- src/api/table/list.ts | 10 ---------- src/hooks/useDomWidth.ts | 2 +- src/settings/componentSetting.ts | 18 +----------------- 8 files changed, 16 insertions(+), 79 deletions(-) delete mode 100644 src/api/dashboard/console.ts delete mode 100644 src/api/system/menu.ts delete mode 100644 src/api/system/role.ts delete mode 100644 src/api/table/list.ts diff --git a/package.json b/package.json index 87dad9e..63798f3 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,10 @@ "lint:stylelint": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/" }, "dependencies": { - "@types/lodash": "^4.14.184", - "@vicons/utils": "^0.1.4", + "@types/lodash-es": "^4.17.6", "@vicons/antd": "^0.12.0", "@vicons/ionicons5": "^0.12.0", + "@vicons/utils": "^0.1.4", "@vueuse/core": "^9.2.0", "axios": "^0.26.1", "date-fns": "^2.29.2", @@ -38,9 +38,9 @@ "devDependencies": { "@commitlint/cli": "^17.0.3", "@commitlint/config-conventional": "^17.0.3", + "@types/fs-extra": "^9.0.13", "@types/mockjs": "^1.0.6", "@types/node": "^18.7.1", - "@types/fs-extra": "^9.0.13", "@typescript-eslint/eslint-plugin": "^5.33.1", "@typescript-eslint/parser": "^5.33.1", "@vitejs/plugin-vue": "^3.0.3", @@ -50,20 +50,20 @@ "cross-env": "^7.0.3", "dotenv": "^16.0.1", "eslint": "^8.22.0", - "rimraf": "^3.0.2", - "fs-extra": "^10.1.0", - "picocolors": "^1.0.0", "eslint-config-prettier": "^8.5.0", "eslint-define-config": "^1.6.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-vue": "^9.3.0", "esno": "^0.16.3", + "fs-extra": "^10.1.0", "less": "^4.1.3", + "picocolors": "^1.0.0", "postcss": "^8.4.16", "postcss-html": "^1.0.0", "postcss-less": "^6.0.0", "postcss-px-to-viewport-8-plugin": "^1.1.5", "prettier": "^2.7.1", + "rimraf": "^3.0.2", "rollup": "^2.79.0", "rollup-plugin-visualizer": "^5.8.1", "stylelint": "^14.10.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3a5a227..a70765c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,7 +4,7 @@ specifiers: '@commitlint/cli': ^17.0.3 '@commitlint/config-conventional': ^17.0.3 '@types/fs-extra': ^9.0.13 - '@types/lodash': ^4.14.184 + '@types/lodash-es': ^4.17.6 '@types/mockjs': ^1.0.6 '@types/node': ^18.7.1 '@typescript-eslint/eslint-plugin': ^5.33.1 @@ -67,7 +67,7 @@ specifiers: vue-types: ^4.2.1 dependencies: - '@types/lodash': 4.14.184 + '@types/lodash-es': 4.17.6 '@vicons/antd': 0.12.0 '@vicons/ionicons5': 0.12.0 '@vicons/utils': 0.1.4_vue@3.2.39 @@ -573,6 +573,12 @@ packages: resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} dev: true + /@types/lodash-es/4.17.6: + resolution: {integrity: sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==} + dependencies: + '@types/lodash': 4.14.184 + dev: false + /@types/lodash/4.14.184: resolution: {integrity: sha512-RoZphVtHbxPZizt4IcILciSWiC6dcn+eZ8oX9IWEYfDMcocdd42f7NPI6fQj+6zI8y4E0L7gu2pcZKLGTRaV9Q==} dev: false diff --git a/src/api/dashboard/console.ts b/src/api/dashboard/console.ts deleted file mode 100644 index f7d6b40..0000000 --- a/src/api/dashboard/console.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { http } from '@/utils/http/axios'; - -//获取主控台信息 -export function getConsoleInfo() { - return http.request({ - url: '/dashboard/console', - method: 'get', - }); -} diff --git a/src/api/system/menu.ts b/src/api/system/menu.ts deleted file mode 100644 index 4e1a19e..0000000 --- a/src/api/system/menu.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { http } from '@/utils/http/axios'; - -/** - * @description: 根据用户id获取用户菜单 - */ -export function adminMenus() { - return http.request({ - url: '/menus', - method: 'GET', - }); -} - -/** - * 获取tree菜单列表 - * @param params - */ -export function getMenuList(params?) { - return http.request({ - url: '/menu/list', - method: 'GET', - params, - }); -} diff --git a/src/api/system/role.ts b/src/api/system/role.ts deleted file mode 100644 index 8c20114..0000000 --- a/src/api/system/role.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { http } from '@/utils/http/axios'; - -/** - * @description: 角色列表 - */ -export function getRoleList() { - return http.request({ - url: '/role/list', - method: 'GET', - }); -} diff --git a/src/api/table/list.ts b/src/api/table/list.ts deleted file mode 100644 index 1e95565..0000000 --- a/src/api/table/list.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { http } from '@/utils/http/axios'; - -//获取table -export function getTableList(params) { - return http.request({ - url: '/table/list', - method: 'get', - params, - }); -} diff --git a/src/hooks/useDomWidth.ts b/src/hooks/useDomWidth.ts index eadd7de..1a0bc5a 100644 --- a/src/hooks/useDomWidth.ts +++ b/src/hooks/useDomWidth.ts @@ -1,5 +1,5 @@ import { ref, onMounted, onUnmounted } from 'vue'; -import { debounce } from 'lodash'; +import { debounce } from 'lodash-es'; /** * description: 获取页面宽度 diff --git a/src/settings/componentSetting.ts b/src/settings/componentSetting.ts index 148e4bb..22348d0 100644 --- a/src/settings/componentSetting.ts +++ b/src/settings/componentSetting.ts @@ -1,20 +1,4 @@ export default { - table: { - apiSetting: { - // 当前页的字段名 - pageField: 'current', - // 每页数量字段名 - sizeField: 'size', - // 接口返回的数据字段名 - listField: 'records', - // 接口返回总页数字段名 - totalField: 'pages', - }, - //默认分页数量 - defaultPageSize: 10, - //可切换每页数量集合 - pageSizes: [10, 20, 30, 40, 50], - }, upload: { //考虑接口规范不同 apiSetting: { @@ -24,7 +8,7 @@ export default { imgField: 'imagePath', }, //最大上传图片大小 - maxSize: 2, + maxSize: 1, //图片上传类型 fileType: ['image/png', 'image/jpg', 'image/jpeg', 'image/gif', 'image/svg+xml'], },