mod vue2 to vue3

This commit is contained in:
chenhaodong
2026-06-18 01:46:49 +08:00
parent d30ff1a362
commit 7e34de776c
6 changed files with 3850 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
// Variables exported as JS object for Vite compatibility
// Original source: variables.scss :export block
export default {
menuText: '#bfcbd9',
menuActiveText: '#409EFF',
subMenuActiveText: '#f4f4f5',
menuBg: '#304156',
menuHover: '#263445',
subMenuBg: '#1f2d3d',
subMenuHover: '#001528',
sideBarWidth: '210px'
}
+14
View File
@@ -0,0 +1,14 @@
/**
* 简易路径解析工具,替代 Node.js path 模块(Vite 不提供 Node polyfill
* 用法: resolve('/sys', 'config') => '/sys/config'
*/
export function resolve(...segments) {
let joined = segments.join('/')
// 去除重复斜杠
joined = joined.replace(/\/+/g, '/')
// 确保以 / 开头
if (!joined.startsWith('/')) joined = '/' + joined
// 去除末尾斜杠(除非就是根路径)
if (joined.length > 1 && joined.endsWith('/')) joined = joined.slice(0, -1)
return joined
}