From 44f26dd3308985bc813b1b9d97119ac1619dc0e9 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Fri, 24 Oct 2025 00:36:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=BF=9B=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/web/regulatory-management-util/7788.md | 18 +++ .../package-lock.json | 153 ++++++++++++++++-- .../regulatory-management-util/package.json | 7 +- .../src/assets/css/index.scss | 2 +- .../src/layout/console/components/Aside.vue | 7 +- .../regulatory-management-util/src/style.scss | 11 +- .../views/console/RegulatoryManagement.vue | 32 ++++ .../regulatory-management-util/vite.config.ts | 31 +++- 8 files changed, 231 insertions(+), 30 deletions(-) create mode 100644 code/web/regulatory-management-util/7788.md create mode 100644 code/web/regulatory-management-util/src/views/console/RegulatoryManagement.vue diff --git a/code/web/regulatory-management-util/7788.md b/code/web/regulatory-management-util/7788.md new file mode 100644 index 0000000..6b436d7 --- /dev/null +++ b/code/web/regulatory-management-util/7788.md @@ -0,0 +1,18 @@ +## vue3 引入@路径 +path模块问题 +要安装@type/node:npm install @types/node --save-dev +之后就可以加载path +import path from "path"; +resolve: { + //配置别名 + alias: [ + { + find: /^~/, + replacement: "", + }, + { + find: "@", + replacement: path.resolve( __dirname, "src" ), + }, + ], + }, \ No newline at end of file diff --git a/code/web/regulatory-management-util/package-lock.json b/code/web/regulatory-management-util/package-lock.json index 5ba17a2..3467390 100644 --- a/code/web/regulatory-management-util/package-lock.json +++ b/code/web/regulatory-management-util/package-lock.json @@ -8,13 +8,13 @@ "name": "regulatory-management-util", "version": "0.0.0", "dependencies": { - "sass": "^1.93.2", "scss": "^0.2.4", "vue": "^3.5.22", "vue-router": "^4.6.3" }, "devDependencies": { "@stylistic/eslint-plugin": "^5.5.0", + "@types/node": "^24.9.1", "@typescript-eslint/eslint-plugin": "^8.46.2", "@typescript-eslint/parser": "^8.46.2", "@vitejs/plugin-vue": "^6.0.1", @@ -22,8 +22,11 @@ "element-plus": "^2.11.5", "eslint": "^9.38.0", "eslint-plugin-vue": "^10.5.1", + "path": "^0.12.7", + "sass": "^1.93.2", + "sass-loader": "^16.0.5", "typescript": "~5.9.3", - "vite": "^7.1.11", + "vite": "^7.1.12", "vue-eslint-parser": "^10.2.0", "vue-tsc": "^3.1.1" } @@ -867,6 +870,7 @@ "version": "2.5.1", "resolved": "https://registry.npmmirror.com/@parcel/watcher/-/watcher-2.5.1.tgz", "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, @@ -906,6 +910,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -926,6 +931,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -946,6 +952,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -966,6 +973,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -986,6 +994,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1006,6 +1015,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1026,6 +1036,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1046,6 +1057,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1066,6 +1078,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1086,6 +1099,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1106,6 +1120,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1126,6 +1141,7 @@ "cpu": [ "ia32" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1146,6 +1162,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1524,6 +1541,17 @@ "@types/lodash": "*" } }, + "node_modules/@types/node": { + "version": "24.9.1", + "resolved": "https://registry.npmmirror.com/@types/node/-/node-24.9.1.tgz", + "integrity": "sha512-QoiaXANRkSXK6p0Duvt56W208du4P9Uye9hWLWgGMDTEoKPhuenzNcC4vGUmrNkiOKTlIrBoyNQYNpSwfEZXSg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~7.16.0" + } + }, "node_modules/@types/web-bluetooth": { "version": "0.0.16", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz", @@ -2161,7 +2189,7 @@ "version": "3.0.3", "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "fill-range": "^7.1.1" @@ -2201,6 +2229,7 @@ "version": "4.0.3", "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-4.0.3.tgz", "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, "license": "MIT", "dependencies": { "readdirp": "^4.0.1" @@ -2309,6 +2338,7 @@ "version": "1.0.3", "resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, "license": "Apache-2.0", "optional": true, "bin": { @@ -2760,7 +2790,7 @@ "version": "7.1.1", "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" @@ -2879,6 +2909,7 @@ "version": "5.1.4", "resolved": "https://registry.npmmirror.com/immutable/-/immutable-5.1.4.tgz", "integrity": "sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA==", + "dev": true, "license": "MIT" }, "node_modules/import-fresh": { @@ -2908,11 +2939,18 @@ "node": ">=0.8.19" } }, + "node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true, + "license": "ISC" + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2922,7 +2960,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" @@ -2935,7 +2973,7 @@ "version": "7.0.0", "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.12.0" @@ -3087,7 +3125,7 @@ "version": "4.0.8", "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "braces": "^3.0.3", @@ -3101,7 +3139,7 @@ "version": "2.3.1", "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8.6" @@ -3165,10 +3203,18 @@ "dev": true, "license": "MIT" }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, "node_modules/node-addon-api": { "version": "7.1.1", "resolved": "https://registry.npmmirror.com/node-addon-api/-/node-addon-api-7.1.1.tgz", "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "dev": true, "license": "MIT", "optional": true }, @@ -3263,6 +3309,17 @@ "node": ">=6" } }, + "node_modules/path": { + "version": "0.12.7", + "resolved": "https://registry.npmmirror.com/path/-/path-0.12.7.tgz", + "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/path-browserify/-/path-browserify-1.0.1.tgz", @@ -3361,6 +3418,16 @@ "node": ">= 0.8.0" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -3396,6 +3463,7 @@ "version": "4.1.2", "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-4.1.2.tgz", "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, "license": "MIT", "engines": { "node": ">= 14.18.0" @@ -3494,6 +3562,7 @@ "version": "1.93.2", "resolved": "https://registry.npmmirror.com/sass/-/sass-1.93.2.tgz", "integrity": "sha512-t+YPtOQHpGW1QWsh1CHQ5cPIr9lbbGZLZnbihP/D/qZj/yuV68m8qarcV17nvkOX81BCrvzAlq2klCQFZghyTg==", + "dev": true, "license": "MIT", "peer": true, "dependencies": { @@ -3511,6 +3580,47 @@ "@parcel/watcher": "^2.4.1" } }, + "node_modules/sass-loader": { + "version": "16.0.5", + "resolved": "https://registry.npmmirror.com/sass-loader/-/sass-loader-16.0.5.tgz", + "integrity": "sha512-oL+CMBXrj6BZ/zOq4os+UECPL+bWqt6OAC6DWS8Ln8GZRcMDjlJ4JC3FBDuHJdYaFWIdKNIBYmtZtK2MaMkNIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "neo-async": "^2.6.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", + "sass": "^1.3.0", + "sass-embedded": "*", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, "node_modules/scss": { "version": "0.2.4", "resolved": "https://registry.npmmirror.com/scss/-/scss-0.2.4.tgz", @@ -3614,7 +3724,7 @@ "version": "5.0.1", "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "is-number": "^7.0.0" @@ -3664,6 +3774,13 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT" + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -3674,6 +3791,16 @@ "punycode": "^2.1.0" } }, + "node_modules/util": { + "version": "0.10.4", + "resolved": "https://registry.npmmirror.com/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "2.0.3" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -3682,9 +3809,9 @@ "license": "MIT" }, "node_modules/vite": { - "version": "7.1.11", - "resolved": "https://registry.npmmirror.com/vite/-/vite-7.1.11.tgz", - "integrity": "sha512-uzcxnSDVjAopEUjljkWh8EIrg6tlzrjFUfMcR1EVsRDGwf/ccef0qQPRyOrROwhrTDaApueq+ja+KLPlzR/zdg==", + "version": "7.1.12", + "resolved": "https://registry.npmmirror.com/vite/-/vite-7.1.12.tgz", + "integrity": "sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==", "dev": true, "license": "MIT", "peer": true, diff --git a/code/web/regulatory-management-util/package.json b/code/web/regulatory-management-util/package.json index 7bc6a34..86f551f 100644 --- a/code/web/regulatory-management-util/package.json +++ b/code/web/regulatory-management-util/package.json @@ -9,13 +9,13 @@ "preview": "vite preview" }, "dependencies": { - "sass": "^1.93.2", "scss": "^0.2.4", "vue": "^3.5.22", "vue-router": "^4.6.3" }, "devDependencies": { "@stylistic/eslint-plugin": "^5.5.0", + "@types/node": "^24.9.1", "@typescript-eslint/eslint-plugin": "^8.46.2", "@typescript-eslint/parser": "^8.46.2", "@vitejs/plugin-vue": "^6.0.1", @@ -23,8 +23,11 @@ "element-plus": "^2.11.5", "eslint": "^9.38.0", "eslint-plugin-vue": "^10.5.1", + "path": "^0.12.7", + "sass": "^1.93.2", + "sass-loader": "^16.0.5", "typescript": "~5.9.3", - "vite": "^7.1.11", + "vite": "^7.1.12", "vue-eslint-parser": "^10.2.0", "vue-tsc": "^3.1.1" } diff --git a/code/web/regulatory-management-util/src/assets/css/index.scss b/code/web/regulatory-management-util/src/assets/css/index.scss index 2bb4ba9..89d4c03 100644 --- a/code/web/regulatory-management-util/src/assets/css/index.scss +++ b/code/web/regulatory-management-util/src/assets/css/index.scss @@ -9,6 +9,6 @@ */ @import url("./public/reset.scss"); @import url("./public/normalize.scss"); -@import url("../font/fonts.css"); @import url("./public/mixin.scss"); +@import url("../font/fonts.css"); // @import url("./public/color.scss"); \ No newline at end of file diff --git a/code/web/regulatory-management-util/src/layout/console/components/Aside.vue b/code/web/regulatory-management-util/src/layout/console/components/Aside.vue index eb6d5e7..c3b2a2e 100644 --- a/code/web/regulatory-management-util/src/layout/console/components/Aside.vue +++ b/code/web/regulatory-management-util/src/layout/console/components/Aside.vue @@ -73,7 +73,7 @@ Copyright © CPIC All rights reserved \ No newline at end of file diff --git a/code/web/regulatory-management-util/vite.config.ts b/code/web/regulatory-management-util/vite.config.ts index bbcf80c..f7dd5be 100644 --- a/code/web/regulatory-management-util/vite.config.ts +++ b/code/web/regulatory-management-util/vite.config.ts @@ -1,7 +1,30 @@ -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' +import { defineConfig } from "vite"; +import vue from "@vitejs/plugin-vue"; +import path from "path"; +/* eslint-disable */ // https://vite.dev/config/ export default defineConfig({ - plugins: [vue()], -}) + plugins: [vue(),], + resolve: { + //配置别名 + alias: [ + { + find: /^~/, + replacement: "", + }, + { + find: "@", + replacement: path.resolve( __dirname, "src" ), + }, + ], + }, + css: { + preprocessorOptions: { + scss: { + // additionalData: '@import "./src/assets/css/public/variables.scss";@import "./src/assets/css/public/mixin.scss";', + // additionalData: '@import "@/assets/css/public/variables.scss";', + }, + }, + }, +});