From a07f4e9925ba15b3a94ddbea1908e42c2184b4cb Mon Sep 17 00:00:00 2001 From: kailong321200875 <321200875@qq.com> Date: Thu, 20 Jun 2024 16:20:14 +0800 Subject: [PATCH 01/14] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E5=9B=BE=E6=A0=87=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Components/Form/DefaultForm.vue | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/views/Components/Form/DefaultForm.vue b/src/views/Components/Form/DefaultForm.vue index 90f7df572..4165c1619 100644 --- a/src/views/Components/Form/DefaultForm.vue +++ b/src/views/Components/Form/DefaultForm.vue @@ -475,8 +475,8 @@ const schema = reactive([ label: `${t('formDemo.icon')}1`, component: 'Input', componentProps: { - suffixIcon: , - prefixIcon: + suffixIcon: , + prefixIcon: } }, { @@ -486,9 +486,9 @@ const schema = reactive([ componentProps: { slots: { suffix: () => { - return + return }, - prefix: () => + prefix: () => } } }, @@ -498,8 +498,8 @@ const schema = reactive([ component: 'Input', componentProps: { slots: { - prepend: () => , - append: () => + prepend: () => , + append: () => } } }, @@ -636,7 +636,7 @@ const schema = reactive([ return null } }, - prefix: () => + prefix: () => } } }, @@ -901,11 +901,11 @@ const schema = reactive([ component: 'Rate', value: null, componentProps: { - voidIcon: , + voidIcon: , icons: [ - , - , - + , + , + ] } }, @@ -1768,7 +1768,7 @@ const schema = reactive([ field: 'field88', component: 'IconPicker', label: t('formDemo.default'), - value: 'tdesign:archway' + value: 'vi-tdesign:archway' }, { field: 'field89', From 88a04404d429e0a7e258fc8974e328dcbc04ae7a Mon Sep 17 00:00:00 2001 From: lt5227 <995362096@qq.com> Date: Thu, 20 Jun 2024 18:05:32 +0800 Subject: [PATCH 02/14] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=9D=83=E9=99=90=E6=97=B6=20id=20=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E5=88=A4=E6=96=AD=E9=94=99=E8=AF=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Authorization/Menu/components/AddButtonPermission.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/Authorization/Menu/components/AddButtonPermission.vue b/src/views/Authorization/Menu/components/AddButtonPermission.vue index 606016a01..32cb3c30f 100644 --- a/src/views/Authorization/Menu/components/AddButtonPermission.vue +++ b/src/views/Authorization/Menu/components/AddButtonPermission.vue @@ -46,6 +46,7 @@ const confirm = async () => { }) if (valid) { const formData = await getFormData() + formData.id = Date.now() emit('confirm', formData) modelValue.value = false } From 5d9ca8ac629adeb3d9c5fbf908502e597da7a168 Mon Sep 17 00:00:00 2001 From: ddup <105873086+clddup@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:32:39 +0800 Subject: [PATCH 03/14] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9C=A8?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E4=B8=AD=E7=BB=99=E6=8C=89=E9=92=AE=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0link=E5=B1=9E=E6=80=A7=E5=90=8E=EF=BC=8C=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E9=A2=9C=E8=89=B2=E5=8F=98=E6=88=90=E7=99=BD=E8=89=B2?= =?UTF-8?q?=20#490?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Button/src/Button.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Button/src/Button.vue b/src/components/Button/src/Button.vue index e5af71b36..c20028c39 100644 --- a/src/components/Button/src/Button.vue +++ b/src/components/Button/src/Button.vue @@ -90,16 +90,16 @@ const props = defineProps({ const emits = defineEmits(['click']) const color = computed(() => { - const { type } = props - if (type === 'primary') { + const { type, link } = props + if (type === 'primary' && !link) { return unref(getTheme).elColorPrimary } return '' }) const style = computed(() => { - const { type } = props - if (type === 'primary') { + const { type, link } = props + if (type === 'primary' && !link) { return '--el-button-text-color: #fff; --el-button-hover-text-color: #fff' } return '' From 574055c2749b9a183af44a0aaacab45f898cfff2 Mon Sep 17 00:00:00 2001 From: "zhu.wei1" <540201731@qq.com> Date: Wed, 26 Jun 2024 16:51:14 +0800 Subject: [PATCH 04/14] =?UTF-8?q?fix:=20=E5=B7=A6=E4=BE=A7=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=94=B6=E8=B5=B7=E5=90=8E=EF=BC=8C=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=9A=84=E5=AD=90=E8=8F=9C=E5=8D=95=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Menu/src/Menu.vue | 7 ++++++- .../Menu/src/components/useRenderMenuItem.tsx | 13 +++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/Menu/src/Menu.vue b/src/components/Menu/src/Menu.vue index d7c69ecb1..56dbf25b3 100644 --- a/src/components/Menu/src/Menu.vue +++ b/src/components/Menu/src/Menu.vue @@ -98,7 +98,7 @@ export default defineComponent({ > {{ default: () => { - const { renderMenuItem } = useRenderMenuItem() + const { renderMenuItem } = useRenderMenuItem(menuMode) return renderMenuItem(unref(routers)) } }} @@ -257,4 +257,9 @@ export default defineComponent({ } } } +@submenu-prefix-cls: ~'@{adminNamespace}-submenu-popper'; +.@{submenu-prefix-cls}--vertical { + overflow-y: auto; + max-height: 100%; +} diff --git a/src/components/Menu/src/components/useRenderMenuItem.tsx b/src/components/Menu/src/components/useRenderMenuItem.tsx index 301313fe3..66c5bf0f3 100644 --- a/src/components/Menu/src/components/useRenderMenuItem.tsx +++ b/src/components/Menu/src/components/useRenderMenuItem.tsx @@ -1,12 +1,17 @@ import { ElSubMenu, ElMenuItem } from 'element-plus' +import { unref } from 'vue' import { hasOneShowingChild } from '../helper' import { isUrl } from '@/utils/is' import { useRenderMenuTitle } from './useRenderMenuTitle' import { pathResolve } from '@/utils/routerHelper' +import { useDesign } from '@/hooks/web/useDesign' + +const { getPrefixCls } = useDesign() +const prefixCls = getPrefixCls('submenu') const { renderMenuTitle } = useRenderMenuTitle() -export const useRenderMenuItem = () => +export const useRenderMenuItem = (menuMode) => // allRouters: AppRouteRecordRaw[] = [], { const renderMenuItem = (routers: AppRouteRecordRaw[], parentPath = '/') => { @@ -33,7 +38,11 @@ export const useRenderMenuItem = () => ) } else { return ( - + {{ title: () => renderMenuTitle(meta), default: () => renderMenuItem(v.children!, fullPath) From e0596ef9f1f3ed022396961bf2a82665bebaecf7 Mon Sep 17 00:00:00 2001 From: "zhu.wei1" <540201731@qq.com> Date: Tue, 2 Jul 2024 09:52:57 +0800 Subject: [PATCH 05/14] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=9D=9E?= =?UTF-8?q?=E4=B8=80=E7=BA=A7=E5=AD=90=E8=8F=9C=E5=8D=95=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF=EF=BC=9B=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1=E6=A0=B7=E5=BC=8F=E5=92=8C=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E6=BB=9A=E5=8A=A8=E6=9D=A1=E6=A0=B7=E5=BC=8F=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Menu/src/Menu.vue | 15 ++++++++++++++- .../Menu/src/components/useRenderMenuItem.tsx | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/components/Menu/src/Menu.vue b/src/components/Menu/src/Menu.vue index 56dbf25b3..083d03c8e 100644 --- a/src/components/Menu/src/Menu.vue +++ b/src/components/Menu/src/Menu.vue @@ -257,9 +257,22 @@ export default defineComponent({ } } } + @submenu-prefix-cls: ~'@{adminNamespace}-submenu-popper'; + +// 设置子菜单溢出时滚动样式 .@{submenu-prefix-cls}--vertical { - overflow-y: auto; max-height: 100%; + overflow-y: auto; + + &::-webkit-scrollbar { + width: 6px; + background-color: transparent; + } + + &::-webkit-scrollbar-thumb { + background-color: rgb(144 147 153 / 30%); + border-radius: 4px; + } } diff --git a/src/components/Menu/src/components/useRenderMenuItem.tsx b/src/components/Menu/src/components/useRenderMenuItem.tsx index 66c5bf0f3..96914cc2f 100644 --- a/src/components/Menu/src/components/useRenderMenuItem.tsx +++ b/src/components/Menu/src/components/useRenderMenuItem.tsx @@ -40,7 +40,7 @@ export const useRenderMenuItem = (menuMode) => return ( {{ From 367b3508e8efaf4b2b8383f44c3fea0e1dd09e8e Mon Sep 17 00:00:00 2001 From: kailong321200875 <321200875@qq.com> Date: Wed, 17 Jul 2024 16:42:51 +0800 Subject: [PATCH 06/14] =?UTF-8?q?docs:=20=E4=BF=AE=E6=94=B9readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++-------- README.zh-CN.md | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index eaefcc042..ab94ab3c6 100644 --- a/README.md +++ b/README.md @@ -137,16 +137,10 @@ If you find this project helpful, welcome sponsorship to show your support~ -## Group - -If you want to join the technical communication group for discussion, please scan the code to join the group or add me as a friend - -### Group QR code - - - ### My QR code +If you have any project cooperation or outsourcing, please scan the code to add me as a friend and leave a note of your purpose. + ## License diff --git a/README.zh-CN.md b/README.zh-CN.md index 3bae52fc9..2b153a67c 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -137,16 +137,10 @@ pnpm run build:pro -## 交流群 - -如果你想进入技术交流群讨论,请扫码加入或者添加我为好友邀请入群 - -### 群二维码 - - - ### 我的二维码 +如有项目合作或项目外包,扫码加我好友,请备注来意。 + ## 许可证 From 15db5e8db3af3d999db0d7ab1c7cf92f9f1446e1 Mon Sep 17 00:00:00 2001 From: kailong321200875 <321200875@qq.com> Date: Thu, 18 Jul 2024 16:56:42 +0800 Subject: [PATCH 07/14] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0eslint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 8 -- .eslintrc.cjs | 71 ---------------- .husky/commit-msg | 2 +- .husky/pre-commit | 2 +- eslint.config.mjs | 81 +++++++++++++++++++ package.json | 67 +++++++-------- .../Descriptions/src/Descriptions.vue | 4 +- .../Table/src/components/ColumnSetting.vue | 2 +- .../UserInfo/src/components/LockPage.vue | 2 +- src/layout/Layout.vue | 5 +- src/utils/index.ts | 1 - src/views/Components/Table/CardTable.vue | 2 +- src/views/Components/Table/DefaultTable.vue | 2 +- .../Components/Table/TableImagePreview.vue | 2 +- .../Components/Table/TableVideoPreview.vue | 2 +- src/views/Dashboard/Workplace.vue | 2 +- src/views/Example/Page/ExampleAdd.vue | 1 - types/env.d.ts | 2 +- vite.config.ts | 2 + 19 files changed, 130 insertions(+), 130 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.cjs create mode 100644 eslint.config.mjs diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 1e85c0fba..000000000 --- a/.eslintignore +++ /dev/null @@ -1,8 +0,0 @@ -/build/ -/config/ -/dist/ -/*.js -/test/unit/coverage/ -/node_modules/* -/dist* -/src/main.ts diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 8068163e4..000000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,71 +0,0 @@ -// @ts-check -const { defineConfig } = require('eslint-define-config') -module.exports = defineConfig({ - root: true, - env: { - browser: true, - node: true, - es6: true - }, - parser: 'vue-eslint-parser', - parserOptions: { - parser: '@typescript-eslint/parser', - ecmaVersion: 2020, - sourceType: 'module', - jsxPragma: 'React', - ecmaFeatures: { - jsx: true - } - }, - extends: [ - 'plugin:vue/vue3-recommended', - 'plugin:@typescript-eslint/recommended', - 'prettier', - 'plugin:prettier/recommended' - ], - rules: { - 'vue/no-setup-props-destructure': 'off', - 'vue/script-setup-uses-vars': 'error', - 'vue/no-reserved-component-names': 'off', - '@typescript-eslint/ban-ts-ignore': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-var-requires': 'off', - '@typescript-eslint/no-empty-function': 'off', - 'vue/custom-event-name-casing': 'off', - 'no-use-before-define': 'off', - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/ban-types': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-unused-vars': 'off', - 'no-unused-vars': 'off', - 'space-before-function-paren': 'off', - - 'vue/attributes-order': 'off', - 'vue/one-component-per-file': 'off', - 'vue/html-closing-bracket-newline': 'off', - 'vue/max-attributes-per-line': 'off', - 'vue/multiline-html-element-content-newline': 'off', - 'vue/singleline-html-element-content-newline': 'off', - 'vue/attribute-hyphenation': 'off', - 'vue/require-default-prop': 'off', - 'vue/require-explicit-emits': 'off', - 'vue/html-self-closing': [ - 'error', - { - html: { - void: 'always', - normal: 'never', - component: 'always' - }, - svg: 'always', - math: 'always' - } - ], - 'vue/multi-word-component-names': 'off', - 'vue/no-v-html': 'off', - 'vue/require-toggle-inside-transition': 'off' - } -}) diff --git a/.husky/commit-msg b/.husky/commit-msg index 10cb55106..c00eb3519 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,4 @@ #!/bin/sh -. "$(dirname "$0")/_/husky.sh" +. "$(dirname "$0")/husky.sh" pnpm commitlint --edit "$1" diff --git a/.husky/pre-commit b/.husky/pre-commit index a6a23182e..ae8ae362b 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1,5 @@ #!/bin/sh -. "$(dirname "$0")/_/husky.sh" +. "$(dirname "$0")/husky.sh" [ -n "$CI" ] && exit 0 diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 000000000..6c8a81fbc --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,81 @@ +// 引入vue模版的eslint +import pluginVue from 'eslint-plugin-vue' +import eslint from '@eslint/js' +// ts-eslint解析器,使 eslint 可以解析 ts 语法 +import tseslint from 'typescript-eslint' +// vue文件解析器 +import vueParser from 'vue-eslint-parser' +import prettier from 'eslint-plugin-prettier' + +export default tseslint.config({ + // ignores: ['node_modules', 'prettier.config.cjs', 'dist*'], + files: ['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.vue'], + // tseslint.config添加了extends扁平函数,直接用。否则是eslint9.0版本是没有extends的 + extends: [ + eslint.configs.recommended, + ...tseslint.configs.recommended, + ...pluginVue.configs['flat/essential'] + ], + plugins: { + prettier + }, + languageOptions: { + parser: vueParser, // 使用vue解析器,这个可以识别vue文件 + parserOptions: { + parser: tseslint.parser, // 在vue文件上使用ts解析器 + sourceType: 'module', + ecmaVersion: 2020, + ecmaFeatures: { + jsx: true + } + } + }, + rules: { + 'prettier/prettier': 'error', + 'no-useless-escape': 0, + 'no-undef': 0, + 'vue/no-setup-props-destructure': 0, + 'vue/script-setup-uses-vars': 1, + 'vue/no-reserved-component-names': 0, + '@typescript-eslint/ban-ts-ignore': 0, + '@typescript-eslint/explicit-function-return-type': 0, + '@typescript-eslint/no-explicit-any': 0, + '@typescript-eslint/no-var-requires': 0, + '@typescript-eslint/no-empty-function': 0, + 'vue/custom-event-name-casing': 0, + 'no-use-before-define': 0, + '@typescript-eslint/no-use-before-define': 0, + '@typescript-eslint/ban-ts-comment': 0, + '@typescript-eslint/ban-types': 0, + '@typescript-eslint/no-non-null-assertion': 0, + '@typescript-eslint/explicit-module-boundary-types': 0, + '@typescript-eslint/no-unused-vars': 0, + 'no-unused-vars': 0, + 'space-before-function-paren': 0, + + 'vue/attributes-order': 0, + 'vue/one-component-per-file': 0, + 'vue/html-closing-bracket-newline': 0, + 'vue/max-attributes-per-line': 0, + 'vue/multiline-html-element-content-newline': 0, + 'vue/singleline-html-element-content-newline': 0, + 'vue/attribute-hyphenation': 0, + 'vue/require-default-prop': 0, + 'vue/require-explicit-emits': 0, + 'vue/html-self-closing': [ + 1, + { + html: { + void: 'always', + normal: 'never', + component: 'always' + }, + svg: 'always', + math: 'always' + } + ], + 'vue/multi-word-component-names': 0, + 'vue/no-v-html': 0, + 'vue/require-toggle-inside-transition': 0 + } +}) diff --git a/package.json b/package.json index c5d80bf38..9bed0cf02 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "npm:check": "pnpx npm-check-updates -u", "clean": "pnpx rimraf node_modules", "clean:cache": "pnpx rimraf node_modules/.cache", - "lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src", + "lint:eslint": "eslint . --fix \"src/**/*.{js,ts,tsx,vue,html}\"", "lint:format": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,vue,html,md}\"", "lint:style": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", "lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.cjs", @@ -30,7 +30,7 @@ "dependencies": { "@iconify/iconify": "^3.1.1", "@iconify/vue": "^4.1.2", - "@vueuse/core": "^10.10.0", + "@vueuse/core": "^10.11.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", "@zxcvbn-ts/core": "^3.0.4", @@ -39,78 +39,79 @@ "cropperjs": "^1.6.2", "dayjs": "^1.11.11", "driver.js": "^1.3.1", - "echarts": "^5.5.0", + "echarts": "^5.5.1", "echarts-wordcloud": "^2.1.0", - "element-plus": "2.7.4", + "element-plus": "2.7.7", "lodash-es": "^4.17.21", "mitt": "^3.0.1", - "monaco-editor": "^0.49.0", + "monaco-editor": "^0.50.0", "nprogress": "^0.2.0", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", "qrcode": "^1.5.3", - "qs": "^6.12.1", + "qs": "^6.12.3", "url": "^0.11.3", - "vue": "3.4.27", - "vue-draggable-plus": "^0.5.0", + "vue": "3.4.32", + "vue-draggable-plus": "^0.5.2", "vue-i18n": "9.13.1", "vue-json-pretty": "^2.4.0", - "vue-router": "^4.3.2", - "vue-types": "^5.1.2", + "vue-router": "^4.4.0", + "vue-types": "^5.1.3", "xgplayer": "^3.0.18" }, "devDependencies": { "@commitlint/cli": "^19.3.0", "@commitlint/config-conventional": "^19.2.2", - "@iconify/json": "^2.2.215", + "@iconify/json": "^2.2.229", "@intlify/unplugin-vue-i18n": "^4.0.0", "@types/fs-extra": "^11.0.4", "@types/inquirer": "^9.0.7", "@types/lodash-es": "^4.17.12", "@types/mockjs": "^1.0.10", - "@types/node": "^20.13.0", + "@types/node": "^20.14.11", "@types/nprogress": "^0.2.3", "@types/qrcode": "^1.5.5", "@types/qs": "^6.9.15", "@types/sortablejs": "^1.15.8", - "@typescript-eslint/eslint-plugin": "^7.11.0", - "@typescript-eslint/parser": "^7.11.0", - "@unocss/transformer-variant-group": "^0.60.4", + "@typescript-eslint/eslint-plugin": "^7.16.1", + "@typescript-eslint/parser": "^7.16.1", + "@unocss/transformer-variant-group": "^0.61.5", "@vitejs/plugin-legacy": "^5.4.1", "@vitejs/plugin-vue": "^5.0.5", "@vitejs/plugin-vue-jsx": "^4.0.0", "autoprefixer": "^10.4.19", "chalk": "^5.3.0", "consola": "^3.2.3", - "eslint": "^8.57.0", + "eslint": "^9.7.0", "eslint-config-prettier": "^9.1.0", "eslint-define-config": "^2.1.0", - "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-vue": "^9.26.0", + "eslint-plugin-prettier": "^5.2.1", + "eslint-plugin-vue": "^9.27.0", "esno": "^4.7.0", "fs-extra": "^11.2.0", - "husky": "^9.0.11", - "inquirer": "^9.2.23", + "husky": "^9.1.0", + "inquirer": "^10.0.3", "less": "^4.2.0", - "lint-staged": "^15.2.5", + "lint-staged": "^15.2.7", "mockjs": "^1.1.0", "plop": "^4.0.1", - "postcss": "^8.4.38", + "postcss": "^8.4.39", "postcss-html": "^1.7.0", "postcss-less": "^6.0.0", - "prettier": "^3.2.5", - "rimraf": "^5.0.7", - "rollup": "^4.18.0", + "prettier": "^3.3.3", + "rimraf": "^6.0.1", + "rollup": "^4.18.1", "rollup-plugin-visualizer": "^5.12.0", - "stylelint": "^16.6.1", + "stylelint": "^16.7.0", "stylelint-config-html": "^1.1.0", - "stylelint-config-recommended": "^14.0.0", - "stylelint-config-standard": "^36.0.0", + "stylelint-config-recommended": "^14.0.1", + "stylelint-config-standard": "^36.0.1", "stylelint-order": "^6.0.4", - "terser": "^5.31.0", - "typescript": "5.4.5", - "unocss": "^0.60.4", - "vite": "5.2.12", + "terser": "^5.31.3", + "typescript": "5.5.3", + "typescript-eslint": "^7.16.1", + "unocss": "^0.61.5", + "vite": "5.3.4", "vite-plugin-ejs": "^1.7.0", "vite-plugin-eslint": "^1.8.1", "vite-plugin-mock": "2.9.6", @@ -119,7 +120,7 @@ "vite-plugin-style-import": "2.0.0", "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-url-copy": "^1.1.4", - "vue-tsc": "^2.0.19" + "vue-tsc": "^2.0.26" }, "packageManager": "pnpm@8.1.0", "engines": { diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue index 2c773b848..a4b222ba8 100644 --- a/src/components/Descriptions/src/Descriptions.vue +++ b/src/components/Descriptions/src/Descriptions.vue @@ -133,7 +133,7 @@ export default defineComponent({
{item.slots?.default ? item.slots?.default(props.data) - : get(props.data, item.field) ?? defaultData} + : (get(props.data, item.field) ?? defaultData)}
) : ( @@ -147,7 +147,7 @@ export default defineComponent({
{item.slots?.default ? item.slots?.default(props.data) - : get(props.data, item.field) ?? defaultData} + : (get(props.data, item.field) ?? defaultData)}
)} diff --git a/src/components/Table/src/components/ColumnSetting.vue b/src/components/Table/src/components/ColumnSetting.vue index bda354573..35595f96b 100644 --- a/src/components/Table/src/components/ColumnSetting.vue +++ b/src/components/Table/src/components/ColumnSetting.vue @@ -50,7 +50,7 @@ const handleCheckedColumnsChange = (value: string[]) => { const confirm = () => { const newColumns = cloneDeep(unref(settingColumns))?.map((item) => { const fixed = unref(settingColumns)?.find((col) => col.field === item.field)?.fixed - item.hidden = !!!unref(checkColumns)?.includes(item.field) + item.hidden = !unref(checkColumns)?.includes(item.field) item.fixed = fixed ? fixed : undefined return item }) diff --git a/src/components/UserInfo/src/components/LockPage.vue b/src/components/UserInfo/src/components/LockPage.vue index cfa44cc1f..1e5c9ef47 100644 --- a/src/components/UserInfo/src/components/LockPage.vue +++ b/src/components/UserInfo/src/components/LockPage.vue @@ -37,7 +37,7 @@ async function unLock() { if (!password.value) { return } - let pwd = password.value + const pwd = password.value try { loading.value = true const res = await lockStore.unLock(pwd) diff --git a/src/layout/Layout.vue b/src/layout/Layout.vue index c807392e9..a49834598 100644 --- a/src/layout/Layout.vue +++ b/src/layout/Layout.vue @@ -27,18 +27,15 @@ const handleClickOutside = () => { } const renderLayout = () => { + const { renderClassic, renderTopLeft, renderTop, renderCutMenu } = useRenderLayout() switch (unref(layout)) { case 'classic': - const { renderClassic } = useRenderLayout() return renderClassic() case 'topLeft': - const { renderTopLeft } = useRenderLayout() return renderTopLeft() case 'top': - const { renderTop } = useRenderLayout() return renderTop() case 'cutMenu': - const { renderCutMenu } = useRenderLayout() return renderCutMenu() default: break diff --git a/src/utils/index.ts b/src/utils/index.ts index de1730557..d91b67917 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -54,7 +54,6 @@ export const getCssVar = (prop: string, dom = document.documentElement) => { * @param {Array} ary 查找的数组 * @param {Functon} fn 判断的方法 */ -// eslint-disable-next-line export const findIndex = (ary: Array, fn: Fn): number => { if (ary.findIndex) { return ary.findIndex(fn) diff --git a/src/views/Components/Table/CardTable.vue b/src/views/Components/Table/CardTable.vue index 19849f110..f07059d07 100644 --- a/src/views/Components/Table/CardTable.vue +++ b/src/views/Components/Table/CardTable.vue @@ -15,7 +15,7 @@ const { t } = useI18n() const loading = ref(true) -let tableDataList = ref([]) +const tableDataList = ref([]) const getTableList = async (params?: Params) => { const res = await getCardTableListApi( diff --git a/src/views/Components/Table/DefaultTable.vue b/src/views/Components/Table/DefaultTable.vue index 974c896f1..1d9124a88 100644 --- a/src/views/Components/Table/DefaultTable.vue +++ b/src/views/Components/Table/DefaultTable.vue @@ -68,7 +68,7 @@ const columns: TableColumn[] = [ const loading = ref(true) -let tableDataList = ref([]) +const tableDataList = ref([]) const getTableList = async (params?: Params) => { const res = await getTableListApi( diff --git a/src/views/Components/Table/TableImagePreview.vue b/src/views/Components/Table/TableImagePreview.vue index 97b6c1735..ded2d6d81 100644 --- a/src/views/Components/Table/TableImagePreview.vue +++ b/src/views/Components/Table/TableImagePreview.vue @@ -54,7 +54,7 @@ const columns: TableColumn[] = [ const loading = ref(true) -let tableDataList = ref([]) +const tableDataList = ref([]) const getTableList = async (params?: Params) => { const res = await getTableListApi( diff --git a/src/views/Components/Table/TableVideoPreview.vue b/src/views/Components/Table/TableVideoPreview.vue index 94aafc433..a6607b08c 100644 --- a/src/views/Components/Table/TableVideoPreview.vue +++ b/src/views/Components/Table/TableVideoPreview.vue @@ -38,7 +38,7 @@ const columns: TableColumn[] = [ const loading = ref(true) -let tableDataList = ref([]) +const tableDataList = ref([]) const getTableList = async (params?: Params) => { const res = await getTableListApi( diff --git a/src/views/Dashboard/Workplace.vue b/src/views/Dashboard/Workplace.vue index d8adac71b..4e0bd80e0 100644 --- a/src/views/Dashboard/Workplace.vue +++ b/src/views/Dashboard/Workplace.vue @@ -66,7 +66,7 @@ const getTeam = async () => { } // 获取指数 -let radarOptionData = reactive(radarOption) as EChartsOption +const radarOptionData = reactive(radarOption) as EChartsOption const getRadar = async () => { const res = await getRadarApi().catch(() => {}) diff --git a/src/views/Example/Page/ExampleAdd.vue b/src/views/Example/Page/ExampleAdd.vue index 1c4e3b8d6..fbe7460d6 100644 --- a/src/views/Example/Page/ExampleAdd.vue +++ b/src/views/Example/Page/ExampleAdd.vue @@ -49,4 +49,3 @@ const save = async () => { -@/hooks/event/useEventBus diff --git a/types/env.d.ts b/types/env.d.ts index 6687edd11..38117253d 100644 --- a/types/env.d.ts +++ b/types/env.d.ts @@ -2,7 +2,7 @@ declare module '*.vue' { import { DefineComponent } from 'vue' - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types + const component: DefineComponent<{}, {}, any> export default component } diff --git a/vite.config.ts b/vite.config.ts index 72b788a52..749c3c1ae 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -61,6 +61,8 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { : undefined, EslintPlugin({ cache: false, + failOnWarning: false, + failOnError: false, include: ['src/**/*.vue', 'src/**/*.ts', 'src/**/*.tsx'] // 检查的文件 }), VueI18nPlugin({ From 7b8e58e0ec81e99517cbca41e04930f013773380 Mon Sep 17 00:00:00 2001 From: kailong321200875 <321200875@qq.com> Date: Fri, 19 Jul 2024 10:42:46 +0800 Subject: [PATCH 08/14] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dhusky=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/commit-msg | 5 +---- .husky/pre-commit | 8 +------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index c00eb3519..34eed8b28 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/husky.sh" - -pnpm commitlint --edit "$1" +npx --no -- commitlint --edit $1 \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit index ae8ae362b..d96ed69c6 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,8 +1,2 @@ -#!/bin/sh -. "$(dirname "$0")/husky.sh" - -[ -n "$CI" ] && exit 0 - -# Format and submit code according to lintstagedrc.js configuration npm run ts:check -npm run lint:lint-staged +npm run lint:lint-staged \ No newline at end of file From 54fbe0ec8331f52d0a231b72e5191aaa2cb9d08d Mon Sep 17 00:00:00 2001 From: sixiTr Date: Mon, 19 Aug 2024 17:25:23 +0800 Subject: [PATCH 09/14] =?UTF-8?q?fixs:Form=E7=BB=84=E4=BB=B6=E4=B8=8B?= =?UTF-8?q?=E7=9A=84initModel,=E5=88=A0=E9=99=A4model=20=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E7=9A=84=20field=E6=9C=AA=E5=85=BC=E5=AE=B9n?= =?UTF-8?q?umber=E7=B1=BB=E5=9E=8B0=E7=9A=84=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Form/src/helper/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Form/src/helper/index.ts b/src/components/Form/src/helper/index.ts index dc5258947..3ddb1b43a 100644 --- a/src/components/Form/src/helper/index.ts +++ b/src/components/Form/src/helper/index.ts @@ -161,7 +161,7 @@ export const initModel = (schema: FormSchema[], formModel: Recordable) => { // 如果 schema 对应的 field 不存在,则删除 model 中的对应的 field for (let i = 0; i < schema.length; i++) { const key = schema[i].field - if (!get(model, key)) { + if (!get(model, key) && get(model, key) !== 0) { delete model[key] } } From a27b14e7ffeeeae6a212f262d20303db02b017f1 Mon Sep 17 00:00:00 2001 From: preschooler Date: Sun, 25 Aug 2024 14:41:30 +0800 Subject: [PATCH 10/14] =?UTF-8?q?feat:=20=E5=85=A8=E5=B1=80=E9=BB=98?= =?UTF-8?q?=E8=AE=A4box-sizing:=20border-box;=E9=99=8D=E4=BD=8E=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E5=B8=83=E5=B1=80=E9=9A=BE=E5=BA=A6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TagsView/src/TagsView.vue | 2 +- src/layout/components/AppView.vue | 2 +- src/styles/var.css | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/TagsView/src/TagsView.vue b/src/components/TagsView/src/TagsView.vue index 8c64a5005..da3336bea 100644 --- a/src/components/TagsView/src/TagsView.vue +++ b/src/components/TagsView/src/TagsView.vue @@ -514,7 +514,7 @@ watch( &__item { position: relative; - top: 2px; + top: 3px; height: calc(~'100% - 6px'); padding-right: 25px; margin-left: 4px; diff --git a/src/layout/components/AppView.vue b/src/layout/components/AppView.vue index 05d2ae6f8..f0c305a42 100644 --- a/src/layout/components/AppView.vue +++ b/src/layout/components/AppView.vue @@ -18,7 +18,7 @@ const getCaches = computed((): string[] => {