diff --git a/web/admin-spa/package-lock.json b/web/admin-spa/package-lock.json index efe90dff..0b959aa3 100644 --- a/web/admin-spa/package-lock.json +++ b/web/admin-spa/package-lock.json @@ -15,6 +15,7 @@ "element-plus": "^2.4.4", "pinia": "^2.1.7", "vue": "^3.3.4", + "vue-i18n": "^9.14.5", "vue-router": "^4.2.5", "xlsx": "^0.18.5", "xlsx-js-style": "^1.2.0" @@ -657,6 +658,50 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/@intlify/core-base": { + "version": "9.14.5", + "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.14.5.tgz", + "integrity": "sha512-5ah5FqZG4pOoHjkvs8mjtv+gPKYU0zCISaYNjBNNqYiaITxW8ZtVih3GS/oTOqN8d9/mDLyrjD46GBApNxmlsA==", + "license": "MIT", + "dependencies": { + "@intlify/message-compiler": "9.14.5", + "@intlify/shared": "9.14.5" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/message-compiler": { + "version": "9.14.5", + "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.14.5.tgz", + "integrity": "sha512-IHzgEu61/YIpQV5Pc3aRWScDcnFKWvQA9kigcINcCBXN8mbW+vk9SK+lDxA6STzKQsVJxUPg9ACC52pKKo3SVQ==", + "license": "MIT", + "dependencies": { + "@intlify/shared": "9.14.5", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/shared": { + "version": "9.14.5", + "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.14.5.tgz", + "integrity": "sha512-9gB+E53BYuAEMhbCAxVgG38EZrk59sxBtv3jSizNL2hEWlgjBjAw1AwpLHtNaeda12pe6W20OGEa0TwuMSRbyQ==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmmirror.com/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -3789,9 +3834,10 @@ }, "node_modules/prettier-plugin-tailwindcss": { "version": "0.6.14", - "resolved": "https://registry.npmmirror.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.14.tgz", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.14.tgz", "integrity": "sha512-pi2e/+ZygeIqntN+vC573BcW5Cve8zUB0SSAGxqpB4f96boZF4M3phPVoOFCeypwkpRYdi7+jQ5YJJUwrkGUAg==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.21.3" }, @@ -5181,6 +5227,26 @@ "eslint": ">=6.0.0" } }, + "node_modules/vue-i18n": { + "version": "9.14.5", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.14.5.tgz", + "integrity": "sha512-0jQ9Em3ymWngyiIkj0+c/k7WgaPO+TNzjKSNq9BvBQaKJECqn9cd9fL4tkDhB5G1QBskGl9YxxbDAhgbFtpe2g==", + "license": "MIT", + "dependencies": { + "@intlify/core-base": "9.14.5", + "@intlify/shared": "9.14.5", + "@vue/devtools-api": "^6.5.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/vue-router": { "version": "4.5.1", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.5.1.tgz", @@ -5378,7 +5444,7 @@ }, "node_modules/xlsx-js-style": { "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/xlsx-js-style/-/xlsx-js-style-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/xlsx-js-style/-/xlsx-js-style-1.2.0.tgz", "integrity": "sha512-DDT4FXFSWfT4DXMSok/m3TvmP1gvO3dn0Eu/c+eXHW5Kzmp7IczNkxg/iEPnImbG9X0Vb8QhROda5eatSR/97Q==", "license": "Apache-2.0", "dependencies": { diff --git a/web/admin-spa/package.json b/web/admin-spa/package.json index af353d80..5feb58d8 100644 --- a/web/admin-spa/package.json +++ b/web/admin-spa/package.json @@ -18,6 +18,7 @@ "element-plus": "^2.4.4", "pinia": "^2.1.7", "vue": "^3.3.4", + "vue-i18n": "^9.14.5", "vue-router": "^4.2.5", "xlsx": "^0.18.5", "xlsx-js-style": "^1.2.0" diff --git a/web/admin-spa/src/main.js b/web/admin-spa/src/main.js index 79181b6b..513e5947 100644 --- a/web/admin-spa/src/main.js +++ b/web/admin-spa/src/main.js @@ -7,6 +7,7 @@ import 'element-plus/theme-chalk/dark/css-vars.css' import App from './App.vue' import router from './router' import { useUserStore } from './stores/user' +import i18n from './i18n' import './assets/styles/main.css' import './assets/styles/global.css' @@ -20,6 +21,9 @@ app.use(pinia) // 使用路由 app.use(router) +// 使用Vue I18n +app.use(i18n) + // 使用Element Plus app.use(ElementPlus, { locale: zhCn