diff --git a/.husky/lintstagedrc.js b/.husky/lintstagedrc.js index 17f682153..08d8c9e81 100644 --- a/.husky/lintstagedrc.js +++ b/.husky/lintstagedrc.js @@ -3,6 +3,6 @@ module.exports = { '{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': ['prettier --write--parser json'], 'package.json': ['prettier --write'], '*.vue': ['eslint --fix', 'prettier --write', 'stylelint --fix'], - '*.{scss,less,styl,css,html}': ['stylelint --fix', 'prettier --write'], + '*.{scss,less,styl,html}': ['stylelint --fix', 'prettier --write'], '*.md': ['prettier --write'], }; diff --git a/build/vite/plugin/html.ts b/build/vite/plugin/html.ts index 2d776d601..dec546cd7 100644 --- a/build/vite/plugin/html.ts +++ b/build/vite/plugin/html.ts @@ -12,7 +12,7 @@ import { GLOB_CONFIG_FILE_NAME } from '../../constant'; export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) { const { VITE_GLOB_APP_TITLE, VITE_PUBLIC_PATH } = env; - const path = VITE_PUBLIC_PATH?.endsWith('/') ? VITE_PUBLIC_PATH : `${VITE_PUBLIC_PATH}/`; + const path = VITE_PUBLIC_PATH.endsWith('/') ? VITE_PUBLIC_PATH : `${VITE_PUBLIC_PATH}/`; const getAppConfigSrc = () => { return `${path || '/'}${GLOB_CONFIG_FILE_NAME}?v=${pkg.version}-${new Date().getTime()}`; diff --git a/build/vite/plugin/visualizer.ts b/build/vite/plugin/visualizer.ts index 59a3b7e5a..75d4451eb 100644 --- a/build/vite/plugin/visualizer.ts +++ b/build/vite/plugin/visualizer.ts @@ -9,9 +9,7 @@ export function configVisualizerConfig() { return visualizer({ filename: './node_modules/.cache/visualizer/stats.html', open: true, - // @ts-ignore gzipSize: true, - // @ts-ignore brotliSize: true, }) as Plugin; } diff --git a/package.json b/package.json index bab261e1e..6f459b372 100644 --- a/package.json +++ b/package.json @@ -70,13 +70,12 @@ "@types/nprogress": "^0.2.0", "@types/qrcode": "^1.4.0", "@types/qs": "^6.9.6", - "@types/rollup-plugin-visualizer": "^2.6.0", "@types/sortablejs": "^1.10.6", "@typescript-eslint/eslint-plugin": "^4.20.0", "@typescript-eslint/parser": "^4.20.0", "@vitejs/plugin-legacy": "^1.3.2", "@vitejs/plugin-vue": "^1.2.1", - "@vitejs/plugin-vue-jsx": "^1.1.2", + "@vitejs/plugin-vue-jsx": "^1.1.3", "@vue/compiler-sfc": "3.0.10", "autoprefixer": "^10.2.5", "commitizen": "^4.2.3", @@ -100,7 +99,7 @@ "prettier": "^2.2.1", "pretty-quick": "^3.1.0", "rimraf": "^3.0.2", - "rollup-plugin-visualizer": "4.2.2", + "rollup-plugin-visualizer": "5.0.4", "stylelint": "^13.12.0", "stylelint-config-prettier": "^8.0.2", "stylelint-config-standard": "^21.0.0", @@ -111,18 +110,19 @@ "vite-plugin-compression": "^0.2.3", "vite-plugin-html": "^2.0.3", "vite-plugin-imagemin": "^0.2.9", - "vite-plugin-mock": "^2.4.1", + "vite-plugin-mock": "^2.4.2", "vite-plugin-purge-icons": "^0.7.0", "vite-plugin-pwa": "^0.6.4", "vite-plugin-style-import": "^0.9.1", "vite-plugin-svg-icons": "^0.4.0", "vite-plugin-theme": "^0.5.0", - "vite-plugin-windicss": "0.10.4", + "vite-plugin-windicss": "0.11.4", "vue-eslint-parser": "^7.6.0" }, "resolutions": { "//": "Used to install imagemin dependencies, because imagemin may not be installed in China.If it is abroad, you can delete it", - "bin-wrapper": "npm:bin-wrapper-china" + "bin-wrapper": "npm:bin-wrapper-china", + "rollup": "^2.44.0" }, "repository": { "type": "git", diff --git a/src/main.ts b/src/main.ts index b31c78cc8..aa5bf5441 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,14 +1,6 @@ import '/@/design/index.less'; import '@virtual/windi.css'; -// Do not introduce` on-demand in local development? -// In the local development for on-demand introduction, the number of browser requests will increase by about 20%. -// Which may slow down the browser refresh. -// Therefore, all are introduced in local development, and only introduced on demand in the production environment -if (import.meta.env.DEV) { - import('ant-design-vue/dist/antd.less'); -} - import { createApp } from 'vue'; import App from './App.vue'; @@ -25,6 +17,14 @@ import '/@/router/guard'; // Register icon Sprite import 'vite-plugin-svg-icons/register'; +// Do not introduce` on-demand in local development? +// In the local development for on-demand introduction, the number of browser requests will increase by about 20%. +// Which may slow down the browser refresh. +// Therefore, all are introduced in local development, and only introduced on demand in the production environment +if (import.meta.env.DEV) { + import('ant-design-vue/dist/antd.less'); +} + (async () => { const app = createApp(App); // Register global components diff --git a/src/views/dashboard/analysis/components/GrowCard.vue b/src/views/dashboard/analysis/components/GrowCard.vue index 760ff7d1a..5c1c5dea7 100644 --- a/src/views/dashboard/analysis/components/GrowCard.vue +++ b/src/views/dashboard/analysis/components/GrowCard.vue @@ -5,7 +5,7 @@ size="small" :loading="$attrs.loading" :title="item.title" - class="md:w-1/4 w-full md:mt-0 !mt-4" + class="md:w-1/4 w-full !md:mt-0 !mt-4" :class="[index + 1 < 4 && '!md:mr-4']" :canExpan="false" > diff --git a/src/views/sys/about/index.vue b/src/views/sys/about/index.vue index 8573729c8..403185264 100644 --- a/src/views/sys/about/index.vue +++ b/src/views/sys/about/index.vue @@ -9,9 +9,9 @@ - - - + + +