diff --git a/.gitignore b/.gitignore index a3ef6f3..403adbc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,23 @@ -node_modules .DS_Store -dist -dist-ssr -*.local -.vscode \ No newline at end of file +node_modules +/dist + + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/package.json b/package.json index 9eded85..39f9777 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "cropperjs": "^1.5.11", "echarts": "^5.1.1", "echarts-wordcloud": "^2.0.0", - "element-plus": "^1.0.2-beta.41", + "element-plus": "^1.0.2-beta.44", "mitt": "^2.1.0", "nprogress": "^0.2.0", "print-js": "^1.6.0", @@ -36,18 +36,23 @@ "@types/node": "^15.0.2", "@types/nprogress": "^0.2.0", "@types/sortablejs": "^1.10.6", - "@typescript-eslint/eslint-plugin": "^4.22.1", - "@typescript-eslint/parser": "^4.22.1", + "@typescript-eslint/eslint-plugin": "^4.23.0", + "@typescript-eslint/parser": "^4.23.0", "@vitejs/plugin-vue": "^1.2.2", "@vue/compiler-sfc": "^3.0.11", - "dotenv": "^9.0.0", - "eslint": "^7.25.0", + "dotenv": "^9.0.2", + "eslint": "^7.26.0", "eslint-plugin-vue": "^7.9.0", - "prettier": "^2.2.1", + "prettier": "^2.3.0", "sass": "^1.32.12", - "sass-loader": "^11.0.1", + "sass-loader": "^11.1.0", "typescript": "^4.2.4", - "vite": "^2.2.4", + "vite": "^2.3.0", "vue-eslint-parser": "^7.6.0" - } + }, + "browserslist": [ + "> 1%", + "last 2 versions", + "not dead" + ] } diff --git a/shim.d.ts b/shim.d.ts index 4b21c76..1877785 100644 --- a/shim.d.ts +++ b/shim.d.ts @@ -1,4 +1,6 @@ +/* eslint-disable */ declare module '*.vue' { + import type { DefineComponent } from 'vue'; const component: DefineComponent<{}, {}, any>; export default component; } diff --git a/src/views/layout/navBars/breadcrumb/user.vue b/src/views/layout/navBars/breadcrumb/user.vue index 6f1f2c2..06a8057 100644 --- a/src/views/layout/navBars/breadcrumb/user.vue +++ b/src/views/layout/navBars/breadcrumb/user.vue @@ -175,6 +175,7 @@ export default { setLocal('themeConfig', getThemeConfig.value); proxy.$ELEMENT.size = size; initComponentSize(); + window.location.reload(); }; // 语言切换 const onLanguageChange = (lang: string) => { diff --git a/tsconfig.json b/tsconfig.json index c15b03c..9d62054 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ // "incremental": true, /* Enable incremental compilation */ "target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, - "lib": ["esnext", "dom", "ESNext", "DOM", "DOM.Iterable"] /* Specify library files to be included in the compilation. */, + "lib": ["esnext", "dom", "dom.iterable", "scripthost"] /* Specify library files to be included in the compilation. */, // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ "jsx": "preserve" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, @@ -62,7 +62,7 @@ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */, // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ /* Advanced Options */ diff --git a/vite.config.ts b/vite.config.ts index 613a940..eed0d86 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -23,6 +23,7 @@ const viteConfig: UserConfig = { include: ['element-plus/lib/locale/lang/zh-cn', 'element-plus/lib/locale/lang/en', 'element-plus/lib/locale/lang/zh-tw'], }, server: { + host: '0.0.0.0', port: VITE_PORT, open: VITE_OPEN, proxy: {