From ce6be02a152c9920e6af68616c4e0c395427dc99 Mon Sep 17 00:00:00 2001 From: xingyu Date: Thu, 21 Sep 2023 15:30:12 +0800 Subject: [PATCH] refactor: use unocss --- .vscode/extensions.json | 1 + .vscode/settings.json | 11 ++- .../Application/src/AppDarkModeToggle.vue | 28 +++----- .../src/search/AppSearchFooter.vue | 14 +--- src/components/Basic/src/BasicHelp.vue | 23 ++---- .../ContextMenu/src/ContextMenu.vue | 2 +- src/components/CronTab/src/CronTabInput.vue | 24 +------ src/components/Cropper/src/CropperAvatar.vue | 9 +-- .../Drawer/src/components/DrawerFooter.vue | 32 +++------ .../Drawer/src/components/DrawerHeader.vue | 36 ++-------- .../Form/src/components/FileUpload.vue | 8 +-- .../src/components/VFormCreate/index.vue | 8 +-- .../VFormDesign/components/FormOptions.vue | 33 +-------- .../components/ImportJsonModal.vue | 8 +-- .../VFormDesign/components/PreviewCode.vue | 16 +---- .../src/components/VFormDesign/index.vue | 22 +----- src/components/Page/src/PageFooter.vue | 18 +---- src/components/Table/src/BasicTable.vue | 2 +- src/design/index.less | 1 - src/layouts/default/footer/index.vue | 42 ++--------- .../header/components/notify/NoticeList.vue | 70 +++---------------- .../header/components/notify/index.vue | 2 - src/layouts/default/index.vue | 22 +----- .../setting/components/InputNumberItem.vue | 20 +----- .../default/setting/components/SelectItem.vue | 21 +----- .../setting/components/SettingFooter.vue | 14 +--- .../default/setting/components/SwitchItem.vue | 14 +--- src/views/base/login/Login.vue | 5 +- src/views/base/login/SessionTimeoutLogin.vue | 16 +---- src/views/base/profile/AccountBind.vue | 17 +---- src/views/base/profile/BaseSetting.vue | 13 +--- src/views/base/profile/MsgNotify.vue | 10 +-- src/views/base/profile/SecureSetting.vue | 13 +--- src/views/base/profile/index.vue | 18 +---- .../bpm/processInstance/create/index.vue | 10 +-- src/views/infra/codegen/EditTable.vue | 10 +-- .../codegen/components/BasicInfoForm.vue | 42 +++-------- .../codegen/components/CloumInfoForm.vue | 39 +++-------- .../infra/codegen/components/FinishForm.vue | 14 +--- 39 files changed, 112 insertions(+), 596 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 5d7e57f3..0127df89 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -6,6 +6,7 @@ "stylelint.vscode-stylelint", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode", + "usernamehw.errorlens", "mrmlnc.vscode-less", "lokalise.i18n-ally", "redhat.vscode-yaml", diff --git a/.vscode/settings.json b/.vscode/settings.json index f45d23cf..81f0295e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -66,6 +66,12 @@ "source.fixAll.eslint": true, "source.organizeImports": false }, + "eslint.rules.customizations": [ + { + "rule": "@stylistic/*", + "severity": "off" + } + ], "eslint.validate": [ "javascript", "javascriptreact", @@ -82,7 +88,7 @@ "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" }, "[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" @@ -166,6 +172,9 @@ "*.env": "$(capture).env.*", "package.json": ".hintrc,pnpm-lock.yaml,yarn.lock,LICENSE,README*,CHANGELOG*,CNAME,.gitattributes,.gitignore,prettier.config.js,stylelint.config.js,commitlint.config.js,.stylelintignore,.prettierignore,.gitpod.yml,.eslintrc.js,.eslintignore" }, + "eslint.codeAction.showDocumentation": { + "enable": true + }, "terminal.integrated.scrollback": 10000, "nuxt.isNuxtApp": false } diff --git a/src/components/Application/src/AppDarkModeToggle.vue b/src/components/Application/src/AppDarkModeToggle.vue index 1a51fcad..7cde953f 100644 --- a/src/components/Application/src/AppDarkModeToggle.vue +++ b/src/components/Application/src/AppDarkModeToggle.vue @@ -29,8 +29,14 @@ function toggleDarkMode() { - - diff --git a/src/components/FormDesign/src/components/VFormDesign/components/ImportJsonModal.vue b/src/components/FormDesign/src/components/VFormDesign/components/ImportJsonModal.vue index e7e5a486..8a5f2700 100644 --- a/src/components/FormDesign/src/components/VFormDesign/components/ImportJsonModal.vue +++ b/src/components/FormDesign/src/components/VFormDesign/components/ImportJsonModal.vue @@ -109,7 +109,7 @@ defineExpose({ showModal }) 取消 - - diff --git a/src/components/FormDesign/src/components/VFormDesign/components/PreviewCode.vue b/src/components/FormDesign/src/components/VFormDesign/components/PreviewCode.vue index 171564a3..44db4897 100644 --- a/src/components/FormDesign/src/components/VFormDesign/components/PreviewCode.vue +++ b/src/components/FormDesign/src/components/VFormDesign/components/PreviewCode.vue @@ -72,10 +72,10 @@ export default defineComponent({
-
+
- - diff --git a/src/components/FormDesign/src/components/VFormDesign/index.vue b/src/components/FormDesign/src/components/VFormDesign/index.vue index c9eb7bad..8f27b905 100644 --- a/src/components/FormDesign/src/components/VFormDesign/index.vue +++ b/src/components/FormDesign/src/components/VFormDesign/index.vue @@ -19,7 +19,6 @@ import PropsPanel from './modules/PropsPanel.vue' import ImportJsonModal from './components/ImportJsonModal.vue' import CodeModal from './components/CodeModal.vue' import { globalConfigState } from './config/formItemPropsConfig' -import { useDesign } from '@/hooks/web/useDesign' import { CollapseContainer } from '@/components/Container/index' import 'codemirror/mode/javascript/javascript' @@ -29,7 +28,6 @@ defineProps({ default: 'v-form-antd表单设计器', }, }) -const { prefixCls } = useDesign('form-design') // 子组件实例 const propsPanel = ref(null) const jsonModal = ref(null) @@ -251,7 +249,7 @@ provide('formDesignMethods', { - - diff --git a/src/components/Page/src/PageFooter.vue b/src/components/Page/src/PageFooter.vue index 31eda4c8..8932ed26 100644 --- a/src/components/Page/src/PageFooter.vue +++ b/src/components/Page/src/PageFooter.vue @@ -9,8 +9,8 @@ const { getCalcContentWidth } = useMenuSetting()