@duxweb/dvha-core 1.1.30 → 1.1.31
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/cjs/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/cjs/components/auth/can.cjs +1 -1
- package/dist/cjs/components/auth/index.cjs +1 -0
- package/dist/cjs/components/common/icon.cjs +1 -1
- package/dist/cjs/components/common/index.cjs +1 -0
- package/dist/cjs/components/common/logo.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -0
- package/dist/cjs/components/loader/iframe.cjs +1 -1
- package/dist/cjs/components/loader/index.cjs +1 -0
- package/dist/cjs/components/loader/loader.cjs +1 -1
- package/dist/cjs/components/loader/remote/index.cjs +1 -0
- package/dist/cjs/components/loader/remote/loader.cjs +1 -1
- package/dist/cjs/components/loader/remote/render.cjs +1 -1
- package/dist/cjs/components/overlay/index.cjs +1 -0
- package/dist/cjs/components/overlay/overlay.cjs +1 -1
- package/dist/cjs/components/status/error.cjs +1 -1
- package/dist/cjs/components/status/exception.cjs +1 -1
- package/dist/cjs/components/status/index.cjs +1 -0
- package/dist/cjs/components/status/notAuthorized.cjs +1 -1
- package/dist/cjs/components/status/notFound.cjs +1 -1
- package/dist/cjs/config/color.cjs +1 -1
- package/dist/cjs/directive/index.cjs +1 -0
- package/dist/cjs/directive/permission.cjs +1 -1
- package/dist/cjs/hooks/auth.cjs +1 -1
- package/dist/cjs/hooks/config.cjs +1 -1
- package/dist/cjs/hooks/data.cjs +1 -1
- package/dist/cjs/hooks/export.cjs +1 -1
- package/dist/cjs/hooks/exportCsv.cjs +2 -2
- package/dist/cjs/hooks/form.cjs +1 -1
- package/dist/cjs/hooks/formExtend.cjs +1 -1
- package/dist/cjs/hooks/formValidate.cjs +1 -1
- package/dist/cjs/hooks/i18n.cjs +1 -1
- package/dist/cjs/hooks/import.cjs +1 -1
- package/dist/cjs/hooks/importCsv.cjs +2 -2
- package/dist/cjs/hooks/index.cjs +1 -0
- package/dist/cjs/hooks/json/index.cjs +1 -1
- package/dist/cjs/hooks/json/utils/contextManager.cjs +1 -1
- package/dist/cjs/hooks/json/utils/expressionParser.cjs +1 -1
- package/dist/cjs/hooks/json/vFor.cjs +1 -1
- package/dist/cjs/hooks/json/vIf.cjs +1 -1
- package/dist/cjs/hooks/json/vModel.cjs +1 -1
- package/dist/cjs/hooks/json/vOn.cjs +1 -1
- package/dist/cjs/hooks/json/vShow.cjs +1 -1
- package/dist/cjs/hooks/json/vText.cjs +1 -1
- package/dist/cjs/hooks/json.cjs +1 -1
- package/dist/cjs/hooks/list.cjs +1 -1
- package/dist/cjs/hooks/manage.cjs +1 -1
- package/dist/cjs/hooks/menu.cjs +1 -1
- package/dist/cjs/hooks/overlay.cjs +1 -1
- package/dist/cjs/hooks/select.cjs +1 -1
- package/dist/cjs/hooks/theme.cjs +4 -8
- package/dist/cjs/hooks/tree.cjs +1 -1
- package/dist/cjs/hooks/upload/index.cjs +1 -0
- package/dist/cjs/hooks/upload/local.cjs +1 -1
- package/dist/cjs/hooks/upload/s3.cjs +1 -1
- package/dist/cjs/hooks/upload.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/main.cjs +1 -1
- package/dist/cjs/preset/authProvider.cjs +1 -1
- package/dist/cjs/preset/dataProvider.cjs +1 -1
- package/dist/cjs/preset/i18nProvider.cjs +1 -1
- package/dist/cjs/preset/index.cjs +1 -0
- package/dist/cjs/provider/app.cjs +1 -1
- package/dist/cjs/provider/index.cjs +1 -0
- package/dist/cjs/provider/tab.cjs +1 -1
- package/dist/cjs/router/index.cjs +1 -0
- package/dist/cjs/router/route.cjs +1 -1
- package/dist/cjs/stores/auth.cjs +1 -1
- package/dist/cjs/stores/i18n.cjs +1 -1
- package/dist/cjs/stores/index.cjs +1 -0
- package/dist/cjs/stores/jsonSchema.cjs +1 -1
- package/dist/cjs/stores/manage.cjs +1 -1
- package/dist/cjs/stores/route.cjs +1 -1
- package/dist/cjs/stores/tab.cjs +1 -1
- package/dist/cjs/stores/theme.cjs +1 -1
- package/dist/cjs/utils/bus.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -0
- package/dist/cjs/utils/theme.cjs +8 -8
- package/dist/cjs/utils/tree.cjs +1 -1
- package/dist/esm/_virtual/_rolldown/runtime.js +9 -0
- package/dist/esm/components/auth/can.js +17 -36
- package/dist/esm/components/auth/index.js +1 -0
- package/dist/esm/components/common/icon.js +16 -24
- package/dist/esm/components/common/index.js +2 -0
- package/dist/esm/components/common/logo.js +50 -49
- package/dist/esm/components/index.js +14 -0
- package/dist/esm/components/loader/iframe.js +16 -18
- package/dist/esm/components/loader/index.js +1 -0
- package/dist/esm/components/loader/loader.js +11 -40
- package/dist/esm/components/loader/remote/index.js +2 -0
- package/dist/esm/components/loader/remote/loader.js +118 -156
- package/dist/esm/components/loader/remote/render.js +12 -17
- package/dist/esm/components/overlay/index.js +1 -0
- package/dist/esm/components/overlay/overlay.js +54 -70
- package/dist/esm/components/status/error.js +7 -9
- package/dist/esm/components/status/exception.js +21 -37
- package/dist/esm/components/status/index.js +4 -0
- package/dist/esm/components/status/notAuthorized.js +7 -9
- package/dist/esm/components/status/notFound.js +7 -9
- package/dist/esm/config/color.js +288 -290
- package/dist/esm/directive/index.js +1 -0
- package/dist/esm/directive/permission.js +7 -27
- package/dist/esm/hooks/auth.js +154 -120
- package/dist/esm/hooks/config.js +11 -9
- package/dist/esm/hooks/data.js +416 -415
- package/dist/esm/hooks/export.js +32 -36
- package/dist/esm/hooks/exportCsv.js +42 -46
- package/dist/esm/hooks/form.js +86 -95
- package/dist/esm/hooks/formExtend.js +36 -40
- package/dist/esm/hooks/formValidate.js +22 -25
- package/dist/esm/hooks/i18n.js +14 -18
- package/dist/esm/hooks/import.js +45 -54
- package/dist/esm/hooks/importCsv.js +90 -83
- package/dist/esm/hooks/index.js +31 -0
- package/dist/esm/hooks/json/index.js +14 -22
- package/dist/esm/hooks/json/utils/contextManager.js +35 -26
- package/dist/esm/hooks/json/utils/expressionParser.js +100 -123
- package/dist/esm/hooks/json/vFor.js +50 -55
- package/dist/esm/hooks/json/vIf.js +17 -16
- package/dist/esm/hooks/json/vModel.js +96 -106
- package/dist/esm/hooks/json/vOn.js +30 -32
- package/dist/esm/hooks/json/vShow.js +20 -22
- package/dist/esm/hooks/json/vText.js +44 -51
- package/dist/esm/hooks/json.js +131 -132
- package/dist/esm/hooks/list.js +150 -184
- package/dist/esm/hooks/manage.js +25 -22
- package/dist/esm/hooks/menu.js +57 -61
- package/dist/esm/hooks/overlay.js +6 -23
- package/dist/esm/hooks/select.js +84 -94
- package/dist/esm/hooks/theme.js +289 -219
- package/dist/esm/hooks/tree.js +43 -47
- package/dist/esm/hooks/upload/index.js +2 -0
- package/dist/esm/hooks/upload/local.js +24 -30
- package/dist/esm/hooks/upload/s3.js +70 -80
- package/dist/esm/hooks/upload.js +256 -272
- package/dist/esm/index.js +150 -141
- package/dist/esm/main.js +24 -45
- package/dist/esm/preset/authProvider.js +62 -68
- package/dist/esm/preset/dataProvider.js +154 -180
- package/dist/esm/preset/i18nProvider.js +28 -30
- package/dist/esm/preset/index.js +3 -0
- package/dist/esm/provider/app.js +124 -151
- package/dist/esm/provider/index.js +2 -0
- package/dist/esm/provider/tab.js +49 -66
- package/dist/esm/router/index.js +1 -0
- package/dist/esm/router/route.js +39 -46
- package/dist/esm/stores/auth.js +51 -46
- package/dist/esm/stores/i18n.js +32 -29
- package/dist/esm/stores/index.js +7 -0
- package/dist/esm/stores/jsonSchema.js +47 -34
- package/dist/esm/stores/manage.js +63 -48
- package/dist/esm/stores/route.js +60 -56
- package/dist/esm/stores/tab.js +55 -60
- package/dist/esm/stores/theme.js +48 -55
- package/dist/esm/utils/bus.js +3 -5
- package/dist/esm/utils/index.js +3 -0
- package/dist/esm/utils/theme.js +110 -93
- package/dist/esm/utils/tree.js +28 -37
- package/package.json +1 -1
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { evaluateExpression as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { createAdaptorResult as e, evaluateCondition as t, extractContext as n } from "./utils/contextManager.js";
|
|
2
|
+
import { evaluateExpression as r } from "./utils/expressionParser.js";
|
|
3
|
+
const i = {
|
|
4
|
+
name: "v-if",
|
|
5
|
+
priority: 100,
|
|
6
|
+
process(i, a) {
|
|
7
|
+
let o = i.attrs || {}, s = n(a), c;
|
|
8
|
+
return o["v-if"] === void 0 ? o["v-else-if"] === void 0 ? o["v-else"] !== void 0 && (c = !0) : c = t(o["v-else-if"], s, r) : c = t(o["v-if"], s, r), c === void 0 ? null : e(a, {
|
|
9
|
+
skip: !c,
|
|
10
|
+
cleanKeys: [
|
|
11
|
+
"v-if",
|
|
12
|
+
"v-else-if",
|
|
13
|
+
"v-else"
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
17
|
};
|
|
18
|
+
export { i as vIfAdaptor };
|
|
@@ -1,109 +1,99 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
1
|
+
import { extractContext as e } from "./utils/contextManager.js";
|
|
2
|
+
import { evaluateExpression as t } from "./utils/expressionParser.js";
|
|
3
|
+
import { toRef as n } from "vue";
|
|
4
|
+
const r = {
|
|
5
|
+
name: "v-model",
|
|
6
|
+
priority: 70,
|
|
7
|
+
process(t, n) {
|
|
8
|
+
let r = {}, a = {}, o = !1, s = e(n);
|
|
9
|
+
return Object.entries(n).forEach(([e, t]) => {
|
|
10
|
+
if (e.startsWith("v-model") || e.startsWith("vModel")) {
|
|
11
|
+
o = !0;
|
|
12
|
+
let [n, ...a] = e.split("."), c;
|
|
13
|
+
c = n === "v-model" || n === "vModel" ? "modelValue" : n.startsWith("v-model:") ? n.slice(8) : n.startsWith("vModel:") ? n.slice(7) : "modelValue";
|
|
14
|
+
try {
|
|
15
|
+
let { modelValue: e, updateFn: n } = i(t, a, s);
|
|
16
|
+
r[c] = e, r[`onUpdate:${c}`] = n;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
console.error(`v-model binding error (${c}):`, e);
|
|
19
|
+
}
|
|
20
|
+
} else a[e] = t;
|
|
21
|
+
}), o ? { props: {
|
|
22
|
+
...a,
|
|
23
|
+
...r
|
|
24
|
+
} } : null;
|
|
25
|
+
}
|
|
27
26
|
};
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
updateFn: (o) => {
|
|
87
|
-
i.value = d(o, l);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
27
|
+
function i(e, r, i) {
|
|
28
|
+
if (typeof e == "string") return {
|
|
29
|
+
modelValue: (() => {
|
|
30
|
+
try {
|
|
31
|
+
return t(e, i);
|
|
32
|
+
} catch (t) {
|
|
33
|
+
console.warn(`v-model: Failed to evaluate expression "${e}"`, t);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
})(),
|
|
37
|
+
updateFn: (n) => {
|
|
38
|
+
try {
|
|
39
|
+
let o = e.split(".");
|
|
40
|
+
if (o.length >= 2) {
|
|
41
|
+
let e = o.slice(0, -1).join("."), s = o[o.length - 1], c = t(e, i);
|
|
42
|
+
if (c && typeof c == "object") {
|
|
43
|
+
c[s] = a(n, r);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
console.warn(`v-model: Cannot update expression "${e}". Target object not found.`);
|
|
48
|
+
} catch (t) {
|
|
49
|
+
console.warn(`v-model: Failed to update expression "${e}"`, t);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
if (Array.isArray(e) && e.length === 2 && typeof e[0] == "function" && typeof e[1] == "function") {
|
|
54
|
+
let [t, n] = e;
|
|
55
|
+
return {
|
|
56
|
+
modelValue: t(),
|
|
57
|
+
updateFn: (e) => {
|
|
58
|
+
n(a(e, r));
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
if (Array.isArray(e) && e.length === 2) {
|
|
63
|
+
let [t, i] = e;
|
|
64
|
+
if (!t || typeof i != "string") throw Error("Invalid v-model binding format: [obj, prop] expected");
|
|
65
|
+
let o = n(t, i);
|
|
66
|
+
return {
|
|
67
|
+
modelValue: o.value,
|
|
68
|
+
updateFn: (e) => {
|
|
69
|
+
o.value = a(e, r);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
let o = n(e);
|
|
74
|
+
return o === e && typeof e != "object" ? {
|
|
75
|
+
modelValue: e,
|
|
76
|
+
updateFn: () => {
|
|
77
|
+
console.warn("v-model: Cannot update non-reactive value. Please use ref, [obj, prop], or [getter, setter] format.");
|
|
78
|
+
}
|
|
79
|
+
} : {
|
|
80
|
+
modelValue: o.value,
|
|
81
|
+
updateFn: (e) => {
|
|
82
|
+
o.value = a(e, r);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
90
85
|
}
|
|
91
|
-
function
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return console.warn(`Unknown v-model modifier: ${i}`), t;
|
|
104
|
-
}
|
|
105
|
-
}, e);
|
|
86
|
+
function a(e, t) {
|
|
87
|
+
return t.reduce((e, t) => {
|
|
88
|
+
switch (t) {
|
|
89
|
+
case "trim": return typeof e == "string" ? e.trim() : e;
|
|
90
|
+
case "number": {
|
|
91
|
+
let t = Number(e);
|
|
92
|
+
return Number.isNaN(t) ? e : t;
|
|
93
|
+
}
|
|
94
|
+
case "lazy": return e;
|
|
95
|
+
default: return console.warn(`Unknown v-model modifier: ${t}`), e;
|
|
96
|
+
}
|
|
97
|
+
}, e);
|
|
106
98
|
}
|
|
107
|
-
export {
|
|
108
|
-
w as vModelAdaptor
|
|
109
|
-
};
|
|
99
|
+
export { r as vModelAdaptor };
|
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
u as vOnAdaptor
|
|
1
|
+
const e = {
|
|
2
|
+
name: "v-on",
|
|
3
|
+
priority: 60,
|
|
4
|
+
process(e, t) {
|
|
5
|
+
let n = {}, r = {}, i = !1;
|
|
6
|
+
return Object.entries(t).forEach(([e, t]) => {
|
|
7
|
+
if (e.startsWith("@") || e.startsWith("v-on:")) {
|
|
8
|
+
i = !0;
|
|
9
|
+
let [r, ...a] = (e.startsWith("@") ? e.slice(1) : e.slice(5)).split(".");
|
|
10
|
+
if (!r) {
|
|
11
|
+
console.warn(`Invalid event name: ${e}`);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
let o = `on${r.charAt(0).toUpperCase()}${r.slice(1)}`;
|
|
15
|
+
n[o] = (e, ...n) => {
|
|
16
|
+
a.includes("prevent") && e.preventDefault?.(), a.includes("stop") && e.stopPropagation?.();
|
|
17
|
+
try {
|
|
18
|
+
if (typeof t == "function") return t(e, ...n);
|
|
19
|
+
console.warn(`Invalid event handler type: ${typeof t}`);
|
|
20
|
+
} catch (e) {
|
|
21
|
+
console.error(`Event handler execution error (${r}):`, e);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
} else r[e] = t;
|
|
25
|
+
}), i ? { props: {
|
|
26
|
+
...r,
|
|
27
|
+
...n
|
|
28
|
+
} } : null;
|
|
29
|
+
}
|
|
33
30
|
};
|
|
31
|
+
export { e as vOnAdaptor };
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { evaluateExpression as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
y as vShowAdaptor
|
|
1
|
+
import { evaluateCondition as e, extractContext as t } from "./utils/contextManager.js";
|
|
2
|
+
import { evaluateExpression as n } from "./utils/expressionParser.js";
|
|
3
|
+
const r = {
|
|
4
|
+
name: "v-show",
|
|
5
|
+
priority: 95,
|
|
6
|
+
process(r, i) {
|
|
7
|
+
let a = r.attrs?.["v-show"];
|
|
8
|
+
if (a === void 0) return null;
|
|
9
|
+
let o = e(a, t(i), n), s = { ...i };
|
|
10
|
+
delete s["v-show"];
|
|
11
|
+
let c = s.style || {}, l = typeof c == "object" ? {
|
|
12
|
+
...c,
|
|
13
|
+
display: o ? void 0 : "none"
|
|
14
|
+
} : { display: o ? void 0 : "none" };
|
|
15
|
+
return { props: {
|
|
16
|
+
...s,
|
|
17
|
+
style: l
|
|
18
|
+
} };
|
|
19
|
+
}
|
|
23
20
|
};
|
|
21
|
+
export { r as vShowAdaptor };
|
|
@@ -1,54 +1,47 @@
|
|
|
1
|
-
import { evaluateExpression as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { evaluateExpression as e } from "./utils/expressionParser.js";
|
|
2
|
+
/**
|
|
3
|
+
* 检查字符串是否包含插值表达式
|
|
4
|
+
*/
|
|
5
|
+
function t(e) {
|
|
6
|
+
return typeof e == "string" && /\{\{.+?\}\}/.test(e);
|
|
4
7
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
/**
|
|
9
|
+
* 处理字符串插值
|
|
10
|
+
*/
|
|
11
|
+
function n(n, r) {
|
|
12
|
+
return t(n) ? n.replace(/\{\{([^}]+)\}\}/g, (t, n) => {
|
|
13
|
+
try {
|
|
14
|
+
let t = e(n.trim(), r);
|
|
15
|
+
return String(t ?? "");
|
|
16
|
+
} catch (e) {
|
|
17
|
+
return console.warn(`Interpolation expression evaluation failed: ${n}`, e), t;
|
|
18
|
+
}
|
|
19
|
+
}) : n;
|
|
14
20
|
}
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
children: p
|
|
41
|
-
};
|
|
42
|
-
return {
|
|
43
|
-
props: i,
|
|
44
|
-
nodes: [t]
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
props: i
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
export {
|
|
53
|
-
d as vTextAdaptor
|
|
21
|
+
const r = {
|
|
22
|
+
name: "v-text",
|
|
23
|
+
priority: 50,
|
|
24
|
+
process(e, r) {
|
|
25
|
+
let i = r._context || {}, a = !1, o = !1, s = {};
|
|
26
|
+
Object.entries(r).forEach(([e, r]) => {
|
|
27
|
+
if (typeof r == "string" && t(r)) {
|
|
28
|
+
let t = n(r, i);
|
|
29
|
+
t === r ? s[e] = r : (s[e] = t, a = !0);
|
|
30
|
+
} else s[e] = r;
|
|
31
|
+
});
|
|
32
|
+
let c = e.children;
|
|
33
|
+
if (typeof e.children == "string" && t(e.children)) {
|
|
34
|
+
let t = n(e.children, i);
|
|
35
|
+
t !== e.children && (c = t, a = !0, o = !0);
|
|
36
|
+
}
|
|
37
|
+
return a ? o ? {
|
|
38
|
+
props: s,
|
|
39
|
+
nodes: [{
|
|
40
|
+
...e,
|
|
41
|
+
attrs: e.attrs,
|
|
42
|
+
children: c
|
|
43
|
+
}]
|
|
44
|
+
} : { props: s } : null;
|
|
45
|
+
}
|
|
54
46
|
};
|
|
47
|
+
export { r as vTextAdaptor };
|