diff --git a/package-lock.json b/package-lock.json index 23bd33fce..4fc5914a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -762,6 +762,16 @@ "integrity": "sha1-RdXbmefuXmvE82LgCL+RerUEmIc=", "dev": true }, + "camel-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", + "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", + "dev": true, + "requires": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + } + }, "camelcase": { "version": "6.2.0", "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-6.2.0.tgz", @@ -774,6 +784,17 @@ "integrity": "sha1-qZkBSjXOvU+YxAWTCgV6DXU1Lrk=", "dev": true }, + "capital-case": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz", + "integrity": "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1604053731560&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", @@ -784,6 +805,26 @@ "supports-color": "^5.3.0" } }, + "change-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-4.1.2.tgz", + "integrity": "sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==", + "dev": true, + "requires": { + "camel-case": "^4.1.2", + "capital-case": "^1.0.4", + "constant-case": "^3.0.4", + "dot-case": "^3.0.4", + "header-case": "^2.0.4", + "no-case": "^3.0.4", + "param-case": "^3.0.4", + "pascal-case": "^3.1.2", + "path-case": "^3.0.4", + "sentence-case": "^3.0.4", + "snake-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "chokidar": { "version": "3.5.1", "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-3.5.1.tgz?cache=0&sync_timestamp=1610719380575&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-3.5.1.tgz", @@ -862,6 +903,17 @@ "bluebird": "^3.7.2" } }, + "constant-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", + "integrity": "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case": "^2.0.2" + } + }, "convert-source-map": { "version": "1.7.0", "resolved": "https://registry.npm.taobao.org/convert-source-map/download/convert-source-map-1.7.0.tgz", @@ -929,6 +981,16 @@ "integrity": "sha1-RNLqNnm49NT/ujPwPYZfwee/SVU=", "dev": true }, + "dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "dotenv": { "version": "8.2.0", "resolved": "https://registry.npm.taobao.org/dotenv/download/dotenv-8.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdotenv%2Fdownload%2Fdotenv-8.2.0.tgz", @@ -996,6 +1058,12 @@ "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", "dev": true }, + "es-module-lexer": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.4.1.tgz", + "integrity": "sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA==", + "dev": true + }, "es5-ext": { "version": "0.10.53", "resolved": "https://registry.npm.taobao.org/es5-ext/download/es5-ext-0.10.53.tgz", @@ -1230,6 +1298,16 @@ "integrity": "sha1-gdAbtd6OpKIUrV1urRtSNGCwtFo=", "dev": true }, + "header-case": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", + "integrity": "sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==", + "dev": true, + "requires": { + "capital-case": "^1.0.4", + "tslib": "^2.0.3" + } + }, "html-tags": { "version": "3.1.0", "resolved": "https://registry.npm.taobao.org/html-tags/download/html-tags-3.1.0.tgz", @@ -1374,6 +1452,15 @@ "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", "dev": true }, + "lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dev": true, + "requires": { + "tslib": "^2.0.3" + } + }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-5.1.1.tgz", @@ -1464,6 +1551,16 @@ "resolved": "https://registry.npm.taobao.org/next-tick/download/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" }, + "no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dev": true, + "requires": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, "node-releases": { "version": "1.1.71", "resolved": "https://registry.npm.taobao.org/node-releases/download/node-releases-1.1.71.tgz?cache=0&sync_timestamp=1614110416015&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-releases%2Fdownload%2Fnode-releases-1.1.71.tgz", @@ -1501,12 +1598,32 @@ "ee-first": "1.1.1" } }, + "param-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", + "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", + "dev": true, + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz", "integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=", "dev": true }, + "pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "path": { "version": "0.12.7", "resolved": "https://registry.npm.taobao.org/path/download/path-0.12.7.tgz", @@ -1516,6 +1633,16 @@ "util": "^0.10.3" } }, + "path-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.4.tgz", + "integrity": "sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==", + "dev": true, + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npm.taobao.org/path-parse/download/path-parse-1.0.6.tgz", @@ -1739,6 +1866,27 @@ "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", "dev": true }, + "sentence-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-3.0.4.tgz", + "integrity": "sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3", + "upper-case-first": "^2.0.2" + } + }, + "snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "dev": true, + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "sortablejs": { "version": "1.10.2", "resolved": "https://registry.npm.taobao.org/sortablejs/download/sortablejs-1.10.2.tgz", @@ -1839,6 +1987,24 @@ "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", "dev": true }, + "upper-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", + "integrity": "sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==", + "dev": true, + "requires": { + "tslib": "^2.0.3" + } + }, + "upper-case-first": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", + "integrity": "sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==", + "dev": true, + "requires": { + "tslib": "^2.0.3" + } + }, "util": { "version": "0.10.4", "resolved": "https://registry.npm.taobao.org/util/download/util-0.10.4.tgz", @@ -1960,6 +2126,40 @@ } } }, + "vite-plugin-style-import": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/vite-plugin-style-import/-/vite-plugin-style-import-0.9.2.tgz", + "integrity": "sha512-YjPtKzr5WSwAQW6UD7DBtCraxJ4X7pQXUdBOYriowz223n3W3T2RscUs7CxzAhGDEG/ttcc6vvA6A5/eVowRTw==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^4.1.0", + "change-case": "^4.1.2", + "debug": "^4.3.2", + "es-module-lexer": "^0.4.1", + "magic-string": "^0.25.7" + }, + "dependencies": { + "@rollup/pluginutils": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.0.tgz", + "integrity": "sha512-TrBhfJkFxA+ER+ew2U2/fHbebhLT/l/2pRk0hfj9KusXUuRXd2v0R58AfaZK9VXDQ4TogOSEmICVrQAA3zFnHQ==", + "dev": true, + "requires": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + } + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } + } + }, "vue": { "version": "3.0.11", "resolved": "https://registry.npmjs.org/vue/-/vue-3.0.11.tgz", diff --git a/package.json b/package.json index ce1844055..b41ff637b 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "sass-loader": "^11.0.1", "typescript": "^4.2.4", "vite": "^2.2.1", - "vite-plugin-mock": "^2.5.0" + "vite-plugin-mock": "^2.5.0", + "vite-plugin-style-import": "^0.9.2" } } diff --git a/src/components/BreadCrumb/src/BreadCrumb.vue b/src/components/BreadCrumb/src/BreadCrumb.vue index 0ba84cc22..dcbaae55d 100644 --- a/src/components/BreadCrumb/src/BreadCrumb.vue +++ b/src/components/BreadCrumb/src/BreadCrumb.vue @@ -5,11 +5,12 @@ {{ $t(item.meta.title) }} - {{ + >{{ $t(item.meta.title) }} + + {{ $t(item.meta.title) - }} + }} + @@ -36,20 +37,18 @@ export default defineComponent({ }; const getBreadcrumb = (): void => { - let matched = route.matched.filter( - (item) => item.meta && item.meta.title - ); + let matched = route.matched.filter(item => item.meta && item.meta.title); const first = matched[0]; if (!isDashboard(first)) { matched = [ ({ path: "/welcome", - meta: { title: "home" }, - } as unknown) as RouteLocationMatched, + meta: { title: "message.hshome" } + } as unknown) as RouteLocationMatched ].concat(matched); } levelList.value = matched.filter( - (item) => item.meta && item.meta.title && item.meta.breadcrumb !== false + item => item.meta && item.meta.title && item.meta.breadcrumb !== false ); }; @@ -61,9 +60,9 @@ export default defineComponent({ ); // const pathCompile = (path: string): string | Object => { - // const { params } = route; - // var toPath = pathToRegexp.compile(path); - // return toPath(params); + // const { params } = route; + // var toPath = pathToRegexp.compile(path); + // return toPath(params); // }; const handleLink = (item: RouteLocationMatched): any => { @@ -76,7 +75,7 @@ export default defineComponent({ }; return { levelList, handleLink }; - }, + } }); diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 1c5103bb4..62cd2bbb3 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -23,7 +23,10 @@ diff --git a/src/layout/components/screenfull/index.vue b/src/layout/components/screenfull/index.vue index 255511f1a..761bbb375 100644 --- a/src/layout/components/screenfull/index.vue +++ b/src/layout/components/screenfull/index.vue @@ -1,7 +1,7 @@