cloud-web-corejs 1.0.54-dev.772 → 1.0.54-dev.773
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.
- package/package.json +1 -1
- package/src/index.js +13 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -46,6 +46,19 @@ import Vab from "@base/utils/vab";
|
|
|
46
46
|
|
|
47
47
|
Vue.use(Vab);
|
|
48
48
|
|
|
49
|
+
// appCode 兜底派生:子应用(拥有自己的子命名空间,即 WEB_PREFIX !== MAIN_WEB_PREFIX)
|
|
50
|
+
// 若未在自身 settings.js 里维护 appCode,则从 WEB_PREFIX 去前导斜杠派生(/mkweb → mkweb),
|
|
51
|
+
// 免得每个子应用再手填一处、也不会写错。主应用/独立主站两前缀相同 → 保持空。
|
|
52
|
+
// 优先级:mount 里的 props.appCode > settings 显式值 > 此派生。window.WEB_PREFIX /
|
|
53
|
+
// MAIN_WEB_PREFIX 已由上面 vab 的 Object.assign(window, prefixConfig) 设好。
|
|
54
|
+
if (!settings.appCode) {
|
|
55
|
+
const webPrefix = window.WEB_PREFIX || "";
|
|
56
|
+
const mainWebPrefix = window.MAIN_WEB_PREFIX || "";
|
|
57
|
+
if (webPrefix && webPrefix !== mainWebPrefix) {
|
|
58
|
+
settings.appCode = webPrefix.replace(/^\/+/, "");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
49
62
|
Vue.use(VXETable);
|
|
50
63
|
|
|
51
64
|
/* import tablePluns from "@/mixins/table/index.js"
|