From 8a9ca498d70a0a4f66c073fe869fc6d8a3e79a55 Mon Sep 17 00:00:00 2001 From: Vben <anncwb@126.com> Date: 星期四, 25 二月 2021 20:25:02 +0800 Subject: [PATCH] chore: remove useless code --- src/store/modules/app.ts | 2 src/hooks/setting/index.ts | 44 ++-- src/utils/domUtils.ts | 4 mock/_createProductionServer.ts | 1 src/components/Tinymce/src/Editor.vue | 6 build/vite/plugin/pwa.ts | 3 src/layouts/default/tabs/useMultipleTabs.ts | 2 src/types/config.d.ts | 97 ++++----- build/script/buildConf.ts | 10 src/hooks/web/useApexCharts.ts | 9 build/vite/plugin/index.ts | 2 build/typeing.d.ts | 2 src/router/index.ts | 9 build/tsconfig.json | 1 src/logics/initAppConfig.ts | 2 src/utils/cache/persistent.ts | 0 src/hooks/web/useSortable.ts | 8 src/utils/env.ts | 9 src/utils/uuid.ts | 2 build/vite/plugin/windicss.ts | 4 mock/_util.ts | 6 src/store/modules/user.ts | 3 src/hooks/web/useLockPage.ts | 6 build/getConfigFileName.ts | 2 build/utils.ts | 14 - src/utils/index.ts | 1 src/views/sys/lock/index.vue | 11 src/router/helper/menuHelper.ts | 6 yarn.lock | 256 +++++++++--------------- stylelint.config.js | 2 package.json | 13 build/script/postBuild.ts | 1 src/hooks/web/usePermission.ts | 2 src/store/modules/lock.ts | 2 34 files changed, 234 insertions(+), 308 deletions(-) diff --git a/build/getShortName.ts b/build/getConfigFileName.ts similarity index 74% rename from build/getShortName.ts rename to build/getConfigFileName.ts index b46205f..d61cd41 100644 --- a/build/getShortName.ts +++ b/build/getConfigFileName.ts @@ -2,7 +2,7 @@ * Get the configuration file variable name * @param env */ -export const getShortName = (env: any) => { +export const getConfigFileName = (env: Record<string, any>) => { return `__PRODUCTION__${env.VITE_GLOB_APP_SHORT_NAME || '__APP'}__CONF__` .toUpperCase() .replace(/\s/g, ''); diff --git a/build/script/buildConf.ts b/build/script/buildConf.ts index 3c044df..a44a1d8 100644 --- a/build/script/buildConf.ts +++ b/build/script/buildConf.ts @@ -5,8 +5,8 @@ import fs, { writeFileSync } from 'fs-extra'; import chalk from 'chalk'; -import { getCwdPath, getEnvConfig } from '../utils'; -import { getShortName } from '../getShortName'; +import { getRootPath, getEnvConfig } from '../utils'; +import { getConfigFileName } from '../getConfigFileName'; import pkg from '../../package.json'; @@ -27,8 +27,8 @@ writable: false, }); `.replace(/\s/g, ''); - fs.mkdirp(getCwdPath(OUTPUT_DIR)); - writeFileSync(getCwdPath(`${OUTPUT_DIR}/${configFileName}`), configStr); + fs.mkdirp(getRootPath(OUTPUT_DIR)); + writeFileSync(getRootPath(`${OUTPUT_DIR}/${configFileName}`), configStr); console.log(chalk.cyan(`鉁� [${pkg.name}]`) + ` - configuration file is build successfully:`); console.log(chalk.gray(OUTPUT_DIR + '/' + chalk.green(configFileName)) + '\n'); @@ -39,6 +39,6 @@ export function runBuildConfig() { const config = getEnvConfig(); - const configFileName = getShortName(config); + const configFileName = getConfigFileName(config); createConfig({ config, configName: configFileName }); } diff --git a/build/script/postBuild.ts b/build/script/postBuild.ts index 0f809a8..094bb06 100644 --- a/build/script/postBuild.ts +++ b/build/script/postBuild.ts @@ -14,6 +14,7 @@ if (!argvList.includes('no-conf')) { await runBuildConfig(); } + console.log(`鉁� ${chalk.cyan(`[${pkg.name}]`)}` + ' - build successfully!'); } catch (error) { console.log(chalk.red('vite build error:\n' + error)); diff --git a/build/tsconfig.json b/build/tsconfig.json index 5f9bb94..1ffedd0 100644 --- a/build/tsconfig.json +++ b/build/tsconfig.json @@ -5,7 +5,6 @@ "moduleResolution": "node", "strict": true, "forceConsistentCasingInFileNames": true, - "jsx": "react", "baseUrl": ".", "esModuleInterop": true, "noUnusedLocals": true, diff --git a/build/typeing.d.ts b/build/typeing.d.ts index 0421b72..3f221c7 100644 --- a/build/typeing.d.ts +++ b/build/typeing.d.ts @@ -2,3 +2,5 @@ const src: any; export default src; } + +declare type Recordable = Record<string, any>; diff --git a/build/utils.ts b/build/utils.ts index 0236ea6..d5e95e3 100644 --- a/build/utils.ts +++ b/build/utils.ts @@ -2,12 +2,6 @@ import path from 'path'; import dotenv from 'dotenv'; -export const isFunction = (arg: unknown): arg is (...args: any[]) => any => - typeof arg === 'function'; - -export const isRegExp = (arg: unknown): arg is RegExp => - Object.prototype.toString.call(arg) === '[object RegExp]'; - export function isDevFn(mode: string): boolean { return mode === 'development'; } @@ -34,18 +28,18 @@ VITE_USE_CDN: boolean; VITE_DROP_CONSOLE: boolean; VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none'; - VITE_DYNAMIC_IMPORT: boolean; VITE_LEGACY: boolean; VITE_USE_IMAGEMIN: boolean; } // Read all environment variable configuration files to process.env -export function wrapperEnv(envConf: any): ViteEnv { +export function wrapperEnv(envConf: Recordable): ViteEnv { const ret: any = {}; for (const envName of Object.keys(envConf)) { let realName = envConf[envName].replace(/\\n/g, '\n'); realName = realName === 'true' ? true : realName === 'false' ? false : realName; + if (envName === 'VITE_PORT') { realName = Number(realName); } @@ -70,10 +64,10 @@ confFiles.forEach((item) => { try { const env = dotenv.parse(fs.readFileSync(path.resolve(process.cwd(), item))); - envConfig = { ...envConfig, ...env }; } catch (error) {} }); + Object.keys(envConfig).forEach((key) => { const reg = new RegExp(`^(${match})`); if (!reg.test(key)) { @@ -87,6 +81,6 @@ * Get user root directory * @param dir file path */ -export function getCwdPath(...dir: string[]) { +export function getRootPath(...dir: string[]) { return path.resolve(process.cwd(), ...dir); } diff --git a/build/vite/plugin/index.ts b/build/vite/plugin/index.ts index f1e5a14..6260453 100644 --- a/build/vite/plugin/index.ts +++ b/build/vite/plugin/index.ts @@ -1,4 +1,5 @@ import type { Plugin } from 'vite'; +import type { ViteEnv } from '../../utils'; import vue from '@vitejs/plugin-vue'; import vueJsx from '@vitejs/plugin-vue-jsx'; @@ -6,7 +7,6 @@ import PurgeIcons from 'vite-plugin-purge-icons'; -import { ViteEnv } from '../../utils'; import { configHtmlPlugin } from './html'; import { configPwaConfig } from './pwa'; import { configMockPlugin } from './mock'; diff --git a/build/vite/plugin/pwa.ts b/build/vite/plugin/pwa.ts index f273017..3d62faa 100644 --- a/build/vite/plugin/pwa.ts +++ b/build/vite/plugin/pwa.ts @@ -2,10 +2,9 @@ * Zero-config PWA for Vite * https://github.com/antfu/vite-plugin-pwa */ +import type { ViteEnv } from '../../utils'; import { VitePWA } from 'vite-plugin-pwa'; - -import { ViteEnv } from '../../utils'; export function configPwaConfig(env: ViteEnv) { const { VITE_USE_PWA, VITE_GLOB_APP_TITLE, VITE_GLOB_APP_SHORT_NAME } = env; diff --git a/build/vite/plugin/windicss.ts b/build/vite/plugin/windicss.ts index 0ba949e..c972c9c 100644 --- a/build/vite/plugin/windicss.ts +++ b/build/vite/plugin/windicss.ts @@ -1,7 +1,7 @@ -import windiCSS from 'vite-plugin-windicss'; - import type { Plugin } from 'vite'; +import windiCSS from 'vite-plugin-windicss'; + export function configWindiCssPlugin(): Plugin[] { return windiCSS({ safelist: 'no-select', diff --git a/mock/_createProductionServer.ts b/mock/_createProductionServer.ts index a44310b..6ac92ff 100644 --- a/mock/_createProductionServer.ts +++ b/mock/_createProductionServer.ts @@ -1,5 +1,6 @@ import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'; +// @ts-ignore const modules = import.meta.globEager('./**/*.ts'); const mockModules: any[] = []; diff --git a/mock/_util.ts b/mock/_util.ts index 912c544..c59be9d 100644 --- a/mock/_util.ts +++ b/mock/_util.ts @@ -18,13 +18,11 @@ const pageData = pagination(page, pageSize, list); return { - code: 0, - result: { + ...resultSuccess({ items: pageData, total: list.length, - }, + }), message, - type: 'success', }; } diff --git a/package.json b/package.json index 5960a6d..d62eb2a 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "vben-admin", "version": "2.0.1", "scripts": { + "bootstrap": "yarn install", "serve": "vite", "dev": "vite", "build": "vite build && esno ./build/script/postBuild.ts", @@ -9,9 +10,9 @@ "report": "cross-env REPORT=true npm run build ", "preview": "npm run build && vite preview", "preview:dist": "vite preview", - "log": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0", + "log": "conventional-changelog -p angular -i CHANGELOG.md -s", "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite", - "clean:lib": "npx rimraf node_modules", + "clean:lib": "rimraf node_modules", "lint:eslint": "eslint \"{src,mock}/**/*.{vue,ts,tsx}\" --fix", "lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", "lint:stylelint": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", @@ -39,8 +40,8 @@ "qrcode": "^1.4.4", "sortablejs": "^1.13.0", "vditor": "^3.8.1", - "vue": "^3.0.6", - "vue-i18n": "9.0.0-rc.7", + "vue": "3.0.5", + "vue-i18n": "9.0.0-rc.8", "vue-router": "^4.0.4", "vue-types": "^3.0.2", "vuex": "^4.0.0", @@ -50,7 +51,7 @@ "devDependencies": { "@commitlint/cli": "^12.0.0", "@commitlint/config-conventional": "^12.0.0", - "@iconify/json": "^1.1.307", + "@iconify/json": "^1.1.308", "@ls-lint/ls-lint": "^1.9.2", "@purge-icons/generated": "^0.7.0", "@types/fs-extra": "^9.0.7", @@ -68,7 +69,7 @@ "@vitejs/plugin-legacy": "^1.3.1", "@vitejs/plugin-vue": "^1.1.4", "@vitejs/plugin-vue-jsx": "^1.1.2", - "@vue/compiler-sfc": "^3.0.6", + "@vue/compiler-sfc": "3.0.5", "autoprefixer": "^10.2.4", "commitizen": "^4.2.3", "conventional-changelog-cli": "^2.1.1", diff --git a/src/components/Tinymce/src/Editor.vue b/src/components/Tinymce/src/Editor.vue index e44d720..ee46ed5 100644 --- a/src/components/Tinymce/src/Editor.vue +++ b/src/components/Tinymce/src/Editor.vue @@ -26,7 +26,7 @@ import plugins from './plugins'; import { getTinymce } from './getTinymce'; import { useScript } from '/@/hooks/web/useScript'; - import { snowUuid } from '/@/utils/uuid'; + import { shortUuid } from '/@/utils/uuid'; import { bindHandlers } from './helper'; import lineHeight from './lineHeight'; import { onMountedOrActivated } from '/@/hooks/core/onMountedOrActivated'; @@ -45,7 +45,7 @@ emits: ['change', 'update:modelValue'], setup(props, { emit, attrs }) { const editorRef = ref<any>(null); - const tinymceId = ref<string>(snowUuid('tiny-vue')); + const tinymceId = ref<string>(shortUuid('tiny-vue')); const elRef = ref<Nullable<HTMLElement>>(null); const { prefixCls } = useDesign('tinymce-container'); @@ -104,7 +104,7 @@ } ); onMountedOrActivated(() => { - tinymceId.value = snowUuid('tiny-vue'); + tinymceId.value = shortUuid('tiny-vue'); nextTick(() => { init(); }); diff --git a/src/hooks/setting/index.ts b/src/hooks/setting/index.ts index 464838d..cb2b0c2 100644 --- a/src/hooks/setting/index.ts +++ b/src/hooks/setting/index.ts @@ -1,33 +1,33 @@ import type { ProjectConfig, GlobConfig, GlobEnvConfig } from '/@/types/config'; +import { getConfigFileName } from '../../../build/getConfigFileName'; + import getProjectSetting from '/@/settings/projectSetting'; -import { getShortName } from '../../../build/getShortName'; import { warn } from '/@/utils/log'; import { getGlobEnvConfig, isDevMode } from '/@/utils/env'; -const reg = /[a-zA-Z\_]*/; - -const ENV_NAME = getShortName(import.meta.env); -const ENV = ((isDevMode() - ? getGlobEnvConfig() - : window[ENV_NAME as any]) as unknown) as GlobEnvConfig; - -const { - VITE_GLOB_APP_TITLE, - VITE_GLOB_API_URL, - VITE_GLOB_APP_SHORT_NAME, - VITE_GLOB_API_URL_PREFIX, - VITE_GLOB_UPLOAD_URL, -} = ENV; - -if (!reg.test(VITE_GLOB_APP_SHORT_NAME)) { - warn( - `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.` - ); -} - export const useGlobSetting = (): Readonly<GlobConfig> => { + const ENV_NAME = getConfigFileName(import.meta.env); + + const ENV = ((isDevMode() + ? getGlobEnvConfig() + : window[ENV_NAME as any]) as unknown) as GlobEnvConfig; + + const { + VITE_GLOB_APP_TITLE, + VITE_GLOB_API_URL, + VITE_GLOB_APP_SHORT_NAME, + VITE_GLOB_API_URL_PREFIX, + VITE_GLOB_UPLOAD_URL, + } = ENV; + + if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) { + warn( + `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.` + ); + } + // Take global configuration const glob: Readonly<GlobConfig> = { title: VITE_GLOB_APP_TITLE, diff --git a/src/hooks/web/useApexCharts.ts b/src/hooks/web/useApexCharts.ts index 34fb20e..cbee7b7 100644 --- a/src/hooks/web/useApexCharts.ts +++ b/src/hooks/web/useApexCharts.ts @@ -2,8 +2,6 @@ import { tryOnUnmounted } from '/@/utils/helper/vueHelper'; import { unref, Ref, nextTick } from 'vue'; -import ApexCharts from 'apexcharts'; - interface CallBackFn { (instance: Nullable<ApexCharts>): void; } @@ -13,21 +11,22 @@ function setOptions(options: any, callback?: CallBackFn) { nextTick(() => { - useTimeoutFn(() => { + useTimeoutFn(async () => { const el = unref(elRef); if (!el || !unref(el)) return; + const ApexCharts = await (await import('apexcharts')).default; chartInstance = new ApexCharts(el, options); chartInstance && chartInstance.render(); - // setOptions澧炲姞callback鏂规硶锛岃繑鍥瀋hartInstance锛屼互渚夸簬瀵瑰浘琛ㄨ繘琛屽啀鎿嶄綔锛屼緥濡傝皟鐢╱pdateOptions鏂规硶鏇存柊鍥捐〃 + // The callback method is added to setOptions to return the chartInstance to facilitate the re-operation of the chart, such as calling the updateOptions method to update the chart callback && callback(chartInstance); }, 30); }); } - // 鏂板璋冪敤ApexCharts鐨剈pdateOptions鏂规硶鏇存柊鍥捐〃 + // Call the updateOptions method of ApexCharts to update the chart function updateOptions( chartInstance: Nullable<ApexCharts>, options: any, diff --git a/src/hooks/web/useLockPage.ts b/src/hooks/web/useLockPage.ts index 335e0a2..9c2e211 100644 --- a/src/hooks/web/useLockPage.ts +++ b/src/hooks/web/useLockPage.ts @@ -65,9 +65,3 @@ } }); } - -export const getIsLock = computed(() => { - const { getLockInfo } = lockStore; - const { isLock } = getLockInfo; - return isLock; -}); diff --git a/src/hooks/web/usePermission.ts b/src/hooks/web/usePermission.ts index c35409b..35b1d71 100644 --- a/src/hooks/web/usePermission.ts +++ b/src/hooks/web/usePermission.ts @@ -40,7 +40,7 @@ resetRouter(); const routes = await permissionStore.buildRoutesAction(id); routes.forEach((route) => { - router.addRoute(route as RouteRecordRaw); + router.addRoute((route as unknown) as RouteRecordRaw); }); permissionStore.commitLastBuildMenuTimeState(); const { closeAll } = useTabs(); diff --git a/src/hooks/web/useSortable.ts b/src/hooks/web/useSortable.ts index 9cb1f7a..4c66b6a 100644 --- a/src/hooks/web/useSortable.ts +++ b/src/hooks/web/useSortable.ts @@ -1,11 +1,13 @@ -import Sortable from 'sortablejs'; import { nextTick, unref } from 'vue'; import type { Ref } from 'vue'; +import type { Options } from 'sortablejs'; -export function useSortable(el: HTMLElement | Ref<HTMLElement>, options?: Sortable.Options) { +export function useSortable(el: HTMLElement | Ref<HTMLElement>, options?: Options) { function initSortable() { - nextTick(() => { + nextTick(async () => { if (!el) return; + + const Sortable = (await import('sortablejs')).default; Sortable.create(unref(el), { animation: 500, delay: 400, diff --git a/src/layouts/default/tabs/useMultipleTabs.ts b/src/layouts/default/tabs/useMultipleTabs.ts index a15b217..2305268 100644 --- a/src/layouts/default/tabs/useMultipleTabs.ts +++ b/src/layouts/default/tabs/useMultipleTabs.ts @@ -43,7 +43,7 @@ addAffixTabs(); isAddAffix = true; } - return affixList.value.map((item) => item.meta?.title).filter(Boolean); + return affixList.value.map((item) => item.meta?.title).filter(Boolean) as string[]; } export function useTabsDrag(affixTextList: string[]) { diff --git a/src/logics/initAppConfig.ts b/src/logics/initAppConfig.ts index 1b51e92..c49b1a1 100644 --- a/src/logics/initAppConfig.ts +++ b/src/logics/initAppConfig.ts @@ -7,7 +7,7 @@ import { PROJ_CFG_KEY } from '/@/enums/cacheEnum'; import projectSetting from '/@/settings/projectSetting'; -import { getLocal } from '/@/utils/helper/persistent'; +import { getLocal } from '/@/utils/cache/persistent'; import { updateHeaderBgColor, updateSidebarBgColor } from '/@/logics/theme/updateBackground'; import { updateColorWeak } from '/@/logics/theme/updateColorWeak'; import { updateGrayMode } from '/@/logics/theme/updateGrayMode'; diff --git a/src/router/helper/menuHelper.ts b/src/router/helper/menuHelper.ts index 8152018..da48abc 100644 --- a/src/router/helper/menuHelper.ts +++ b/src/router/helper/menuHelper.ts @@ -46,12 +46,6 @@ const cloneRouteModList = cloneDeep(routeModList); const routeList: AppRouteRecordRaw[] = []; - // cloneRouteModList = filter(cloneRouteModList, (node) => { - // if (Reflect.has(node?.meta ?? {}, 'hideMenu')) { - // return !node?.meta.hideMenu; - // } - // return true; - // }); cloneRouteModList.forEach((item) => { if (item.meta?.single) { const realItem = item?.children?.[0]; diff --git a/src/router/index.ts b/src/router/index.ts index db95b62..2c5f150 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -3,9 +3,8 @@ import { createRouter, createWebHashHistory } from 'vue-router'; -import { createGuard } from './guard/'; - -import { basicRoutes } from './routes/'; +import { createGuard } from './guard'; +import { basicRoutes } from './routes'; import { REDIRECT_NAME } from './constant'; // app router @@ -32,9 +31,5 @@ app.use(router); createGuard(router); } - -// router.onError((error) => { -// console.error(error); -// }); export default router; diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index a184dc6..a311695 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -6,7 +6,7 @@ import { PROJ_CFG_KEY } from '/@/enums/cacheEnum'; import { hotModuleUnregisterModule } from '/@/utils/helper/vuexHelper'; -import { setLocal, getLocal, clearSession, clearLocal } from '/@/utils/helper/persistent'; +import { setLocal, getLocal, clearSession, clearLocal } from '/@/utils/cache/persistent'; import { deepMerge } from '/@/utils'; import { resetRouter } from '/@/router'; diff --git a/src/store/modules/lock.ts b/src/store/modules/lock.ts index c88d1bb..74c37ec 100644 --- a/src/store/modules/lock.ts +++ b/src/store/modules/lock.ts @@ -4,7 +4,7 @@ import { LOCK_INFO_KEY } from '/@/enums/cacheEnum'; import { hotModuleUnregisterModule } from '/@/utils/helper/vuexHelper'; -import { setLocal, getLocal, removeLocal } from '/@/utils/helper/persistent'; +import { setLocal, getLocal, removeLocal } from '/@/utils/cache/persistent'; import { userStore } from './user'; diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 5b5e13f..579f839 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -18,7 +18,7 @@ import { loginApi, getUserInfoById } from '/@/api/sys/user'; -import { setLocal, getLocal, getSession, setSession } from '/@/utils/helper/persistent'; +import { setLocal, getLocal, getSession, setSession } from '/@/utils/cache/persistent'; import { useProjectSetting } from '/@/hooks/setting'; import { useI18n } from '/@/hooks/web/useI18n'; import { ErrorMessageMode } from '/@/utils/http/axios/types'; @@ -37,7 +37,6 @@ function setCache(USER_INFO_KEY: string, info: any) { if (!info) return; - // const fn = permissionCacheType === CacheTypeEnum.LOCAL ? setLocal : setSession; setLocal(USER_INFO_KEY, info, true); // TODO setSession(USER_INFO_KEY, info, true); diff --git a/src/types/config.d.ts b/src/types/config.d.ts index ea9fc2e..e0f4394 100644 --- a/src/types/config.d.ts +++ b/src/types/config.d.ts @@ -6,9 +6,10 @@ RouterTransitionEnum, SettingButtonPositionEnum, } from '/@/enums/appEnum'; + import { CacheTypeEnum } from '/@/enums/cacheEnum'; import type { LocaleType } from '/@/locales/types'; -import { ThemeMode } from '../../build/config/lessModifyVars'; +import { ThemeMode } from '../../build/config/themeConfig'; export interface MenuSetting { bgColor: string; @@ -32,16 +33,10 @@ } export interface MultiTabsSetting { - // 鏄惁鏄剧ず show: boolean; - // 寮�鍚揩閫熸搷浣� showQuick: boolean; canDrag: boolean; - - // 鏄剧ず鍒锋柊鎸夐挳 showRedo: boolean; - - // 鏄剧ず鎶樺彔鎸夐挳 showFold: boolean; } @@ -50,16 +45,14 @@ fixed: boolean; show: boolean; theme: ThemeEnum; - - // 鏄剧ず鍏ㄥ睆鎸夐挳 + // Turn on full screen showFullScreen: boolean; - // 寮�鍚叏灞忓姛鑳� + // Whether to show the lock screen useLockPage: boolean; - // 鏄剧ず鏂囨。鎸夐挳 + // Show document button showDoc: boolean; - // 鏄剧ず娑堟伅涓績鎸夐挳 + // Show message center button showNotice: boolean; - showSearch: boolean; } @@ -76,96 +69,90 @@ export interface TransitionSetting { // Whether to open the page switching animation enable: boolean; - // Route basic switching animation basicTransition: RouterTransitionEnum; - // Whether to open page switching loading openPageLoading: boolean; - // Whether to open the top progress bar openNProgress: boolean; } export interface ProjectConfig { + // Multilingual configuration locale: LocaleSetting; - + // Storage location of permission related information permissionCacheType: CacheTypeEnum; - - // 鏄惁鏄剧ず閰嶇疆鎸夐挳 + // Whether to show the configuration button showSettingButton: boolean; + // Configure where the button is displayed settingButtonPosition: SettingButtonPositionEnum; - // 鏉冮檺妯″紡 + // Permission mode permissionMode: PermissionModeEnum; - // 缃戠珯鐏拌壊妯″紡锛岀敤浜庡彲鑳芥偧蹇电殑鏃ユ湡寮�鍚� + // Website gray mode, open for possible mourning dates grayMode: boolean; - // 鏄惁寮�鍚壊寮辨ā寮� + // Whether to turn on the color weak mode colorWeak: boolean; - // 涓婚鑹� + // Theme color themeColor: string; + themeMode: ThemeMode; - // 鍏ㄥ睆鏄剧ず涓荤晫闈�,涓嶆樉绀鸿彍鍗�,鍙婇《閮� + // The main interface is displayed in full screen, the menu is not displayed, and the top fullContent: boolean; - // 鍖哄煙瀹藉害 + // content width contentMode: ContentEnum; - // 鏄惁鏄剧ずlogo + // Whether to display the logo showLogo: boolean; + // Whether to show the global footer showFooter: boolean; - headerSetting: HeaderSetting; - // 鑿滃崟绫诲瀷 // menuType: MenuTypeEnum; + headerSetting: HeaderSetting; + // menuSetting menuSetting: MenuSetting; - - // 澶氭爣绛鹃〉璁剧疆 + // Multi-tab settings multiTabsSetting: MultiTabsSetting; - + // Animation configuration transitionSetting: TransitionSetting; - - // pageLayout鏄惁寮�鍚痥eep-alive + // pageLayout whether to enable keep-alive openKeepAlive: boolean; - - // - // 閿佸睆鏃堕棿 + // Lock screen time lockTime: number; - // 鏄剧ず闈㈠寘灞� + // Show breadcrumbs showBreadCrumb: boolean; - // 鏄剧ず闈㈠寘灞戝浘鏍� + // Show breadcrumb icon showBreadCrumbIcon: boolean; - // 浣跨敤error-handler-plugin + // Use error-handler-plugin useErrorHandle: boolean; - // 鏄惁寮�鍚洖鍒伴《閮� + // Whether to open back to top useOpenBackTop: boolean; - // 鏄惁鍙互宓屽叆iframe椤甸潰 + // Is it possible to embed iframe pages canEmbedIFramePage: boolean; - // 鍒囨崲鐣岄潰鐨勬椂鍊欐槸鍚﹀垹闄ゆ湭鍏抽棴鐨刴essage鍙妌otify + // Whether to delete unclosed messages and notify when switching the interface closeMessageOnSwitch: boolean; - // 鍒囨崲鐣岄潰鐨勬椂鍊欐槸鍚﹀彇娑堝凡缁忓彂閫佷絾鏄湭鍝嶅簲鐨刪ttp璇锋眰銆� + // Whether to cancel the http request that has been sent but not responded when switching the interface. removeAllHttpPending: boolean; } export interface GlobConfig { - // 缃戠珯鏍囬 + // Site title title: string; - // 椤圭洰璺緞 + // Service interface url apiUrl: string; + // Upload url uploadUrl?: string; + // Service interface url prefix urlPrefix?: string; + // Project abbreviation shortName: string; } export interface GlobEnvConfig { - // 缃戠珯鏍囬 + // Site title VITE_GLOB_APP_TITLE: string; - // 椤圭洰璺緞 + // Service interface url VITE_GLOB_API_URL: string; + // Service interface url prefix VITE_GLOB_API_URL_PREFIX?: string; + // Project abbreviation VITE_GLOB_APP_SHORT_NAME: string; + // Upload url VITE_GLOB_UPLOAD_URL?: string; -} - -interface GlobWrap { - globSetting: Readonly<GlobConfig>; -} - -interface ProjectSettingWrap { - projectSetting: Readonly<ProjectConfig>; } diff --git a/src/utils/helper/persistent.ts b/src/utils/cache/persistent.ts similarity index 100% rename from src/utils/helper/persistent.ts rename to src/utils/cache/persistent.ts diff --git a/src/utils/domUtils.ts b/src/utils/domUtils.ts index 2e98d75..80a77a5 100644 --- a/src/utils/domUtils.ts +++ b/src/utils/domUtils.ts @@ -16,9 +16,9 @@ return element.getBoundingClientRect(); } -const trim = function (string: string) { +function trim(string: string) { return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, ''); -}; +} /* istanbul ignore next */ export function hasClass(el: Element, cls: string) { diff --git a/src/utils/env.ts b/src/utils/env.ts index ffeff00..b7a0006 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -1,5 +1,8 @@ import type { GlobEnvConfig } from '/@/types/config'; +import { useGlobSetting } from '/@/hooks/setting'; +import pkg from '../../package.json'; + /** * Get the global configuration (the configuration will be extracted independently when packaging) */ @@ -8,6 +11,12 @@ return (env as unknown) as GlobEnvConfig; } +// Generate cache key according to version +export function getStorageShortName() { + const globSetting = useGlobSetting(); + return `${globSetting.shortName}__${getEnv()}${`__${pkg.version}`}__`.toUpperCase(); +} + /** * @description: Development model */ diff --git a/src/utils/index.ts b/src/utils/index.ts index af210fa..b9fb89d 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -4,6 +4,7 @@ export const clamp = (n: number, min: number, max: number) => Math.min(max, Math.max(min, n)); export const noop = () => {}; export const now = () => Date.now(); + /** * @description: Set ui mount node */ diff --git a/src/utils/uuid.ts b/src/utils/uuid.ts index e08a458..9678327 100644 --- a/src/utils/uuid.ts +++ b/src/utils/uuid.ts @@ -20,7 +20,7 @@ } let unique = 0; -export function snowUuid(prefix = ''): string { +export function shortUuid(prefix = ''): string { const time = Date.now(); const random = Math.floor(Math.random() * 1000000000); unique++; diff --git a/src/views/sys/lock/index.vue b/src/views/sys/lock/index.vue index 56ff7fd..20519a1 100644 --- a/src/views/sys/lock/index.vue +++ b/src/views/sys/lock/index.vue @@ -4,13 +4,20 @@ </transition> </template> <script lang="ts"> - import { defineComponent } from 'vue'; + import { defineComponent, computed } from 'vue'; import LockPage from './LockPage.vue'; - import { getIsLock } from '/@/hooks/web/useLockPage'; + + import { lockStore } from '/@/store/modules/lock'; export default defineComponent({ name: 'Lock', components: { LockPage }, setup() { + const getIsLock = computed(() => { + const { getLockInfo } = lockStore; + const { isLock } = getLockInfo; + return isLock; + }); + return { getIsLock }; }, }); diff --git a/stylelint.config.js b/stylelint.config.js index f76f740..8b4d4ae 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -28,6 +28,7 @@ ignore: ['after-comment', 'first-nested'], }, ], + 'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }], // Specify the alphabetical order of the attributes in the declaration block 'order/properties-order': [ 'position', @@ -178,4 +179,5 @@ 'speak', ], }, + ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'], }; diff --git a/yarn.lock b/yarn.lock index 336f845..fb40a6d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1118,48 +1118,48 @@ dependencies: cross-fetch "^3.0.6" -"@iconify/json@^1.1.307": - version "1.1.307" - resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.307.tgz#db97e8faba1183e0411471dafe210deba0cc1fe2" - integrity sha512-2hyKd4DKGWNtQ9CNC4s7tRzMHyDai3GnARC26nGZo7f4/r86FTspvjCEbqpbuM5spJ1fn5jx00Iv4Qee89ooRA== +"@iconify/json@^1.1.308": + version "1.1.308" + resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.308.tgz#162210182c14af4eb217f19e1a1707b787aca2aa" + integrity sha512-zoVnvr5A1tpuTCzuw5EvRcWYV5rcmWLGLhEzg9+SuRAXWyT2st0ShF8hYbeHzm+MJHhJWodHVfsTu2DkshMX2g== -"@intlify/core-base@9.0.0-rc.7": - version "9.0.0-rc.7" - resolved "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.0.0-rc.7.tgz#664e58d0c24465d19fb84d65be2bc4c4735c2b4e" - integrity sha512-jYF6kQpSCeBXprZRcggGV/YQAwqXRWo2MtcdkPfZf0cP26Yx12UeFF0Uk5W5M/cgts3ktkhF/CzvxtXP1mevlQ== +"@intlify/core-base@9.0.0-rc.8": + version "9.0.0-rc.8" + resolved "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.0.0-rc.8.tgz#674b88c313cbe471bb66f52dd0907106b01e1c38" + integrity sha512-Nwj2GTZN7gOiN7uGgAeaaJAho/UamkXTheMrdjLrj7FPjE3d1oiSeB3fBgobJxzpyBRjhmjUmpPCEs1afokSxQ== dependencies: - "@intlify/message-compiler" "9.0.0-rc.7" - "@intlify/message-resolver" "9.0.0-rc.7" - "@intlify/runtime" "9.0.0-rc.7" - "@intlify/shared" "9.0.0-rc.7" + "@intlify/message-compiler" "9.0.0-rc.8" + "@intlify/message-resolver" "9.0.0-rc.8" + "@intlify/runtime" "9.0.0-rc.8" + "@intlify/shared" "9.0.0-rc.8" -"@intlify/message-compiler@9.0.0-rc.7": - version "9.0.0-rc.7" - resolved "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.0.0-rc.7.tgz#383459a96220536ad675b77fef2d3f3f652d5647" - integrity sha512-T8cPzSkNV0KHtLokQW8hBHMlqYcpknJy8JygwA4R6guiO2G9eyUdZ+rswDq5vrGfSIUglgHYusoIvOhFyQpkpQ== +"@intlify/message-compiler@9.0.0-rc.8": + version "9.0.0-rc.8" + resolved "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.0.0-rc.8.tgz#b2c291b728858aa6fa57b6329a806c1accc8450b" + integrity sha512-vtKk5z7ovenLUXMGHVUyS+snEYrTpHT4o6bQyjPeEL3BoXcVyHlLKIHXNJ6QzlHVQN8aN1bWyj3rMf9ZKEZF3A== dependencies: - "@intlify/message-resolver" "9.0.0-rc.7" - "@intlify/shared" "9.0.0-rc.7" + "@intlify/message-resolver" "9.0.0-rc.8" + "@intlify/shared" "9.0.0-rc.8" source-map "0.6.1" -"@intlify/message-resolver@9.0.0-rc.7": - version "9.0.0-rc.7" - resolved "https://registry.npmjs.org/@intlify/message-resolver/-/message-resolver-9.0.0-rc.7.tgz#f41a552c7dd1c85f7042478bf264b0459c376376" - integrity sha512-d0Jz0OWiH7jYTDk4VzTnVroJ2eylQUgVIk+2ztNJAHsrKoy3wxq6Tw/GlIGOrVJCFqZLWuxg7dmuhZDd4fliTw== +"@intlify/message-resolver@9.0.0-rc.8": + version "9.0.0-rc.8" + resolved "https://registry.npmjs.org/@intlify/message-resolver/-/message-resolver-9.0.0-rc.8.tgz#09382e6390298d6786cc53c483d4240e4654ec17" + integrity sha512-8Qqh23yN3sM/hIZKIgJ1S6a9mNm1LVeUxkjhHdfyGV84P6G3Q9bgwCSenX1BKuUrVUJfK45FUkg87BZnUd2Qpg== -"@intlify/runtime@9.0.0-rc.7": - version "9.0.0-rc.7" - resolved "https://registry.npmjs.org/@intlify/runtime/-/runtime-9.0.0-rc.7.tgz#81ed1602447c387476aeaf6eea7ff0608768f67e" - integrity sha512-SdM9Gqca4W+u/O6XHqDf38UwoiopbyRtUnnqWy5DGihbE1CTKlFZSGPMx95cLOVt0AIeVK/eRwclxLiRtQRM7A== +"@intlify/runtime@9.0.0-rc.8": + version "9.0.0-rc.8" + resolved "https://registry.npmjs.org/@intlify/runtime/-/runtime-9.0.0-rc.8.tgz#be5d1c776bba2678b51c3c0492d4676a910921ca" + integrity sha512-ZK0eZwZQ6wb3nxUPc+WYSebnswSSt/lRJotmaVdcmS+tT9/FFz6PJ9pO0nNFV/cGn0uEGW92buldCiNVKA5aHg== dependencies: - "@intlify/message-compiler" "9.0.0-rc.7" - "@intlify/message-resolver" "9.0.0-rc.7" - "@intlify/shared" "9.0.0-rc.7" + "@intlify/message-compiler" "9.0.0-rc.8" + "@intlify/message-resolver" "9.0.0-rc.8" + "@intlify/shared" "9.0.0-rc.8" -"@intlify/shared@9.0.0-rc.7": - version "9.0.0-rc.7" - resolved "https://registry.npmjs.org/@intlify/shared/-/shared-9.0.0-rc.7.tgz#4bab9e58bbb09bc690fd953d1e83d9026e3a3893" - integrity sha512-ynMHCCcBPtQAdJlOUMzrlvUp+DdKlnB0yrkPPMzAs8bBETwJbAK1Jq6zBHlMZzscPcF+1ia5pj4Gmmn7QL9b8w== +"@intlify/shared@9.0.0-rc.8": + version "9.0.0-rc.8" + resolved "https://registry.npmjs.org/@intlify/shared/-/shared-9.0.0-rc.8.tgz#0b1b387a3237d4ae95496e8ae60cec267625f55d" + integrity sha512-HH05+lD4A9q6F0VLbGY5eZmmCbfaBMuCSSQXmrGgegtsRVu7WFiUMQLNsouN1UtHabOJC9PQarxKwfTzdHyN6Q== "@ls-lint/ls-lint@^1.9.2": version "1.9.2" @@ -1626,17 +1626,6 @@ estree-walker "^2.0.1" source-map "^0.6.1" -"@vue/compiler-core@3.0.6": - version "3.0.6" - resolved "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.6.tgz#265bbe0711a81ab4c1344f8294e22e2d08ca167d" - integrity sha512-O7QzQ39DskOoPpEDWRvKwDX7Py9UNT7SvLHvBdIfckGA3OsAEBdiAtuYQNcVmUDeBajm+08v5wyvHWBbWgkilQ== - dependencies: - "@babel/parser" "^7.12.0" - "@babel/types" "^7.12.0" - "@vue/shared" "3.0.6" - estree-walker "^2.0.1" - source-map "^0.6.1" - "@vue/compiler-dom@3.0.5": version "3.0.5" resolved "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.5.tgz#7885a13e6d18f64dde8ebceec052ed2c102696c2" @@ -1645,43 +1634,35 @@ "@vue/compiler-core" "3.0.5" "@vue/shared" "3.0.5" -"@vue/compiler-dom@3.0.6": - version "3.0.6" - resolved "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.6.tgz#f94c3959320a1252915bd02b943f96a7ee3fc951" - integrity sha512-q1wfHzYwvDRAhBlx+Qa+n3Bu5nHr1qL/j0UbpNlbQDwIlt9zpvmXUrUCL+i55Bh5lLKvSe+mNo0qlwNEApm+jA== - dependencies: - "@vue/compiler-core" "3.0.6" - "@vue/shared" "3.0.6" - -"@vue/compiler-sfc@^3.0.6": - version "3.0.6" - resolved "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.0.6.tgz#3945f73a93d52868799f1e332a75bb8849976ac9" - integrity sha512-g1tkswnhtiJpj4ELQ3SzeGxtOd0t8E5GkT+n2VlElEnTI1BzueSvr41D5QthnUS+TNWZd52ZnPtdaNz+Lfum1w== +"@vue/compiler-sfc@3.0.5": + version "3.0.5" + resolved "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.0.5.tgz#3ae08e60244a72faf9598361874fb7bdb5b1d37c" + integrity sha512-uOAC4X0Gx3SQ9YvDC7YMpbDvoCmPvP0afVhJoxRotDdJ+r8VO3q4hFf/2f7U62k4Vkdftp6DVni8QixrfYzs+w== dependencies: "@babel/parser" "^7.12.0" "@babel/types" "^7.12.0" - "@vue/compiler-core" "3.0.6" - "@vue/compiler-dom" "3.0.6" - "@vue/compiler-ssr" "3.0.6" - "@vue/shared" "3.0.6" + "@vue/compiler-core" "3.0.5" + "@vue/compiler-dom" "3.0.5" + "@vue/compiler-ssr" "3.0.5" + "@vue/shared" "3.0.5" consolidate "^0.16.0" estree-walker "^2.0.1" hash-sum "^2.0.0" lru-cache "^5.1.1" magic-string "^0.25.7" merge-source-map "^1.1.0" - postcss "^8.1.10" - postcss-modules "^4.0.0" + postcss "^7.0.32" + postcss-modules "^3.2.2" postcss-selector-parser "^6.0.4" source-map "^0.6.1" -"@vue/compiler-ssr@3.0.6": - version "3.0.6" - resolved "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.0.6.tgz#7156361e4c465cbee2723275edc61e940678e47c" - integrity sha512-Y4amPwRevUiiNQDho0cq1Ith9q6UU5N6CD6YiXkHIboFPeXEiGvH3ULJWjFzlGqn1eUV1AReNJpFJrhjtQNc7g== +"@vue/compiler-ssr@3.0.5": + version "3.0.5" + resolved "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.0.5.tgz#7661ad891a0be948726c7f7ad1e425253c587b83" + integrity sha512-Wm//Kuxa1DpgjE4P9W0coZr8wklOfJ35Jtq61CbU+t601CpPTK4+FL2QDBItaG7aoUUDCWL5nnxMkuaOgzTBKg== dependencies: - "@vue/compiler-dom" "3.0.6" - "@vue/shared" "3.0.6" + "@vue/compiler-dom" "3.0.5" + "@vue/shared" "3.0.5" "@vue/devtools-api@^6.0.0-beta.5": version "6.0.0-beta.7" @@ -1695,13 +1676,6 @@ dependencies: "@vue/shared" "3.0.5" -"@vue/reactivity@3.0.6": - version "3.0.6" - resolved "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.6.tgz#7b16f3d5d04cc55028085fff0bb8475cc0e32991" - integrity sha512-hX8PnZayNMoljWSYrZW0OclQnRaMoHxvi5eeFVFPDr7+tzBeiftmmozKttxxCLoDxBWX1B4gNc237DIcYU63Lw== - dependencies: - "@vue/shared" "3.0.6" - "@vue/runtime-core@3.0.5": version "3.0.5" resolved "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.5.tgz#da6331d5f300d5794e9e0ebdc8a8bd72a9e19962" @@ -1709,14 +1683,6 @@ dependencies: "@vue/reactivity" "3.0.5" "@vue/shared" "3.0.5" - -"@vue/runtime-core@3.0.6": - version "3.0.6" - resolved "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.6.tgz#d16779b5664593f1d25be677fb1b1968024aa532" - integrity sha512-x6N38P0DeMyrHiAxCE/rACHTyydOzlg8IyUIPkSJ4rrSkuJnAtFKQicK6fm8NuD21dwdPr8KcZ4Cn4xaqL1JJg== - dependencies: - "@vue/reactivity" "3.0.6" - "@vue/shared" "3.0.6" "@vue/runtime-dom@3.0.5": version "3.0.5" @@ -1727,24 +1693,10 @@ "@vue/shared" "3.0.5" csstype "^2.6.8" -"@vue/runtime-dom@3.0.6": - version "3.0.6" - resolved "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.6.tgz#e7d6c61913d871f1f020a9a81b558c8fcbeba8c6" - integrity sha512-Y6y4Tak9//VXB2mp2NVQxbwC4a5xsnJpotpo8yBAB3qB3L4v4HQLpqxSkwThRwI6Y6Z7dydX/sgfraqLBE8BWg== - dependencies: - "@vue/runtime-core" "3.0.6" - "@vue/shared" "3.0.6" - csstype "^2.6.8" - "@vue/shared@3.0.5": version "3.0.5" resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.0.5.tgz#c131d88bd6713cc4d93b3bb1372edb1983225ff0" integrity sha512-gYsNoGkWejBxNO6SNRjOh/xKeZ0H0V+TFzaPzODfBjkAIb0aQgBuixC1brandC/CDJy1wYPwSoYrXpvul7m6yw== - -"@vue/shared@3.0.6": - version "3.0.6" - resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.0.6.tgz#d65576430fc4ad383dc7c829118798e5169178d4" - integrity sha512-c37C60HpelUZIx+SNZVEINSxkFzQYhIXFg5AynnIA4QDBmY4iSPoACfGSwSUTCTKImukPeCgY2oqRJVP3R1Mnw== "@vueuse/core@^4.2.2": version "4.2.2" @@ -4865,10 +4817,12 @@ resolved "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0= -icss-utils@^5.0.0: - version "5.1.0" - resolved "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" - integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== +icss-utils@^4.0.0, icss-utils@^4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" + integrity sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA== + dependencies: + postcss "^7.0.14" ieee754@^1.1.13: version "1.2.1" @@ -6907,46 +6861,52 @@ resolved "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" integrity sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ= -postcss-modules-extract-imports@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d" - integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== - -postcss-modules-local-by-default@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c" - integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ== +postcss-modules-extract-imports@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" + integrity sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ== dependencies: - icss-utils "^5.0.0" + postcss "^7.0.5" + +postcss-modules-local-by-default@^3.0.2: + version "3.0.3" + resolved "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz#bb14e0cc78279d504dbdcbfd7e0ca28993ffbbb0" + integrity sha512-e3xDq+LotiGesympRlKNgaJ0PCzoUIdpH0dj47iWAui/kyTgh3CiAr1qP54uodmJhl6p9rN6BoNcdEDVJx9RDw== + dependencies: + icss-utils "^4.1.1" + postcss "^7.0.32" postcss-selector-parser "^6.0.2" postcss-value-parser "^4.1.0" -postcss-modules-scope@^3.0.0: +postcss-modules-scope@^2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" + integrity sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ== + dependencies: + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" + +postcss-modules-values@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06" - integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== + resolved "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz#5b5000d6ebae29b4255301b4a3a54574423e7f10" + integrity sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg== dependencies: - postcss-selector-parser "^6.0.4" + icss-utils "^4.0.0" + postcss "^7.0.6" -postcss-modules-values@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c" - integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== - dependencies: - icss-utils "^5.0.0" - -postcss-modules@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.0.0.tgz#2bc7f276ab88f3f1b0fadf6cbd7772d43b5f3b9b" - integrity sha512-ghS/ovDzDqARm4Zj6L2ntadjyQMoyJmi0JkLlYtH2QFLrvNlxH5OAVRPWPeKilB0pY7SbuhO173KOWkPAxRJcw== +postcss-modules@^3.2.2: + version "3.2.2" + resolved "https://registry.npmjs.org/postcss-modules/-/postcss-modules-3.2.2.tgz#ee390de0f9f18e761e1778dfb9be26685c02c51f" + integrity sha512-JQ8IAqHELxC0N6tyCg2UF40pACY5oiL6UpiqqcIFRWqgDYO8B0jnxzoQ0EOpPrWXvcpu6BSbQU/3vSiq7w8Nhw== dependencies: generic-names "^2.0.1" icss-replace-symbols "^1.1.0" lodash.camelcase "^4.3.0" - postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.0" - postcss-modules-scope "^3.0.0" - postcss-modules-values "^4.0.0" + postcss "^7.0.32" + postcss-modules-extract-imports "^2.0.0" + postcss-modules-local-by-default "^3.0.2" + postcss-modules-scope "^2.2.0" + postcss-modules-values "^3.0.0" string-hash "^1.1.1" postcss-resolve-nested-selector@^0.1.1: @@ -6976,7 +6936,7 @@ dependencies: postcss "^7.0.6" -postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: +postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: version "6.0.4" resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz#56075a1380a04604c38b063ea7767a129af5c2b3" integrity sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw== @@ -7004,7 +6964,7 @@ resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== -postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.26, postcss@^7.0.31, postcss@^7.0.32, postcss@^7.0.35, postcss@^7.0.6: +postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.26, postcss@^7.0.31, postcss@^7.0.32, postcss@^7.0.35, postcss@^7.0.5, postcss@^7.0.6: version "7.0.35" resolved "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24" integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== @@ -7012,15 +6972,6 @@ chalk "^2.4.2" source-map "^0.6.1" supports-color "^6.1.0" - -postcss@^8.1.10: - version "8.2.6" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.2.6.tgz#5d69a974543b45f87e464bc4c3e392a97d6be9fe" - integrity sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg== - dependencies: - colorette "^1.2.1" - nanoid "^3.1.20" - source-map "^0.6.1" postcss@^8.2.1: version "8.2.4" @@ -9049,13 +9000,13 @@ esquery "^1.4.0" lodash "^4.17.15" -vue-i18n@9.0.0-rc.7: - version "9.0.0-rc.7" - resolved "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.0.0-rc.7.tgz#4097dfaa0d66319bbcd9fe5fb22c4b72e97720b5" - integrity sha512-weNLPLqGiitziBUpGQHyxYlhuw447yR4EcsvmqUX3MocIKciv6OMHKxUguCFC1m1ZRCzHQwik7fz+Q8u4UmEdQ== +vue-i18n@9.0.0-rc.8: + version "9.0.0-rc.8" + resolved "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.0.0-rc.8.tgz#36d022516cf2527ce02eecf9de116b978e163da3" + integrity sha512-WQC9q0UG1lbk+naBBoVTrJjHPZfHP6Pid35Ek9AkCxUcXolW1pXUCQg1gIMF8I0obxLd/fSx9GuOWrB/aaU3aQ== dependencies: - "@intlify/core-base" "9.0.0-rc.7" - "@intlify/shared" "9.0.0-rc.7" + "@intlify/core-base" "9.0.0-rc.8" + "@intlify/shared" "9.0.0-rc.8" "@vue/devtools-api" "^6.0.0-beta.5" vue-router@^4.0.4: @@ -9077,7 +9028,7 @@ dependencies: is-plain-object "3.0.1" -vue@^3.0.0: +vue@3.0.5, vue@^3.0.0: version "3.0.5" resolved "https://registry.npmjs.org/vue/-/vue-3.0.5.tgz#de1b82eba24abfe71e0970fc9b8d4b2babdc3fe1" integrity sha512-TfaprOmtsAfhQau7WsomXZ8d9op/dkQLNIq8qPV3A0Vxs6GR5E+c1rfJS1SDkXRQj+dFyfnec7+U0Be1huiScg== @@ -9085,15 +9036,6 @@ "@vue/compiler-dom" "3.0.5" "@vue/runtime-dom" "3.0.5" "@vue/shared" "3.0.5" - -vue@^3.0.6: - version "3.0.6" - resolved "https://registry.npmjs.org/vue/-/vue-3.0.6.tgz#2c16ed4bb66f16d6c6f6eaa3b7d5835a76598049" - integrity sha512-fgjbe/+f1EsqG7ZbaFSnxdzQXF2DKoFCdJlPxZZJy9XMtyXS6SY8pGzLi8WYb4zmsPLHvTZz4bHW30kFDk7vfA== - dependencies: - "@vue/compiler-dom" "3.0.6" - "@vue/runtime-dom" "3.0.6" - "@vue/shared" "3.0.6" vuex-module-decorators@^1.0.1: version "1.0.1" -- Gitblit v1.8.0