magtool 1.5.43 → 1.5.45
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/dist/cpt/component.js +19 -21
- package/package.json +1 -1
package/dist/cpt/component.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { defineAsyncComponent as
|
|
3
|
-
class
|
|
1
|
+
import { a as p } from "../vendor.js";
|
|
2
|
+
import { defineAsyncComponent as o } from "vue";
|
|
3
|
+
class c {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.appRegistrationStatus = /* @__PURE__ */ new WeakMap(), this.loadedComponents = /* @__PURE__ */ new Map(), this.loadingPromises = /* @__PURE__ */ new Map();
|
|
6
6
|
}
|
|
7
|
-
async
|
|
7
|
+
async regist(e) {
|
|
8
8
|
if (this.appRegistrationStatus.has(e))
|
|
9
9
|
return console.warn("Components already registered for this app instance"), !1;
|
|
10
10
|
try {
|
|
@@ -16,7 +16,7 @@ class v {
|
|
|
16
16
|
return console.error("Failed to register all components:", t), !1;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
async
|
|
19
|
+
async regist2(e, t) {
|
|
20
20
|
if (!Array.isArray(t) || t.length === 0)
|
|
21
21
|
return console.warn("componentNames should be a non-empty array"), !1;
|
|
22
22
|
try {
|
|
@@ -27,7 +27,7 @@ class v {
|
|
|
27
27
|
return console.error("Failed to register specific components:", r), !1;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
async
|
|
30
|
+
async regist1(e, t) {
|
|
31
31
|
try {
|
|
32
32
|
if (this.loadedComponents.has(t))
|
|
33
33
|
return e.component(t, this.loadedComponents.get(t)), !0;
|
|
@@ -35,20 +35,18 @@ class v {
|
|
|
35
35
|
return await this.loadingPromises.get(t), e.component(t, this.loadedComponents.get(t)), !0;
|
|
36
36
|
const r = this._loadComponent(t);
|
|
37
37
|
this.loadingPromises.set(t, r);
|
|
38
|
-
const
|
|
39
|
-
return this.loadedComponents.set(t,
|
|
38
|
+
const n = await r;
|
|
39
|
+
return this.loadedComponents.set(t, n), e.component(t, n), this.loadingPromises.delete(t), !0;
|
|
40
40
|
} catch (r) {
|
|
41
41
|
return console.warn(`Failed to load component ${t}:`, r), !1;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
async _loadComponent(e) {
|
|
45
45
|
try {
|
|
46
|
-
|
|
47
|
-
return n(t.default);
|
|
46
|
+
return o(() => p(/* @__PURE__ */ Object.assign({ "./Mvc/Card/index.vue": () => import("./Card.js"), "./Mvc/Icon/index.vue": () => import("./Icon.js"), "./Mvc/Image/index.vue": () => import("./Image.js"), "./Mvc/Input/index.vue": () => import("./Input.js"), "./Mvc/Nodata/index.vue": () => import("./Nodata.js"), "./Mvc/Page/index.vue": () => import("./Page.js"), "./Mvc/Textarea/index.vue": () => import("./Textarea.js") }), `./Mvc/${e}/index.vue`, 4));
|
|
48
47
|
} catch {
|
|
49
48
|
try {
|
|
50
|
-
|
|
51
|
-
return n(r.default);
|
|
49
|
+
return o(() => p(/* @__PURE__ */ Object.assign({ "./Super/AiApp/index.vue": () => import("./AiApp.js"), "./Super/AiOrg/index.vue": () => import("./AiOrg.js"), "./Super/AsaAdGroup/index.vue": () => import("./AsaAdGroup.js"), "./Super/AsaApp/index.vue": () => import("./AsaApp.js"), "./Super/AsaCampaign/index.vue": () => import("./AsaCampaign.js"), "./Super/AsaOrg/index.vue": () => import("./AsaOrg.js"), "./Super/Country/index.vue": () => import("./Country.js"), "./Super/CountryItem/index.vue": () => import("./CountryItem.js"), "./Super/DatePicker/index.vue": () => import("./DatePicker.js"), "./Super/EChart/index.vue": () => import("./EChart.js"), "./Super/Form/index.vue": () => import("./Form.js"), "./Super/MultipleSelect/index.vue": () => import("./MultipleSelect.js"), "./Super/Org/index.vue": () => import("./Org.js"), "./Super/StatusItem/index.vue": () => import("./StatusItem.js"), "./Super/StatusSelect/index.vue": () => import("./StatusSelect.js"), "./Super/Table/index.vue": () => import("./Table.js"), "./Super/Timezone/index.vue": () => import("./Timezone.js") }), `./Super/${e}/index.vue`, 4));
|
|
52
50
|
} catch {
|
|
53
51
|
throw new Error(`Component ${e} not found in Mvc or Super directories`);
|
|
54
52
|
}
|
|
@@ -56,11 +54,11 @@ class v {
|
|
|
56
54
|
}
|
|
57
55
|
async getAllComponentNames() {
|
|
58
56
|
const t = Object.keys(/* @__PURE__ */ Object.assign({ "./Mvc/Card/index.vue": () => import("./Card.js"), "./Mvc/Icon/index.vue": () => import("./Icon.js"), "./Mvc/Image/index.vue": () => import("./Image.js"), "./Mvc/Input/index.vue": () => import("./Input.js"), "./Mvc/Nodata/index.vue": () => import("./Nodata.js"), "./Mvc/Page/index.vue": () => import("./Page.js"), "./Mvc/Textarea/index.vue": () => import("./Textarea.js") })).map(
|
|
59
|
-
(
|
|
60
|
-
),
|
|
61
|
-
(
|
|
57
|
+
(u) => u.match(/Mvc\/(\S*)\/index.vue/)[1]
|
|
58
|
+
), n = Object.keys(/* @__PURE__ */ Object.assign({ "./Super/AiApp/index.vue": () => import("./AiApp.js"), "./Super/AiOrg/index.vue": () => import("./AiOrg.js"), "./Super/AsaAdGroup/index.vue": () => import("./AsaAdGroup.js"), "./Super/AsaApp/index.vue": () => import("./AsaApp.js"), "./Super/AsaCampaign/index.vue": () => import("./AsaCampaign.js"), "./Super/AsaOrg/index.vue": () => import("./AsaOrg.js"), "./Super/Country/index.vue": () => import("./Country.js"), "./Super/CountryItem/index.vue": () => import("./CountryItem.js"), "./Super/DatePicker/index.vue": () => import("./DatePicker.js"), "./Super/EChart/index.vue": () => import("./EChart.js"), "./Super/Form/index.vue": () => import("./Form.js"), "./Super/MultipleSelect/index.vue": () => import("./MultipleSelect.js"), "./Super/Org/index.vue": () => import("./Org.js"), "./Super/StatusItem/index.vue": () => import("./StatusItem.js"), "./Super/StatusSelect/index.vue": () => import("./StatusSelect.js"), "./Super/Table/index.vue": () => import("./Table.js"), "./Super/Timezone/index.vue": () => import("./Timezone.js") })).map(
|
|
59
|
+
(u) => u.match(/Super\/(\S*)\/index.vue/)[1]
|
|
62
60
|
);
|
|
63
|
-
return [...t, ...
|
|
61
|
+
return [...t, ...n];
|
|
64
62
|
}
|
|
65
63
|
/**
|
|
66
64
|
* 检查应用实例的注册状态
|
|
@@ -99,19 +97,19 @@ class v {
|
|
|
99
97
|
this.appRegistrationStatus = /* @__PURE__ */ new WeakMap(), this.loadedComponents.clear(), this.loadingPromises.clear();
|
|
100
98
|
}
|
|
101
99
|
}
|
|
102
|
-
const h = new
|
|
100
|
+
const h = new c(), s = /* @__PURE__ */ Object.assign({ "./Mvc/Card/index.vue": () => import("./Card.js"), "./Mvc/Icon/index.vue": () => import("./Icon.js"), "./Mvc/Image/index.vue": () => import("./Image.js"), "./Mvc/Input/index.vue": () => import("./Input.js"), "./Mvc/Nodata/index.vue": () => import("./Nodata.js"), "./Mvc/Page/index.vue": () => import("./Page.js"), "./Mvc/Textarea/index.vue": () => import("./Textarea.js") }), m = {};
|
|
103
101
|
for (const i in s) {
|
|
104
102
|
const e = i.match(/Mvc\/(\S*)\/index.vue/)[1];
|
|
105
|
-
m[e] =
|
|
103
|
+
m[e] = o(s[i]);
|
|
106
104
|
}
|
|
107
|
-
const a = /* @__PURE__ */ Object.assign({ "./Super/AiApp/index.vue": () => import("./AiApp.js"), "./Super/AiOrg/index.vue": () => import("./AiOrg.js"), "./Super/AsaAdGroup/index.vue": () => import("./AsaAdGroup.js"), "./Super/AsaApp/index.vue": () => import("./AsaApp.js"), "./Super/AsaCampaign/index.vue": () => import("./AsaCampaign.js"), "./Super/AsaOrg/index.vue": () => import("./AsaOrg.js"), "./Super/Country/index.vue": () => import("./Country.js"), "./Super/CountryItem/index.vue": () => import("./CountryItem.js"), "./Super/DatePicker/index.vue": () => import("./DatePicker.js"), "./Super/EChart/index.vue": () => import("./EChart.js"), "./Super/Form/index.vue": () => import("./Form.js"), "./Super/MultipleSelect/index.vue": () => import("./MultipleSelect.js"), "./Super/Org/index.vue": () => import("./Org.js"), "./Super/StatusItem/index.vue": () => import("./StatusItem.js"), "./Super/StatusSelect/index.vue": () => import("./StatusSelect.js"), "./Super/Table/index.vue": () => import("./Table.js"), "./Super/Timezone/index.vue": () => import("./Timezone.js") }),
|
|
105
|
+
const a = /* @__PURE__ */ Object.assign({ "./Super/AiApp/index.vue": () => import("./AiApp.js"), "./Super/AiOrg/index.vue": () => import("./AiOrg.js"), "./Super/AsaAdGroup/index.vue": () => import("./AsaAdGroup.js"), "./Super/AsaApp/index.vue": () => import("./AsaApp.js"), "./Super/AsaCampaign/index.vue": () => import("./AsaCampaign.js"), "./Super/AsaOrg/index.vue": () => import("./AsaOrg.js"), "./Super/Country/index.vue": () => import("./Country.js"), "./Super/CountryItem/index.vue": () => import("./CountryItem.js"), "./Super/DatePicker/index.vue": () => import("./DatePicker.js"), "./Super/EChart/index.vue": () => import("./EChart.js"), "./Super/Form/index.vue": () => import("./Form.js"), "./Super/MultipleSelect/index.vue": () => import("./MultipleSelect.js"), "./Super/Org/index.vue": () => import("./Org.js"), "./Super/StatusItem/index.vue": () => import("./StatusItem.js"), "./Super/StatusSelect/index.vue": () => import("./StatusSelect.js"), "./Super/Table/index.vue": () => import("./Table.js"), "./Super/Timezone/index.vue": () => import("./Timezone.js") }), v = {};
|
|
108
106
|
for (const i in a) {
|
|
109
107
|
const e = i.match(/Super\/(\S*)\/index.vue/)[1];
|
|
110
|
-
|
|
108
|
+
v[e] = o(a[i]);
|
|
111
109
|
}
|
|
112
110
|
const d = {
|
|
113
111
|
...m,
|
|
114
|
-
...
|
|
112
|
+
...v
|
|
115
113
|
}, l = (i) => {
|
|
116
114
|
for (let e in d)
|
|
117
115
|
i.component(e, d[e]);
|