From 4269c90deab1980fa0701033edd179b42ca9fb62 Mon Sep 17 00:00:00 2001 From: Panda Date: Tue, 27 Feb 2024 15:27:58 +0800 Subject: [PATCH 01/10] =?UTF-8?q?perf:=20Vue3=E4=B8=AD=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E4=BA=86=E8=BF=87=E6=BB=A4=E5=99=A8,=20=E6=94=B9=E7=94=A8?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DictTag/index.vue | 47 ++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue index e29b276f5..424220230 100644 --- a/src/components/DictTag/index.vue +++ b/src/components/DictTag/index.vue @@ -3,11 +3,14 @@ \ No newline at end of file + diff --git a/src/components/Crontab/day.vue b/src/components/Crontab/day.vue index 0d804ec1e..42efac46e 100644 --- a/src/components/Crontab/day.vue +++ b/src/components/Crontab/day.vue @@ -1,76 +1,70 @@ - \ No newline at end of file + diff --git a/src/components/Crontab/hour.vue b/src/components/Crontab/hour.vue index a293b29ad..6d3775301 100644 --- a/src/components/Crontab/hour.vue +++ b/src/components/Crontab/hour.vue @@ -1,58 +1,56 @@ - \ No newline at end of file + diff --git a/src/components/Crontab/index.vue b/src/components/Crontab/index.vue index f1d7201b5..07a18119b 100644 --- a/src/components/Crontab/index.vue +++ b/src/components/Crontab/index.vue @@ -1,310 +1,294 @@ - \ No newline at end of file + diff --git a/src/components/Crontab/min.vue b/src/components/Crontab/min.vue index 567e1ecc0..27408570c 100644 --- a/src/components/Crontab/min.vue +++ b/src/components/Crontab/min.vue @@ -1,126 +1,130 @@ - \ No newline at end of file + diff --git a/src/components/Crontab/month.vue b/src/components/Crontab/month.vue index 4bf33fd23..9725f45ba 100644 --- a/src/components/Crontab/month.vue +++ b/src/components/Crontab/month.vue @@ -1,141 +1,148 @@ + + + \ No newline at end of file + diff --git a/src/components/Crontab/result.vue b/src/components/Crontab/result.vue index 271577e07..5c47b4cce 100644 --- a/src/components/Crontab/result.vue +++ b/src/components/Crontab/result.vue @@ -1,540 +1,563 @@ - \ No newline at end of file + diff --git a/src/components/Crontab/second.vue b/src/components/Crontab/second.vue index 0955a0094..930ad67e9 100644 --- a/src/components/Crontab/second.vue +++ b/src/components/Crontab/second.vue @@ -1,128 +1,141 @@ + + + \ No newline at end of file diff --git a/src/components/Crontab/week.vue b/src/components/Crontab/week.vue index 030967073..3c7c1bca4 100644 --- a/src/components/Crontab/week.vue +++ b/src/components/Crontab/week.vue @@ -1,197 +1,226 @@ + - \ No newline at end of file diff --git a/src/components/Crontab/year.vue b/src/components/Crontab/year.vue index d5d1a7869..045d4df20 100644 --- a/src/components/Crontab/year.vue +++ b/src/components/Crontab/year.vue @@ -1,149 +1,158 @@ - \ No newline at end of file diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue index 424220230..cf166e563 100644 --- a/src/components/DictTag/index.vue +++ b/src/components/DictTag/index.vue @@ -28,14 +28,15 @@ - @@ -174,78 +179,79 @@ function handleUploadError() { .editor-img-uploader { display: none; } -.editor, .ql-toolbar { +.editor, +.ql-toolbar { white-space: pre-wrap !important; line-height: normal !important; } .quill-img { display: none; } -.ql-snow .ql-tooltip[data-mode="link"]::before { - content: "请输入链接地址:"; +.ql-snow .ql-tooltip[data-mode='link']::before { + content: '请输入链接地址:'; } .ql-snow .ql-tooltip.ql-editing a.ql-action::after { border-right: 0px; - content: "保存"; + content: '保存'; padding-right: 0px; } -.ql-snow .ql-tooltip[data-mode="video"]::before { - content: "请输入视频地址:"; +.ql-snow .ql-tooltip[data-mode='video']::before { + content: '请输入视频地址:'; } .ql-snow .ql-picker.ql-size .ql-picker-label::before, .ql-snow .ql-picker.ql-size .ql-picker-item::before { - content: "14px"; + content: '14px'; } -.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before, -.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { - content: "10px"; +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='small']::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='small']::before { + content: '10px'; } -.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before, -.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { - content: "18px"; +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='large']::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='large']::before { + content: '18px'; } -.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before, -.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { - content: "32px"; +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value='huge']::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value='huge']::before { + content: '32px'; } .ql-snow .ql-picker.ql-header .ql-picker-label::before, .ql-snow .ql-picker.ql-header .ql-picker-item::before { - content: "文本"; + content: '文本'; } -.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, -.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { - content: "标题1"; +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='1']::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='1']::before { + content: '标题1'; } -.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, -.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { - content: "标题2"; +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='2']::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before { + content: '标题2'; } -.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, -.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { - content: "标题3"; +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='3']::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='3']::before { + content: '标题3'; } -.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before, -.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { - content: "标题4"; +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='4']::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='4']::before { + content: '标题4'; } -.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before, -.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { - content: "标题5"; +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='5']::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='5']::before { + content: '标题5'; } -.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before, -.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { - content: "标题6"; +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='6']::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='6']::before { + content: '标题6'; } .ql-snow .ql-picker.ql-font .ql-picker-label::before, .ql-snow .ql-picker.ql-font .ql-picker-item::before { - content: "标准字体"; + content: '标准字体'; } -.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before, -.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { - content: "衬线字体"; +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value='serif']::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value='serif']::before { + content: '衬线字体'; } -.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before, -.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before { - content: "等宽字体"; +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value='monospace']::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value='monospace']::before { + content: '等宽字体'; } diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index ad674609b..26702625a 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -20,8 +20,12 @@
请上传 - - + + 的文件
@@ -38,150 +42,152 @@ - diff --git a/src/components/Hamburger/index.vue b/src/components/Hamburger/index.vue index 8b6f7a8eb..846019481 100644 --- a/src/components/Hamburger/index.vue +++ b/src/components/Hamburger/index.vue @@ -13,7 +13,7 @@ - - \ No newline at end of file + diff --git a/src/components/IconSelect/index.vue b/src/components/IconSelect/index.vue index 26172fcd8..9d40bfc17 100644 --- a/src/components/IconSelect/index.vue +++ b/src/components/IconSelect/index.vue @@ -14,7 +14,7 @@
- + {{ item }}
@@ -23,18 +23,18 @@
- - \ No newline at end of file +} + diff --git a/src/components/IconSelect/requireIcons.js b/src/components/IconSelect/requireIcons.js deleted file mode 100644 index 158b5366f..000000000 --- a/src/components/IconSelect/requireIcons.js +++ /dev/null @@ -1,8 +0,0 @@ -let icons = [] -const modules = import.meta.glob('./../../assets/icons/svg/*.svg'); -for (const path in modules) { - const p = path.split('assets/icons/svg/')[1].split('.svg')[0]; - icons.push(p); -} - -export default icons \ No newline at end of file diff --git a/src/components/IconSelect/requireIcons.ts b/src/components/IconSelect/requireIcons.ts new file mode 100644 index 000000000..363ae0b3a --- /dev/null +++ b/src/components/IconSelect/requireIcons.ts @@ -0,0 +1,8 @@ +let icons: any[] = [] +const modules = import.meta.glob('./../../assets/icons/svg/*.svg') +for (const path in modules) { + const p = path.split('assets/icons/svg/')[1].split('.svg')[0] + icons.push(p) +} + +export default icons diff --git a/src/components/ImagePreview/index.vue b/src/components/ImagePreview/index.vue index 5222925a6..80e01636f 100644 --- a/src/components/ImagePreview/index.vue +++ b/src/components/ImagePreview/index.vue @@ -1,3 +1,11 @@ + - \ No newline at end of file + diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index f67f5cc44..bcf21d401 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -1,5 +1,5 @@ - \ No newline at end of file + diff --git a/src/components/RightToolbar/index.vue b/src/components/RightToolbar/index.vue index 8820acb64..eb4ab6b53 100644 --- a/src/components/RightToolbar/index.vue +++ b/src/components/RightToolbar/index.vue @@ -1,21 +1,36 @@ - \ No newline at end of file + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index b92ace2f8..054a49a15 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -1,23 +1,33 @@ - - \ No newline at end of file + diff --git a/src/layout/components/index.js b/src/layout/components/index.js deleted file mode 100644 index d1308ce17..000000000 --- a/src/layout/components/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export { default as AppMain } from './AppMain' -export { default as Navbar } from './Navbar' -export { default as Settings } from './Settings' -export { default as TagsView } from './TagsView/index.vue' diff --git a/src/layout/components/index.ts b/src/layout/components/index.ts new file mode 100644 index 000000000..464f38eab --- /dev/null +++ b/src/layout/components/index.ts @@ -0,0 +1,4 @@ +export { default as AppMain } from './AppMain.vue' +export { default as Navbar } from './Navbar.vue' +export { default as Settings } from './Settings/index.vue' +export { default as TagsView } from './TagsView/index.vue' diff --git a/src/layout/index.vue b/src/layout/index.vue index 52d821b0a..a8234c2bb 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -1,28 +1,29 @@ - - + \ No newline at end of file diff --git a/src/views/login.vue b/src/views/login.vue index 8d3119a46..21b315a7f 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -1,160 +1,166 @@ - - + \ No newline at end of file diff --git a/src/views/monitor/cache/index.vue b/src/views/monitor/cache/index.vue index fa3b7bde7..fc1ffb9fb 100644 --- a/src/views/monitor/cache/index.vue +++ b/src/views/monitor/cache/index.vue @@ -3,39 +3,94 @@ - +
- + - + - + - + - - + + - + - + - + - - - - + + + + - - - + + +
Redis版本
{{ cache.info.redis_version }}
+
+ {{ cache.info.redis_version }} +
+
运行模式
{{ cache.info.redis_mode == "standalone" ? "单机" : "集群" }}
+
+ {{ cache.info.redis_mode == 'standalone' ? '单机' : '集群' }} +
+
端口
{{ cache.info.tcp_port }}
+
{{ cache.info.tcp_port }}
+
客户端数
{{ cache.info.connected_clients }}
+
+ {{ cache.info.connected_clients }} +
+
运行时间(天)
{{ cache.info.uptime_in_days }}
+
运行时间(天)
+
+
+ {{ cache.info.uptime_in_days }} +
+
使用内存
{{ cache.info.used_memory_human }}
+
+ {{ cache.info.used_memory_human }} +
+
使用CPU
{{ parseFloat(cache.info.used_cpu_user_children).toFixed(2) }}
+
+ {{ parseFloat(cache.info.used_cpu_user_children).toFixed(2) }} +
+
内存配置
{{ cache.info.maxmemory_human }}
+
+ {{ cache.info.maxmemory_human }} +
+
AOF是否开启
{{ cache.info.aof_enabled == "0" ? "否" : "是" }}
RDB是否成功
{{ cache.info.rdb_last_bgsave_status }}
+
AOF是否开启
+
+
+ {{ cache.info.aof_enabled == '0' ? '否' : '是' }} +
+
+
RDB是否成功
+
+
+ {{ cache.info.rdb_last_bgsave_status }} +
+
Key数量
{{ cache.dbSize }}
网络入口/出口
{{ cache.info.instantaneous_input_kbps }}kps/{{cache.info.instantaneous_output_kbps}}kps
+
{{ cache.dbSize }}
+
+
网络入口/出口
+
+
+ {{ cache.info.instantaneous_input_kbps }}kps/{{ cache.info.instantaneous_output_kbps }}kps +
+
@@ -45,7 +100,10 @@ - +
@@ -54,7 +112,10 @@ - +
@@ -64,49 +125,51 @@
- diff --git a/src/views/monitor/cache/list.vue b/src/views/monitor/cache/list.vue index c5081295e..1cf955b47 100644 --- a/src/views/monitor/cache/list.vue +++ b/src/views/monitor/cache/list.vue @@ -4,7 +4,8 @@ - - + \ No newline at end of file diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue index c3a0fbcb7..844e41def 100644 --- a/src/views/system/config/index.vue +++ b/src/views/system/config/index.vue @@ -1,187 +1,189 @@ - diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 889867d90..756be2531 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -1,189 +1,190 @@ - diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue index f6207dc17..7b248fe60 100644 --- a/src/views/system/dict/data.vue +++ b/src/views/system/dict/data.vue @@ -1,256 +1,251 @@ - diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 33fa3c9ba..4e87ede73 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -1,195 +1,188 @@ - diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 4e4443047..6d5b6d9c3 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -1,334 +1,352 @@ - diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index 55fbc3a78..c23472720 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -1,180 +1,188 @@ - diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index aee603465..caca657de 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -1,166 +1,168 @@ - diff --git a/src/views/system/role/authUser.vue b/src/views/system/role/authUser.vue index de3efd8ce..76f71fb39 100644 --- a/src/views/system/role/authUser.vue +++ b/src/views/system/role/authUser.vue @@ -1,172 +1,192 @@ - - diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index e446deda1..bce603300 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -1,296 +1,354 @@ - + \ No newline at end of file diff --git a/src/views/system/role/selectUser.vue b/src/views/system/role/selectUser.vue index fb9e3625f..cc2d05c0a 100644 --- a/src/views/system/role/selectUser.vue +++ b/src/views/system/role/selectUser.vue @@ -1,140 +1,156 @@ - diff --git a/src/views/system/user/authRole.vue b/src/views/system/user/authRole.vue index 55a71f459..cf0c995bd 100644 --- a/src/views/system/user/authRole.vue +++ b/src/views/system/user/authRole.vue @@ -1,112 +1,122 @@ - diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 5b1ea2587..f3764ada0 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -1,372 +1,427 @@ - diff --git a/src/views/tool/gen/editTable.vue b/src/views/tool/gen/editTable.vue index 125fd75ab..30df60882 100644 --- a/src/views/tool/gen/editTable.vue +++ b/src/views/tool/gen/editTable.vue @@ -6,24 +6,14 @@ - - + + - + @@ -118,7 +109,7 @@ -
+
提交 返回
@@ -126,73 +117,79 @@ - diff --git a/src/views/tool/gen/genInfoForm.vue b/src/views/tool/gen/genInfoForm.vue index 85a8777ec..c58cffd92 100644 --- a/src/views/tool/gen/genInfoForm.vue +++ b/src/views/tool/gen/genInfoForm.vue @@ -126,7 +126,7 @@ - + - - diff --git a/src/views/tool/gen/importTable.vue b/src/views/tool/gen/importTable.vue index 67624e26d..6ff21a6cb 100644 --- a/src/views/tool/gen/importTable.vue +++ b/src/views/tool/gen/importTable.vue @@ -1,22 +1,12 @@ - diff --git a/src/views/tool/gen/index.vue b/src/views/tool/gen/index.vue index 8c9ce6a4a..cb625640c 100644 --- a/src/views/tool/gen/index.vue +++ b/src/views/tool/gen/index.vue @@ -37,22 +37,14 @@ - 生成 + 生成 - 导入 + 导入 修改 + >修改 删除 + >删除 - + - - - + + + - + -  复制 +  复制
{{ value }}
@@ -149,26 +172,36 @@
- diff --git a/src/views/tool/swagger/index.vue b/src/views/tool/swagger/index.vue index f29c40f20..5b4dfafbd 100644 --- a/src/views/tool/swagger/index.vue +++ b/src/views/tool/swagger/index.vue @@ -2,8 +2,9 @@ - +const url = ref(import.meta.env.VITE_APP_BASE_API + '/swagger-ui/index.html'); + \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..af095ada2 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,42 @@ +{ + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "module": "ESNext", + "moduleResolution": "Node", + "strict": true, + "jsx": "preserve", + "sourceMap": true, + "resolveJsonModule": true, + "isolatedModules": true, + "esModuleInterop": true, + "lib": ["ESNext", "DOM"], + "baseUrl": "./", + "paths": { + "@/*": ["src/*"], + "@build/*": ["build/*"], + "/#/*": ["types/*"], + "~/*": ["/*"] + }, + "types": ["node", "vite/client", "element-plus/global"], + "skipLibCheck": true + }, + "include": [ + "src/**/*.ts", + "src/**/*.tsx", + "src/**/*.vue", + "types/*.d.ts", + "mock/*.ts", + "vite.config.ts" + ], + "exclude": ["node_modules", "dist", "**/*.js"], + "typeRoots": ["./node_modules/@types/", "./types"], + "composite": true, + "references": [{ "path": "./tsconfig.node.json" }], + "ts-node": { + "compilerOptions": { + "module": "CommonJS", + "esModuleInterop": true + } + } +} \ No newline at end of file diff --git a/tsconfig.node.json b/tsconfig.node.json new file mode 100644 index 000000000..1a436aeda --- /dev/null +++ b/tsconfig.node.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "composite": true, + "module": "ESNext", + "moduleResolution": "Node", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts","test.ts","vite"] +} \ No newline at end of file diff --git a/vite.config.js b/vite.config.ts similarity index 59% rename from vite.config.js rename to vite.config.ts index 056769276..71fbcead6 100644 --- a/vite.config.js +++ b/vite.config.ts @@ -1,58 +1,47 @@ -import { defineConfig, loadEnv } from 'vite' -import path from 'path' -import createVitePlugins from './vite/plugins' - -// https://vitejs.dev/config/ -export default defineConfig(({ mode, command }) => { - const env = loadEnv(mode, process.cwd()) - const { VITE_APP_ENV } = env - return { - // 部署生产环境和开发环境下的URL。 - // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上 - // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 - base: VITE_APP_ENV === 'production' ? '/' : '/', - plugins: createVitePlugins(env, command === 'build'), - resolve: { - // https://cn.vitejs.dev/config/#resolve-alias - alias: { - // 设置路径 - '~': path.resolve(__dirname, './'), - // 设置别名 - '@': path.resolve(__dirname, './src') - }, - // https://cn.vitejs.dev/config/#resolve-extensions - extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] - }, - // vite 相关配置 - server: { - port: 80, - host: true, - open: true, - proxy: { - // https://cn.vitejs.dev/config/#server-proxy - '/dev-api': { - target: 'http://localhost:8080', - changeOrigin: true, - rewrite: (p) => p.replace(/^\/dev-api/, '') - } - } - }, - //fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file - css: { - postcss: { - plugins: [ - { - postcssPlugin: 'internal:charset-removal', - AtRule: { - charset: (atRule) => { - if (atRule.name === 'charset') { - atRule.remove(); - } - } - } - } - ] - } - } - } -}) +import { defineConfig, loadEnv } from 'vite' +import createVitePlugins from './vite/plugins' +import path from 'path' + +export default defineConfig(({ mode, command }) => { + const env = loadEnv(mode, process.cwd()) + const { VITE_APP_ENV } = env + return { + plugins: createVitePlugins(env, command === 'build'), + // 部署生产环境和开发环境下的URL。 + // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上 + // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 + base: VITE_APP_ENV === 'production' ? '/' : '/', + server: { + port: 8080, + host: true, + open: true, + proxy: { + // https://cn.vitejs.dev/config/#server-proxy + '/dev-api': { + target: 'https://cn.vitejs.dev', + changeOrigin: true, + rewrite: p => p.replace(/^\/dev-api/, '') + } + } + }, + resolve: { + alias: { + // 设置路径 + '~': path.resolve(__dirname, './'), + // 设置别名 + '@': path.resolve(__dirname, './src') + } + }, + build: { + rollupOptions: { + output: { + manualChunks(id) { + if (id.includes('element-plus/theme')) { + return 'ele' + } + } + } + } + } + } +}) diff --git a/vite/plugins/auto-import.js b/vite/plugins/auto-import.ts similarity index 95% rename from vite/plugins/auto-import.js rename to vite/plugins/auto-import.ts index ba5168982..a5d357638 100644 --- a/vite/plugins/auto-import.js +++ b/vite/plugins/auto-import.ts @@ -1,12 +1,12 @@ -import autoImport from 'unplugin-auto-import/vite' - -export default function createAutoImport() { - return autoImport({ - imports: [ - 'vue', - 'vue-router', - 'pinia' - ], - dts: false - }) -} +import autoImport from 'unplugin-auto-import/vite' + +export default function createAutoImport() { + return autoImport({ + imports: [ + 'vue', + 'vue-router', + 'pinia' + ], + dts: false + }) +} diff --git a/vite/plugins/components.ts b/vite/plugins/components.ts new file mode 100644 index 000000000..b364cd55b --- /dev/null +++ b/vite/plugins/components.ts @@ -0,0 +1,9 @@ +import Components from 'unplugin-vue-components/vite'; +import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'; +export default function createComponents() { + return Components({ + // dts: true, // enabled by default if `typescript` is installed + dts: 'src/components.d.ts', + resolvers: [ElementPlusResolver()], + }); +} \ No newline at end of file diff --git a/vite/plugins/compression.js b/vite/plugins/compression.js deleted file mode 100644 index 97673086a..000000000 --- a/vite/plugins/compression.js +++ /dev/null @@ -1,28 +0,0 @@ -import compression from 'vite-plugin-compression' - -export default function createCompression(env) { - const { VITE_BUILD_COMPRESS } = env - const plugin = [] - if (VITE_BUILD_COMPRESS) { - const compressList = VITE_BUILD_COMPRESS.split(',') - if (compressList.includes('gzip')) { - // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件 - plugin.push( - compression({ - ext: '.gz', - deleteOriginFile: false - }) - ) - } - if (compressList.includes('brotli')) { - plugin.push( - compression({ - ext: '.br', - algorithm: 'brotliCompress', - deleteOriginFile: false - }) - ) - } - } - return plugin -} diff --git a/vite/plugins/compression.ts b/vite/plugins/compression.ts new file mode 100644 index 000000000..27058ae18 --- /dev/null +++ b/vite/plugins/compression.ts @@ -0,0 +1,37 @@ +/* + * @Description: + * @Author: Panda + * @Date: 2024-02-27 15:19:26 + * @LastEditors: Panda + * @LastEditTime: 2024-02-29 10:56:52 + * @FilePath: \shop-admind:\vueworkspace\RuoYi-Vue3\vite\plugins\compression.ts + */ +import { PluginOption } from 'vite' +import compression from 'vite-plugin-compression' + +export default function createCompression(env: Record) { + const { VITE_BUILD_COMPRESS } = env + const plugin: PluginOption[] = [] + if (VITE_BUILD_COMPRESS) { + const compressList = VITE_BUILD_COMPRESS.split(',') + if (compressList.includes('gzip')) { + // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件 + plugin.push( + compression({ + ext: '.gz', + deleteOriginFile: false + }) + ) + } + if (compressList.includes('brotli')) { + plugin.push( + compression({ + ext: '.br', + algorithm: 'brotliCompress', + deleteOriginFile: false + }) + ) + } + } + return plugin +} diff --git a/vite/plugins/index.js b/vite/plugins/index.js deleted file mode 100644 index 7715adc01..000000000 --- a/vite/plugins/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import vue from '@vitejs/plugin-vue' - -import createAutoImport from './auto-import' -import createSvgIcon from './svg-icon' -import createCompression from './compression' -import createSetupExtend from './setup-extend' - -export default function createVitePlugins(viteEnv, isBuild = false) { - const vitePlugins = [vue()] - vitePlugins.push(createAutoImport()) - vitePlugins.push(createSetupExtend()) - vitePlugins.push(createSvgIcon(isBuild)) - isBuild && vitePlugins.push(...createCompression(viteEnv)) - return vitePlugins -} diff --git a/vite/plugins/index.ts b/vite/plugins/index.ts new file mode 100644 index 000000000..a383d3918 --- /dev/null +++ b/vite/plugins/index.ts @@ -0,0 +1,26 @@ +/* + * @Description: + * @Author: Panda + * @Date: 2024-02-27 15:19:26 + * @LastEditors: Panda + * @LastEditTime: 2024-02-29 10:56:21 + * @FilePath: \shop-admind:\vueworkspace\RuoYi-Vue3\vite\plugins\index.ts + */ +import vue from '@vitejs/plugin-vue' + +import createAutoImport from './auto-import' +import createComponents from './components' +import createSvgIcon from './svg-icon' +import createCompression from './compression' +import createSetupExtend from './setup-extend' +import { PluginOption } from 'vite' + +export default function createVitePlugins(viteEnv: Record, isBuild = false) { + const vitePlugins: PluginOption[] = [vue()] + vitePlugins.push(createAutoImport()) + vitePlugins.push(createComponents()) + vitePlugins.push(createSetupExtend()) + vitePlugins.push(createSvgIcon(isBuild)) + isBuild && vitePlugins.push(...createCompression(viteEnv)) + return vitePlugins +} diff --git a/vite/plugins/setup-extend.js b/vite/plugins/setup-extend.ts similarity index 96% rename from vite/plugins/setup-extend.js rename to vite/plugins/setup-extend.ts index eac072c1b..ed8342e98 100644 --- a/vite/plugins/setup-extend.js +++ b/vite/plugins/setup-extend.ts @@ -1,5 +1,5 @@ -import setupExtend from 'unplugin-vue-setup-extend-plus/vite' - -export default function createSetupExtend() { - return setupExtend({}) -} +import setupExtend from 'unplugin-vue-setup-extend-plus/vite' + +export default function createSetupExtend() { + return setupExtend({}) +} diff --git a/vite/plugins/svg-icon.js b/vite/plugins/svg-icon.js deleted file mode 100644 index f23beffc4..000000000 --- a/vite/plugins/svg-icon.js +++ /dev/null @@ -1,10 +0,0 @@ -import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' -import path from 'path' - -export default function createSvgIcon(isBuild) { - return createSvgIconsPlugin({ - iconDirs: [path.resolve(process.cwd(), 'src/assets/icons/svg')], - symbolId: 'icon-[dir]-[name]', - svgoOptions: isBuild - }) -} diff --git a/vite/plugins/svg-icon.ts b/vite/plugins/svg-icon.ts new file mode 100644 index 000000000..2862a9e9d --- /dev/null +++ b/vite/plugins/svg-icon.ts @@ -0,0 +1,10 @@ +import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' +import path from 'path' + +export default function createSvgIcon(isBuild: boolean) { + return createSvgIconsPlugin({ + iconDirs: [path.resolve(process.cwd(), 'src/assets/icons/svg')], + symbolId: 'icon-[dir]-[name]', + svgoOptions: isBuild + }) +} From 396e368ab721cf4eb48b06ab7b42208e4466e0c8 Mon Sep 17 00:00:00 2001 From: Panda Date: Thu, 29 Feb 2024 16:13:35 +0800 Subject: [PATCH 03/10] =?UTF-8?q?vite=20=E6=8F=92=E4=BB=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 73 +++++++++ env.d.ts | 1 - package.json | 6 +- pnpm-lock.yaml | 241 +++++++++++++++++++++++++++- src/components/SvgIcon/index.vue | 4 +- vite.config.ts | 7 +- vite/plugins/components.ts | 23 ++- vite/plugins/icon.ts | 6 + vite/plugins/index.ts | 6 +- vite/plugins/optimizationPersist.ts | 5 + vite/plugins/pkgConfig.ts | 6 + 11 files changed, 361 insertions(+), 17 deletions(-) create mode 100644 components.d.ts delete mode 100644 env.d.ts create mode 100644 vite/plugins/icon.ts create mode 100644 vite/plugins/optimizationPersist.ts create mode 100644 vite/plugins/pkgConfig.ts diff --git a/components.d.ts b/components.d.ts new file mode 100644 index 000000000..6b77cff29 --- /dev/null +++ b/components.d.ts @@ -0,0 +1,73 @@ +// generated by unplugin-vue-components +// We suggest you to commit this file into source control +// Read more: https://github.com/vuejs/core/pull/3399 +import '@vue/runtime-core' + +export {} + +declare module '@vue/runtime-core' { + export interface GlobalComponents { + Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default'] + Crontab: typeof import('./src/components/Crontab/index.vue')['default'] + Day: typeof import('./src/components/Crontab/day.vue')['default'] + DictTag: typeof import('./src/components/DictTag/index.vue')['default'] + Doc: typeof import('./src/components/RuoYi/Doc/index.vue')['default'] + Editor: typeof import('./src/components/Editor/index.vue')['default'] + ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] + ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] + ElButton: typeof import('element-plus/es')['ElButton'] + ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] + ElColorPicker: typeof import('element-plus/es')['ElColorPicker'] + ElDialog: typeof import('element-plus/es')['ElDialog'] + ElDivider: typeof import('element-plus/es')['ElDivider'] + ElDrawer: typeof import('element-plus/es')['ElDrawer'] + ElDropdown: typeof import('element-plus/es')['ElDropdown'] + ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] + ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] + ElForm: typeof import('element-plus/es')['ElForm'] + ElFormItem: typeof import('element-plus/es')['ElFormItem'] + ElIcon: typeof import('element-plus/es')['ElIcon'] + ElImage: typeof import('element-plus/es')['ElImage'] + ElInput: typeof import('element-plus/es')['ElInput'] + ElLink: typeof import('element-plus/es')['ElLink'] + ElMenu: typeof import('element-plus/es')['ElMenu'] + ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] + ElOption: typeof import('element-plus/es')['ElOption'] + ElPagination: typeof import('element-plus/es')['ElPagination'] + ElRow: typeof import('element-plus/es')['ElRow'] + ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] + ElSelect: typeof import('element-plus/es')['ElSelect'] + ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] + ElSwitch: typeof import('element-plus/es')['ElSwitch'] + ElTag: typeof import('element-plus/es')['ElTag'] + ElTooltip: typeof import('element-plus/es')['ElTooltip'] + ElTransfer: typeof import('element-plus/es')['ElTransfer'] + ElTree: typeof import('element-plus/es')['ElTree'] + ElUpload: typeof import('element-plus/es')['ElUpload'] + FileUpload: typeof import('./src/components/FileUpload/index.vue')['default'] + Git: typeof import('./src/components/RuoYi/Git/index.vue')['default'] + Hamburger: typeof import('./src/components/Hamburger/index.vue')['default'] + HeaderSearch: typeof import('./src/components/HeaderSearch/index.vue')['default'] + Hour: typeof import('./src/components/Crontab/hour.vue')['default'] + IconSelect: typeof import('./src/components/IconSelect/index.vue')['default'] + IFrame: typeof import('./src/components/iFrame/index.vue')['default'] + ImagePreview: typeof import('./src/components/ImagePreview/index.vue')['default'] + ImageUpload: typeof import('./src/components/ImageUpload/index.vue')['default'] + Min: typeof import('./src/components/Crontab/min.vue')['default'] + Month: typeof import('./src/components/Crontab/month.vue')['default'] + Pagination: typeof import('./src/components/Pagination/index.vue')['default'] + ParentView: typeof import('./src/components/ParentView/index.vue')['default'] + Result: typeof import('./src/components/Crontab/result.vue')['default'] + RightToolbar: typeof import('./src/components/RightToolbar/index.vue')['default'] + RouterLink: typeof import('vue-router')['RouterLink'] + RouterView: typeof import('vue-router')['RouterView'] + Screenfull: typeof import('./src/components/Screenfull/index.vue')['default'] + Second: typeof import('./src/components/Crontab/second.vue')['default'] + SizeSelect: typeof import('./src/components/SizeSelect/index.vue')['default'] + SvgIcon: typeof import('./src/components/SvgIcon/index.vue')['default'] + TopNav: typeof import('./src/components/TopNav/index.vue')['default'] + TreeSelect: typeof import('./src/components/TreeSelect/index.vue')['default'] + Week: typeof import('./src/components/Crontab/week.vue')['default'] + Year: typeof import('./src/components/Crontab/year.vue')['default'] + } +} diff --git a/env.d.ts b/env.d.ts deleted file mode 100644 index 11f02fe2a..000000000 --- a/env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/package.json b/package.json index e366e91b2..de85b37c9 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "vue-router": "4.2.5" }, "devDependencies": { + "@iconify/json": "^2.2.187", "@types/file-saver": "^2.0.5", "@types/js-cookie": "^3.0.2", "@types/node": "^18.7.15", @@ -52,10 +53,13 @@ "tsconfig-paths": "^4.1.0", "typescript": "^4.8.2", "unplugin-auto-import": "0.11.4", - "unplugin-vue-components": "^0.22.4", + "unplugin-icons": "^0.18.5", + "unplugin-vue-components": "^0.22.12", "unplugin-vue-setup-extend-plus": "1.0.0", "vite": "3.2.3", "vite-plugin-compression": "^0.5.1", + "vite-plugin-optimize-persist": "^0.1.2", + "vite-plugin-package-config": "^0.1.1", "vite-plugin-svg-icons": "2.0.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4fbd2b480..3eb4fb2f6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -55,6 +55,9 @@ dependencies: version: 4.2.5(vue@3.3.9) devDependencies: + '@iconify/json': + specifier: ^2.2.187 + version: 2.2.187 '@types/file-saver': specifier: ^2.0.5 version: 2.0.7 @@ -109,8 +112,11 @@ devDependencies: unplugin-auto-import: specifier: 0.11.4 version: 0.11.4(@vueuse/core@10.6.1) + unplugin-icons: + specifier: ^0.18.5 + version: 0.18.5 unplugin-vue-components: - specifier: ^0.22.4 + specifier: ^0.22.12 version: 0.22.12(vue@3.3.9) unplugin-vue-setup-extend-plus: specifier: 1.0.0 @@ -121,6 +127,12 @@ devDependencies: vite-plugin-compression: specifier: ^0.5.1 version: 0.5.1(vite@3.2.3) + vite-plugin-optimize-persist: + specifier: ^0.1.2 + version: 0.1.2(vite-plugin-package-config@0.1.1)(vite@3.2.3) + vite-plugin-package-config: + specifier: ^0.1.1 + version: 0.1.1(vite@3.2.3) vite-plugin-svg-icons: specifier: 2.0.1 version: 2.0.1(vite@3.2.3) @@ -137,6 +149,19 @@ packages: engines: {node: '>=10'} dev: true + /@antfu/install-pkg@0.1.1: + resolution: {integrity: sha512-LyB/8+bSfa0DFGC06zpCEfs89/XoWZwws5ygEa5D+Xsm3OfI+aXQ86VgVG7Acyef+rSZ5HE7J8rrxzrQeM3PjQ==} + dependencies: + execa: 5.1.1 + find-up: 5.0.0 + dev: true + + /@antfu/install-pkg@0.3.1: + resolution: {integrity: sha512-A3zWY9VeTPnxlMiZtsGHw2lSd3ghwvL8s9RiGOtqvDxhhFfZ781ynsGBa/iUnDJ5zBrmTFQrJDud3TGgRISaxw==} + dependencies: + execa: 8.0.1 + dev: true + /@antfu/utils@0.6.3: resolution: {integrity: sha512-sEYpyyKUPOew9QsXZ8feRVMzW6DWLviwOl+/ap06UQW02A8Srbc95CPHVm4eUbiBzBgD46eyIT+przv//KSSlQ==} dev: true @@ -280,6 +305,31 @@ packages: resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} dev: true + /@iconify/json@2.2.187: + resolution: {integrity: sha512-s2YGP9Nuz1x4xAQq78Y6TZFqGZ8wUO7YlOdbqjwoMgmwJPhEhUrxLs2S17im1rG5g9TzAQsYzt4vsSlgCmoKDA==} + dependencies: + '@iconify/types': 2.0.0 + pathe: 1.1.2 + dev: true + + /@iconify/types@2.0.0: + resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} + dev: true + + /@iconify/utils@2.1.22: + resolution: {integrity: sha512-6UHVzTVXmvO8uS6xFF+L/QTSpTzA/JZxtgU+KYGFyDYMEObZ1bu/b5l+zNJjHy+0leWjHI+C0pXlzGvv3oXZMA==} + dependencies: + '@antfu/install-pkg': 0.1.1 + '@antfu/utils': 0.7.7 + '@iconify/types': 2.0.0 + debug: 4.3.4 + kolorist: 1.8.0 + local-pkg: 0.5.0 + mlly: 1.6.1 + transitivePeerDependencies: + - supports-color + dev: true + /@isaacs/cliui@8.0.2: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -1835,6 +1885,36 @@ packages: resolution: {integrity: sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==} dev: false + /execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + dependencies: + cross-spawn: 7.0.3 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + dev: true + + /execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + dependencies: + cross-spawn: 7.0.3 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + dev: true + /expand-brackets@2.1.4: resolution: {integrity: sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==} engines: {node: '>=0.10.0'} @@ -2058,6 +2138,16 @@ packages: hasown: 2.0.1 dev: false + /get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + dev: true + + /get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + dev: true + /get-value@2.0.6: resolution: {integrity: sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==} engines: {node: '>=0.10.0'} @@ -2226,6 +2316,16 @@ packages: readable-stream: 3.6.2 dev: true + /human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + dev: true + + /human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + dev: true + /ignore@5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} @@ -2393,6 +2493,16 @@ packages: has-tostringtag: 1.0.2 dev: false + /is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + dev: true + + /is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} @@ -2519,6 +2629,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /kolorist@1.8.0: + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + dev: true + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -2555,6 +2669,14 @@ packages: engines: {node: '>=14'} dev: true + /local-pkg@0.5.0: + resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} + engines: {node: '>=14'} + dependencies: + mlly: 1.6.1 + pkg-types: 1.0.3 + dev: true + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -2656,6 +2778,10 @@ packages: is-plain-obj: 1.1.0 dev: true + /merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + dev: true + /merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -2702,6 +2828,16 @@ packages: mime-db: 1.52.0 dev: false + /mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + dev: true + + /mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + dev: true + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -2814,6 +2950,20 @@ packages: resolution: {integrity: sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw==} dev: false + /npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + dependencies: + path-key: 3.1.1 + dev: true + + /npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + path-key: 4.0.0 + dev: true + /nprogress@0.2.0: resolution: {integrity: sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==} dev: false @@ -2876,6 +3026,20 @@ packages: wrappy: 1.0.2 dev: true + /onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + dependencies: + mimic-fn: 2.1.0 + dev: true + + /onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + dependencies: + mimic-fn: 4.0.0 + dev: true + /optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} @@ -2933,6 +3097,11 @@ packages: engines: {node: '>=8'} dev: true + /path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + dev: true + /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true @@ -3356,6 +3525,10 @@ packages: engines: {node: '>=8'} dev: true + /signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + dev: true + /signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -3508,6 +3681,16 @@ packages: engines: {node: '>=4'} dev: true + /strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + dev: true + + /strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + dev: true + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -3820,6 +4003,37 @@ packages: - rollup dev: true + /unplugin-icons@0.18.5: + resolution: {integrity: sha512-KVNAohXbZ7tVcG1C3p6QaC7wU9Qrj7etv4XvsMMJAxr5LccQZ+Iuv5LOIv/7GtqXaGN1BuFCqRO1ErsHEgEXdQ==} + peerDependencies: + '@svgr/core': '>=7.0.0' + '@svgx/core': ^1.0.1 + '@vue/compiler-sfc': ^3.0.2 || ^2.7.0 + vue-template-compiler: ^2.6.12 + vue-template-es2015-compiler: ^1.9.0 + peerDependenciesMeta: + '@svgr/core': + optional: true + '@svgx/core': + optional: true + '@vue/compiler-sfc': + optional: true + vue-template-compiler: + optional: true + vue-template-es2015-compiler: + optional: true + dependencies: + '@antfu/install-pkg': 0.3.1 + '@antfu/utils': 0.7.7 + '@iconify/utils': 2.1.22 + debug: 4.3.4 + kolorist: 1.8.0 + local-pkg: 0.5.0 + unplugin: 1.7.1 + transitivePeerDependencies: + - supports-color + dev: true + /unplugin-vue-components@0.22.12(vue@3.3.9): resolution: {integrity: sha512-FxyzsuBvMCYPIk+8cgscGBQ345tvwVu+qY5IhE++eorkyvA4Z1TiD/HCiim+Kbqozl10i4K+z+NCa2WO2jexRA==} engines: {node: '>=14'} @@ -3933,6 +4147,31 @@ packages: - supports-color dev: true + /vite-plugin-optimize-persist@0.1.2(vite-plugin-package-config@0.1.1)(vite@3.2.3): + resolution: {integrity: sha512-H/Ebn2kZO8PvwUF08SsT5K5xMJNCWKoGX71+e9/ER3yNj7GHiFjNQlvGg5ih/zEx09MZ9m7WCxOwmEKbeIVzww==} + peerDependencies: + vite: ^2.0.0 + vite-plugin-package-config: ^0.1.0 + dependencies: + debug: 4.3.4 + fs-extra: 10.1.0 + vite: 3.2.3(@types/node@18.19.19)(sass@1.56.1) + vite-plugin-package-config: 0.1.1(vite@3.2.3) + transitivePeerDependencies: + - supports-color + dev: true + + /vite-plugin-package-config@0.1.1(vite@3.2.3): + resolution: {integrity: sha512-w9B3I8ZnqoyhlbzimXjXNk85imrMZgvI9m8f6j3zonK5IVA5KXzpT+PZOHlDz8lqh1vqvoEI1uhy+ZDoLAiA/w==} + peerDependencies: + vite: ^2.0.0 + dependencies: + debug: 4.3.4 + vite: 3.2.3(@types/node@18.19.19)(sass@1.56.1) + transitivePeerDependencies: + - supports-color + dev: true + /vite-plugin-svg-icons@2.0.1(vite@3.2.3): resolution: {integrity: sha512-6ktD+DhV6Rz3VtedYvBKKVA2eXF+sAQVaKkKLDSqGUfnhqXl3bj5PPkVTl3VexfTuZy66PmINi8Q6eFnVfRUmA==} peerDependencies: diff --git a/src/components/SvgIcon/index.vue b/src/components/SvgIcon/index.vue index b897a9e71..d0fcfdc50 100644 --- a/src/components/SvgIcon/index.vue +++ b/src/components/SvgIcon/index.vue @@ -3,7 +3,7 @@ * @Author: Panda * @Date: 2024-02-27 15:19:26 * @LastEditors: Panda - * @LastEditTime: 2024-02-29 09:56:11 + * @LastEditTime: 2024-02-29 16:11:50 * @FilePath: \shop-admind:\vueworkspace\RuoYi-Vue3\src\components\SvgIcon\index.vue -->