diff --git a/.vscode/launch.json b/.vscode/launch.json index 384f3bec..72e95d0d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,6 +8,6 @@ "url": "http://localhost:3100", "webRoot": "${workspaceFolder}/src", "sourceMaps": true - }, + } ] } diff --git a/README.zh-CN.md b/README.zh-CN.md index 930fba59..acb575f5 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -150,7 +150,7 @@ yarn build ## 后台整合示例 - [lamp-cloud](https://github.com/zuihou/lamp-cloud) - 基于 SpringCloud Alibaba 的微服务中后台快速开发平台 -- [matecloud](https://github.com/matevip/matecloud) - MateCloud微服务脚手架,基于Spring Cloud 2020.0.3、SpringBoot 2.5.3的全开源平台 +- [matecloud](https://github.com/matevip/matecloud) - MateCloud 微服务脚手架,基于 Spring Cloud 2020.0.3、SpringBoot 2.5.3 的全开源平台 ## 维护者 diff --git a/build/generate/icon/index.ts b/build/generate/icon/index.ts index a9bac80f..c78cb09f 100644 --- a/build/generate/icon/index.ts +++ b/build/generate/icon/index.ts @@ -52,19 +52,19 @@ async function generateIcon() { const { prefix } = data; const isLocal = useType === 'local'; const icons = Object.keys(data.icons).map( - (item) => `${isLocal ? prefix + ':' : ''}${item}` + (item) => `${isLocal ? prefix + ':' : ''}${item}`, ); await fs.writeFileSync( path.join(output, `icons.data.ts`), - `export default ${isLocal ? JSON.stringify(icons) : JSON.stringify({ prefix, icons })}` + `export default ${isLocal ? JSON.stringify(icons) : JSON.stringify({ prefix, icons })}`, ); prefixSet.push(prefix); } } fs.emptyDir(path.join(process.cwd(), 'node_modules/.vite')); console.log( - `✨ ${chalk.cyan(`[${pkg.name}]`)}` + ' - Icon generated successfully:' + `[${prefixSet}]` + `✨ ${chalk.cyan(`[${pkg.name}]`)}` + ' - Icon generated successfully:' + `[${prefixSet}]`, ); }); } diff --git a/build/script/buildConf.ts b/build/script/buildConf.ts index a44a1d8e..48ed4d9b 100644 --- a/build/script/buildConf.ts +++ b/build/script/buildConf.ts @@ -15,7 +15,7 @@ function createConfig( configName, config, configFileName = GLOB_CONFIG_FILE_NAME, - }: { configName: string; config: any; configFileName?: string } = { configName: '', config: {} } + }: { configName: string; config: any; configFileName?: string } = { configName: '', config: {} }, ) { try { const windowConf = `window.${configName}`; diff --git a/build/vite/plugin/compress.ts b/build/vite/plugin/compress.ts index 34787ca1..3ad32be1 100644 --- a/build/vite/plugin/compress.ts +++ b/build/vite/plugin/compress.ts @@ -7,7 +7,7 @@ import compressPlugin from 'vite-plugin-compression'; export function configCompressPlugin( compress: 'gzip' | 'brotli' | 'none', - deleteOriginFile = false + deleteOriginFile = false, ): Plugin | Plugin[] { const compressList = compress.split(','); @@ -18,7 +18,7 @@ export function configCompressPlugin( compressPlugin({ ext: '.gz', deleteOriginFile, - }) + }), ); } @@ -28,7 +28,7 @@ export function configCompressPlugin( ext: '.br', algorithm: 'brotliCompress', deleteOriginFile, - }) + }), ); } return plugins; diff --git a/build/vite/plugin/index.ts b/build/vite/plugin/index.ts index 29ec002b..5f9f77a7 100644 --- a/build/vite/plugin/index.ts +++ b/build/vite/plugin/index.ts @@ -68,7 +68,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { // rollup-plugin-gzip vitePlugins.push( - configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE) + configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE), ); // vite-plugin-pwa diff --git a/mock/_util.ts b/mock/_util.ts index 0eedb758..97c87564 100644 --- a/mock/_util.ts +++ b/mock/_util.ts @@ -13,7 +13,7 @@ export function resultPageSuccess( page: number, pageSize: number, list: T[], - { message = 'ok' } = {} + { message = 'ok' } = {}, ) { const pageData = pagination(page, pageSize, list); diff --git a/mock/sys/user.ts b/mock/sys/user.ts index a8608f1b..8b8989fa 100644 --- a/mock/sys/user.ts +++ b/mock/sys/user.ts @@ -52,7 +52,7 @@ export default [ response: ({ body }) => { const { username, password } = body; const checkUser = createFakeUserList().find( - (item) => item.username === username && password === item.password + (item) => item.username === username && password === item.password, ); if (!checkUser) { return resultError('Incorrect account or password!'); diff --git a/prettier.config.js b/prettier.config.js index b4e993ae..343625f0 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -7,7 +7,7 @@ module.exports = { singleQuote: true, quoteProps: 'as-needed', bracketSpacing: true, - trailingComma: 'es5', + trailingComma: 'all', jsxBracketSameLine: false, jsxSingleQuote: false, arrowParens: 'always', @@ -16,5 +16,4 @@ module.exports = { proseWrap: 'never', htmlWhitespaceSensitivity: 'strict', endOfLine: 'auto', - rangeStart: 0, }; diff --git a/src/App.vue b/src/App.vue index 9084a8f4..f8df489e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -15,5 +15,6 @@ // support Multi-language const { getAntdLocale } = useLocale(); + // Listening to page changes and dynamically changing site titles useTitle(); diff --git a/src/api/sys/upload.ts b/src/api/sys/upload.ts index 1f1b4389..c47baf43 100644 --- a/src/api/sys/upload.ts +++ b/src/api/sys/upload.ts @@ -10,13 +10,13 @@ const { uploadUrl = '' } = useGlobSetting(); */ export function uploadApi( params: UploadFileParams, - onUploadProgress: (progressEvent: ProgressEvent) => void + onUploadProgress: (progressEvent: ProgressEvent) => void, ) { return defHttp.uploadFile( { url: uploadUrl, onUploadProgress, }, - params + params, ); } diff --git a/src/api/sys/user.ts b/src/api/sys/user.ts index c0c88d31..da9f7a29 100644 --- a/src/api/sys/user.ts +++ b/src/api/sys/user.ts @@ -21,7 +21,7 @@ export function loginApi(params: LoginParams, mode: ErrorMessageMode = 'modal') }, { errorMessageMode: mode, - } + }, ); } diff --git a/src/components/Application/src/AppDarkModeToggle.vue b/src/components/Application/src/AppDarkModeToggle.vue index 6b07d92d..6df9c499 100644 --- a/src/components/Application/src/AppDarkModeToggle.vue +++ b/src/components/Application/src/AppDarkModeToggle.vue @@ -1,6 +1,6 @@