@ganwei-web/ganwei-pc-cli 6.3.5 → 6.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"ganwei-iotcenter-event-querys": "http://127.0.0.1:8380",
|
|
5
5
|
"ganwei-iotcenter-index": "http://127.0.0.1:8160",
|
|
6
6
|
"ganwei-iotcenter-login": "http://127.0.0.1:8180",
|
|
7
|
-
"ganwei-iotcenter-
|
|
7
|
+
"ganwei-iotcenter-template": "http://127.0.0.1:8540"
|
|
8
8
|
},
|
|
9
9
|
"applicationPath": {},
|
|
10
10
|
"proxyTarget": "https://127.0.0.1:44380/"
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "ganwei-iotcenter-
|
|
2
|
+
"name": "ganwei-iotcenter-template",
|
|
3
3
|
"private": true,
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"build": "pnpm run ensure:modules && vite build --mode production",
|
|
7
|
+
"dev": "vite --force --host --mode development",
|
|
8
|
+
"build": "vite build --mode production",
|
|
10
9
|
"fix": "eslint --fix src/**/*.{js,ts,tsx,vue}"
|
|
11
10
|
},
|
|
12
11
|
"dependencies": {
|
|
@@ -60,7 +59,6 @@
|
|
|
60
59
|
"vue-property-decorator": "^9.1.2",
|
|
61
60
|
"vue-router": "^4.5.0",
|
|
62
61
|
"vue-slicksort": "^2.0.5",
|
|
63
|
-
"webpack": "^5.97.1",
|
|
64
62
|
"webrtc-adapter": "^7.7.1"
|
|
65
63
|
},
|
|
66
64
|
"devDependencies": {
|
|
@@ -44,15 +44,22 @@ app.config.globalProperties.$api = api
|
|
|
44
44
|
app.config.globalProperties.myUtils = {
|
|
45
45
|
configInfoData
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
|
|
48
|
+
// 权限初始化必须在 mount() 之前完成,用 async initApp() 包裹
|
|
48
49
|
async function initApp() {
|
|
50
|
+
// Step 1: 加载权限列表
|
|
51
|
+
// window.permissionList 由 index.html 中的 getUserPermissionList.js 自动挂载
|
|
49
52
|
try {
|
|
50
|
-
await window.permissionList()
|
|
51
|
-
} catch (
|
|
52
|
-
|
|
53
|
+
await (window as any).permissionList?.()
|
|
54
|
+
} catch (_) {
|
|
55
|
+
// 降级处理:权限加载失败不阻断页面渲染
|
|
53
56
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
|
|
58
|
+
// Step 2: 注册 v-permission 指令
|
|
59
|
+
// window.packageId / window.routeName 同样由脚手架 index.html 自动挂载
|
|
60
|
+
app.use(permission, (window as any).packageId, (window as any).routeName)
|
|
61
|
+
|
|
62
|
+
app.use(router).mount('#app')
|
|
57
63
|
}
|
|
58
64
|
|
|
65
|
+
initApp()
|