@dazhicheng/ui 1.5.241 → 1.5.243
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/components/tt-form/src/form-render/FormField.vue2.js +37 -34
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +1 -1
- package/dist/components/tt-panel-select/src/index.vue.js +7 -11
- package/dist/hooks/useDataPermissionOptions.js +92 -77
- package/dist/hooks/useFormSchemasLink.js +204 -161
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ve, useTemplateRef as K, unref as l, computed as a, reactive as he, markRaw as be, toRaw as ye, watch as G, nextTick as Ce, onUnmounted as ge, createBlock as h, createCommentVNode as c, openBlock as u, mergeProps as
|
|
1
|
+
import { defineComponent as ve, useTemplateRef as K, unref as l, computed as a, reactive as he, markRaw as be, toRaw as ye, watch as G, nextTick as Ce, onUnmounted as ge, createBlock as h, createCommentVNode as c, openBlock as u, mergeProps as k, withCtx as b, withDirectives as Fe, createVNode as F, createElementVNode as L, createElementBlock as H, normalizeClass as O, normalizeStyle as J, renderSlot as Re, normalizeProps as we, guardReactiveProps as Se, resolveDynamicComponent as Ne, createSlots as ke, renderList as Oe, Transition as Ee, vShow as Pe } from "vue";
|
|
2
2
|
import Be from "../form/FormControl.vue.js";
|
|
3
3
|
import Te from "../form/FormDescription.vue.js";
|
|
4
4
|
import Ve from "../form/FormItem.vue.js";
|
|
@@ -18,7 +18,7 @@ import "../../../tt-icon/index.js";
|
|
|
18
18
|
import "@vueuse/core";
|
|
19
19
|
import { useFormValues as Ae, useFieldError as Me, Field as Ue } from "vee-validate";
|
|
20
20
|
/* empty css */
|
|
21
|
-
import
|
|
21
|
+
import E from "../form/RenderContent.vue.js";
|
|
22
22
|
import { toTypedSchema as De } from "@vee-validate/zod";
|
|
23
23
|
import { injectFormProps as We, injectComponentRefMap as ze } from "../useFormContext.js";
|
|
24
24
|
import { useFormContext as xe, injectRenderFormProps as Ke } from "./context.js";
|
|
@@ -66,10 +66,10 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
66
66
|
commonComponentProps: {}
|
|
67
67
|
},
|
|
68
68
|
setup(n) {
|
|
69
|
-
const
|
|
69
|
+
const P = K("wrapperRef"), { componentBindEventMap: X, componentMap: Y, isVertical: C } = xe(), Z = Ke(), S = Ae(), _ = Me(n.fieldName), f = K("fieldComponentRef"), [ee, ne] = We(), j = l(ee).formApi, R = a(() => Z.compact), w = a(() => {
|
|
70
70
|
var e;
|
|
71
71
|
return ((e = _.value) == null ? void 0 : e.length) > 0;
|
|
72
|
-
}),
|
|
72
|
+
}), B = he(
|
|
73
73
|
new Proxy({}, {
|
|
74
74
|
/**
|
|
75
75
|
* @param _target 代理目标(空对象,不实际存储)
|
|
@@ -92,20 +92,20 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
92
92
|
), A = a(() => {
|
|
93
93
|
const e = y(n.component) ? Y.value[n.component] : n.component;
|
|
94
94
|
return be(ye(e));
|
|
95
|
-
}), { dynamicComponentProps: te, dynamicRules: oe, isDisabled: le, isIf: M, isRequired:
|
|
95
|
+
}), { dynamicComponentProps: te, dynamicRules: oe, isDisabled: le, isIf: M, isRequired: T, isShow: U } = Ge(
|
|
96
96
|
() => n.dependencies
|
|
97
97
|
), ie = a(() => {
|
|
98
98
|
var e;
|
|
99
99
|
return (e = n.labelClass) != null && e.includes("w-") || C.value ? {} : {
|
|
100
100
|
width: `${n.labelWidth}px`
|
|
101
101
|
};
|
|
102
|
-
}), s = a(() => oe.value || n.rules), D = a(() => !n.hide && M.value && U.value),
|
|
102
|
+
}), s = a(() => oe.value || n.rules), D = a(() => !n.hide && M.value && U.value), V = a(() => {
|
|
103
103
|
var o, i, m;
|
|
104
104
|
if (!D.value)
|
|
105
105
|
return !1;
|
|
106
106
|
if (!s.value)
|
|
107
|
-
return
|
|
108
|
-
if (
|
|
107
|
+
return T.value;
|
|
108
|
+
if (T.value)
|
|
109
109
|
return !0;
|
|
110
110
|
if (y(s.value))
|
|
111
111
|
return ["required", "selectRequired"].includes(s.value);
|
|
@@ -122,10 +122,10 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
122
122
|
return null;
|
|
123
123
|
let e = s.value;
|
|
124
124
|
if (!e)
|
|
125
|
-
return
|
|
125
|
+
return T.value ? He(A.value) : null;
|
|
126
126
|
if (y(e))
|
|
127
127
|
return e;
|
|
128
|
-
if (!!
|
|
128
|
+
if (!!V.value) {
|
|
129
129
|
const i = (o = e == null ? void 0 : e.unwrap) == null ? void 0 : o.call(e);
|
|
130
130
|
i && (e = i);
|
|
131
131
|
}
|
|
@@ -141,7 +141,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
141
141
|
a(() => ({
|
|
142
142
|
componentProps: r,
|
|
143
143
|
component: n.component,
|
|
144
|
-
selectWrapRef:
|
|
144
|
+
selectWrapRef: P,
|
|
145
145
|
selectRef: f
|
|
146
146
|
}))
|
|
147
147
|
);
|
|
@@ -157,7 +157,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
157
157
|
},
|
|
158
158
|
{ immediate: !0 }
|
|
159
159
|
);
|
|
160
|
-
const
|
|
160
|
+
const N = a(() => {
|
|
161
161
|
var e;
|
|
162
162
|
return le.value || n.disabled || ((e = r.value) == null ? void 0 : e.disabled);
|
|
163
163
|
}), W = a(() => $(n.renderComponentContent) ? n.renderComponentContent(S.value, j) : {}), ue = a(() => Object.keys(W.value)), se = a(() => {
|
|
@@ -204,7 +204,10 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
204
204
|
...Reflect.has(r.value, "onChange") ? { onChange: r.value.onChange } : {},
|
|
205
205
|
...Reflect.has(r.value, "onInput") ? { onInput: r.value.onInput } : {}
|
|
206
206
|
};
|
|
207
|
-
return Reflect.has(r.value, "name") || delete o.name, y(n.component) && de.has(n.component) && o.modelValue === void 0 && (o.modelValue = !1), y(n.component) && ce.has(n.component) && (o.controls = !1, o.align = "left"),
|
|
207
|
+
return Reflect.has(r.value, "name") || delete o.name, y(n.component) && de.has(n.component) && o.modelValue === void 0 && (o.modelValue = !1), y(n.component) && ce.has(n.component) && (o.controls = !1, o.align = "left"), {
|
|
208
|
+
...o,
|
|
209
|
+
placeholder: N.value ? "" : r.value.placeholder
|
|
210
|
+
};
|
|
208
211
|
}
|
|
209
212
|
function fe() {
|
|
210
213
|
var e, t;
|
|
@@ -216,23 +219,23 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
216
219
|
p == null || p.set(n.fieldName, e);
|
|
217
220
|
}), ge(() => {
|
|
218
221
|
p != null && p.has(n.fieldName) && p.delete(n.fieldName);
|
|
219
|
-
}), (e, t) => !e.hide && l(M) ? (u(), h(l(Ue),
|
|
222
|
+
}), (e, t) => !e.hide && l(M) ? (u(), h(l(Ue), k({ key: 0 }, se.value, { name: e.fieldName }), {
|
|
220
223
|
default: b((o) => [
|
|
221
|
-
Fe(F(l(Ve),
|
|
224
|
+
Fe(F(l(Ve), k({
|
|
222
225
|
class: [{
|
|
223
226
|
"form-valid-error": w.value,
|
|
224
|
-
"form-is-required":
|
|
227
|
+
"form-is-required": V.value,
|
|
225
228
|
"pb-(--form-valid-error-nocompact-padding-bottom)": !R.value,
|
|
226
229
|
"pb-2": R.value
|
|
227
230
|
}, "relative"]
|
|
228
231
|
}, e.$attrs), {
|
|
229
232
|
default: b(() => [
|
|
230
233
|
L("div", {
|
|
231
|
-
class:
|
|
234
|
+
class: O([{ "flex-col": l(C), "flex-row items-center": !l(C) }, "flex"])
|
|
232
235
|
}, [
|
|
233
236
|
e.hideLabel ? c("", !0) : (u(), h(Je, {
|
|
234
237
|
key: 0,
|
|
235
|
-
class:
|
|
238
|
+
class: O(
|
|
236
239
|
l(q)(
|
|
237
240
|
"flex leading-6",
|
|
238
241
|
{
|
|
@@ -245,15 +248,15 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
245
248
|
help: e.help,
|
|
246
249
|
colon: e.colon,
|
|
247
250
|
label: e.label,
|
|
248
|
-
required:
|
|
251
|
+
required: V.value && !e.hideRequiredMark,
|
|
249
252
|
style: J(ie.value),
|
|
250
253
|
"tool-tip": e.toolTip,
|
|
251
254
|
"help-trigger": e.helpTrigger,
|
|
252
|
-
form:
|
|
255
|
+
form: B,
|
|
253
256
|
"tool-tip-text": e.toolTipText
|
|
254
257
|
}, {
|
|
255
258
|
default: b(() => [
|
|
256
|
-
e.label ? (u(), h(l(
|
|
259
|
+
e.label ? (u(), h(l(E), {
|
|
257
260
|
key: 0,
|
|
258
261
|
content: e.label
|
|
259
262
|
}, null, 8, ["content"])) : c("", !0)
|
|
@@ -263,35 +266,35 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
263
266
|
L("div", Xe, [
|
|
264
267
|
L("div", {
|
|
265
268
|
ref_key: "wrapperRef",
|
|
266
|
-
ref:
|
|
267
|
-
class:
|
|
269
|
+
ref: P,
|
|
270
|
+
class: O(l(q)("relative flex w-full items-center", e.wrapperClass))
|
|
268
271
|
}, [
|
|
269
272
|
F(l(Be), {
|
|
270
|
-
class:
|
|
273
|
+
class: O(l(q)(e.controlClass))
|
|
271
274
|
}, {
|
|
272
275
|
default: b(() => [
|
|
273
276
|
Re(e.$slots, "default", we(Se({
|
|
274
277
|
...o,
|
|
275
278
|
...z(o),
|
|
276
|
-
disabled:
|
|
279
|
+
disabled: N.value,
|
|
277
280
|
isInValid: w.value,
|
|
278
|
-
form:
|
|
281
|
+
form: B,
|
|
279
282
|
fieldName: e.fieldName
|
|
280
283
|
})), () => [
|
|
281
|
-
(u(), h(Ne(A.value),
|
|
284
|
+
(u(), h(Ne(A.value), k({
|
|
282
285
|
ref_key: "fieldComponentRef",
|
|
283
286
|
ref: f
|
|
284
287
|
}, {
|
|
285
288
|
...z(o),
|
|
286
|
-
disabled:
|
|
289
|
+
disabled: N.value,
|
|
287
290
|
isInValid: w.value,
|
|
288
|
-
form:
|
|
291
|
+
form: B,
|
|
289
292
|
fieldName: e.fieldName
|
|
290
|
-
}, { disabled:
|
|
293
|
+
}, { disabled: N.value }), ke({ _: 2 }, [
|
|
291
294
|
Oe(ue.value, (i) => ({
|
|
292
295
|
name: i,
|
|
293
296
|
fn: b((m) => [
|
|
294
|
-
F(l(
|
|
297
|
+
F(l(E), k({
|
|
295
298
|
content: W.value[i]
|
|
296
299
|
}, { ...m, formContext: o }), null, 16, ["content"])
|
|
297
300
|
])
|
|
@@ -302,11 +305,11 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
302
305
|
_: 2
|
|
303
306
|
}, 1032, ["class"]),
|
|
304
307
|
e.suffix ? (u(), H("div", Ye, [
|
|
305
|
-
F(l(
|
|
308
|
+
F(l(E), { content: e.suffix }, null, 8, ["content"])
|
|
306
309
|
])) : c("", !0),
|
|
307
310
|
R.value && w.value ? (u(), h(l(qe), {
|
|
308
311
|
key: 1,
|
|
309
|
-
"ref-dom":
|
|
312
|
+
"ref-dom": P.value
|
|
310
313
|
}, null, 8, ["ref-dom"])) : c("", !0)
|
|
311
314
|
], 2)
|
|
312
315
|
])
|
|
@@ -320,7 +323,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
320
323
|
class: "text-[12px]"
|
|
321
324
|
}, {
|
|
322
325
|
default: b(() => [
|
|
323
|
-
F(l(
|
|
326
|
+
F(l(E), { content: e.description }, null, 8, ["content"])
|
|
324
327
|
]),
|
|
325
328
|
_: 1
|
|
326
329
|
})) : c("", !0),
|
|
@@ -107,17 +107,13 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
107
107
|
a.value = t.multiple ? [...e] : e.at(-1);
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
|
-
V(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
Array.isArray(l) && (a.value = l.at(-1));
|
|
118
|
-
},
|
|
119
|
-
{ immediate: !0 }
|
|
120
|
-
);
|
|
110
|
+
V([() => t.multiple, () => a.value], ([e, l]) => {
|
|
111
|
+
if (e) {
|
|
112
|
+
Array.isArray(l) || (a.value = l === void 0 ? [] : [l]);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
Array.isArray(l) && (a.value = l.at(-1));
|
|
116
|
+
});
|
|
121
117
|
const C = h(), A = h(""), x = h(""), b = h(), G = S("middleRef"), v = S("selectWrapRef"), M = S("selectRef"), O = h(0);
|
|
122
118
|
function L() {
|
|
123
119
|
const e = v.value;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { queryDataPermissionDetailDataTypeContext as
|
|
2
|
-
import { ref as
|
|
3
|
-
import { useRoute as
|
|
4
|
-
const c = /* @__PURE__ */ new Map(),
|
|
5
|
-
let
|
|
6
|
-
const
|
|
1
|
+
import { queryDataPermissionDetailDataTypeContext as V, pageUser as _ } from "../api/dataTypeContext.js";
|
|
2
|
+
import { ref as j, watchEffect as F, unref as T, watch as k, computed as B } from "vue";
|
|
3
|
+
import { useRoute as G } from "vue-router";
|
|
4
|
+
const c = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
|
|
5
|
+
let v, m;
|
|
6
|
+
const H = "all", J = { label: "全部", value: H }, Q = {
|
|
7
7
|
platformId: ["platformName", "platformId"],
|
|
8
8
|
shopId: ["shopName", "shopId"],
|
|
9
9
|
purchasePlaceId: ["purchasePlaceName", "purchasePlaceCode"],
|
|
@@ -11,117 +11,132 @@ const j = "all", E = { label: "全部", value: j }, z = {
|
|
|
11
11
|
lockUserId: ["userName", "userId"],
|
|
12
12
|
userId: ["fullName", "id"]
|
|
13
13
|
};
|
|
14
|
-
async function
|
|
15
|
-
if (
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
return
|
|
14
|
+
async function W() {
|
|
15
|
+
if (v) return v;
|
|
16
|
+
if (m) return m;
|
|
17
|
+
m = _({ pageNo: 1, pageSize: 9999 }).then((s) => {
|
|
18
|
+
const o = s.records || [];
|
|
19
|
+
return v = o, o;
|
|
20
20
|
});
|
|
21
21
|
try {
|
|
22
|
-
return await
|
|
22
|
+
return await m;
|
|
23
23
|
} finally {
|
|
24
|
-
|
|
24
|
+
m = void 0;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const
|
|
29
|
-
function
|
|
30
|
-
|
|
27
|
+
function K(s) {
|
|
28
|
+
const o = G(), N = j({});
|
|
29
|
+
function g(t = {}) {
|
|
30
|
+
N.value = s.codes.reduce(
|
|
31
31
|
(e, r) => {
|
|
32
|
-
const [
|
|
33
|
-
const
|
|
32
|
+
const [a, C] = Q[r], d = (t[r] || []).map((p) => {
|
|
33
|
+
const u = r === "purchasePlaceId" ? p.purchaseInfo || {} : p;
|
|
34
34
|
return {
|
|
35
|
-
...
|
|
36
|
-
label:
|
|
37
|
-
value:
|
|
35
|
+
...p,
|
|
36
|
+
label: u == null ? void 0 : u[a],
|
|
37
|
+
value: u == null ? void 0 : u[C]
|
|
38
38
|
};
|
|
39
39
|
});
|
|
40
|
-
return e[r] =
|
|
40
|
+
return e[r] = d, e;
|
|
41
41
|
},
|
|
42
42
|
{}
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function L(t) {
|
|
46
46
|
var e;
|
|
47
|
-
return typeof
|
|
47
|
+
return typeof s.showAll == "boolean" ? s.showAll : ((e = s.showAll) == null ? void 0 : e[t]) ?? !1;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
49
|
+
function U() {
|
|
50
|
+
P.clear(), h.clear(), c.clear(), f.clear(), w.clear(), v = void 0, m = void 0;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
c.delete(t);
|
|
52
|
+
function b(t) {
|
|
53
|
+
c.delete(t), f.delete(t), h.delete(t);
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
const e =
|
|
55
|
+
function O(t) {
|
|
56
|
+
const e = f.get(t) || /* @__PURE__ */ new Set(), r = e.size;
|
|
57
|
+
s.codes.forEach((a) => e.add(a)), f.set(t, e), e.size !== r && (h.delete(t), y(t));
|
|
58
|
+
}
|
|
59
|
+
async function A(t = !1) {
|
|
60
|
+
const e = o.path, r = T(s.dataSource);
|
|
57
61
|
if (r) {
|
|
58
62
|
const i = { ...c.get(e) || {}, ...r };
|
|
59
|
-
c.set(e, i),
|
|
63
|
+
c.set(e, i), g(i);
|
|
60
64
|
return;
|
|
61
65
|
}
|
|
62
|
-
const
|
|
63
|
-
let d = t ?
|
|
66
|
+
const a = c.get(e) || {}, C = [...f.get(e) || s.codes];
|
|
67
|
+
let d = t ? C : C.filter((n) => !Object.prototype.hasOwnProperty.call(a, n));
|
|
64
68
|
if (!d.length) {
|
|
65
|
-
|
|
69
|
+
g(a);
|
|
66
70
|
return;
|
|
67
71
|
}
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
const
|
|
71
|
-
if (c.set(e,
|
|
72
|
-
|
|
72
|
+
const p = t ? void 0 : P.get(e);
|
|
73
|
+
if (p) {
|
|
74
|
+
const n = await p, l = { ...c.get(e) || {}, ...n };
|
|
75
|
+
if (c.set(e, l), d = C.filter((D) => !Object.prototype.hasOwnProperty.call(l, D)), !d.length) {
|
|
76
|
+
g(l);
|
|
73
77
|
return;
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
(
|
|
80
|
+
const u = d.filter((n) => n !== "userId"), E = d.includes("userId"), x = Promise.allSettled([
|
|
81
|
+
u.length ? V({ dataTypeName: u }).then(
|
|
82
|
+
(n) => n
|
|
79
83
|
) : Promise.resolve([]),
|
|
80
|
-
|
|
81
|
-
]).then(([
|
|
82
|
-
const
|
|
84
|
+
E ? W() : Promise.resolve(void 0)
|
|
85
|
+
]).then(([n, i]) => {
|
|
86
|
+
const l = n.status === "fulfilled" ? n.value : [], D = i.status === "fulfilled" ? i.value : void 0;
|
|
83
87
|
return {
|
|
84
|
-
...
|
|
85
|
-
...
|
|
86
|
-
const
|
|
87
|
-
return
|
|
88
|
+
...D ? { userId: D } : {},
|
|
89
|
+
...l.reduce((q, I) => {
|
|
90
|
+
const M = I == null ? void 0 : I.dataTypeCode;
|
|
91
|
+
return M && (q[M] = I.originalItems || []), q;
|
|
88
92
|
}, {})
|
|
89
93
|
};
|
|
90
|
-
}),
|
|
91
|
-
|
|
94
|
+
}), S = (w.get(e) || 0) + 1;
|
|
95
|
+
w.set(e, S), P.set(e, x);
|
|
92
96
|
try {
|
|
93
|
-
const
|
|
94
|
-
if (
|
|
95
|
-
const
|
|
96
|
-
c.set(e,
|
|
97
|
+
const n = await x;
|
|
98
|
+
if (w.get(e) !== S) return;
|
|
99
|
+
const l = { ...c.get(e) || {}, ...n };
|
|
100
|
+
c.set(e, l), g(l);
|
|
97
101
|
} finally {
|
|
98
|
-
|
|
102
|
+
w.get(e) === S && P.delete(e);
|
|
99
103
|
}
|
|
100
104
|
}
|
|
101
|
-
async function
|
|
102
|
-
const t =
|
|
103
|
-
|
|
105
|
+
async function z() {
|
|
106
|
+
const t = o.path, e = new Set(f.get(t) || s.codes);
|
|
107
|
+
U(), f.set(t, e), b(t), await A(!0);
|
|
108
|
+
}
|
|
109
|
+
function y(t) {
|
|
110
|
+
const e = h.get(t);
|
|
111
|
+
if (e) return e;
|
|
112
|
+
const r = Promise.resolve().then(() => A());
|
|
113
|
+
return h.set(t, r), r.finally(() => {
|
|
114
|
+
h.get(t) === r && h.delete(t);
|
|
115
|
+
}), r;
|
|
104
116
|
}
|
|
105
|
-
|
|
106
|
-
const t =
|
|
117
|
+
F(() => {
|
|
118
|
+
const t = T(s.dataSource);
|
|
107
119
|
if (!t) return;
|
|
108
|
-
const e =
|
|
109
|
-
c.set(e,
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
()
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
120
|
+
const e = o.path, a = { ...c.get(e) || {}, ...t };
|
|
121
|
+
c.set(e, a), g(a);
|
|
122
|
+
});
|
|
123
|
+
function R(t) {
|
|
124
|
+
g(c.get(t));
|
|
125
|
+
}
|
|
126
|
+
return O(o.path), y(o.path).then(() => R(o.path)), k(
|
|
127
|
+
() => o.path,
|
|
128
|
+
(t) => {
|
|
129
|
+
O(t), y(t).then(() => R(t));
|
|
130
|
+
}
|
|
116
131
|
), {
|
|
117
132
|
/**
|
|
118
133
|
* 数据源
|
|
119
134
|
*/
|
|
120
|
-
dataSource:
|
|
121
|
-
const t =
|
|
135
|
+
dataSource: B(() => {
|
|
136
|
+
const t = s.codes.reduce(
|
|
122
137
|
(e, r) => {
|
|
123
|
-
const
|
|
124
|
-
return e[r] =
|
|
138
|
+
const a = N.value[r] || [];
|
|
139
|
+
return e[r] = L(r) ? [J, ...a] : a, e;
|
|
125
140
|
},
|
|
126
141
|
{}
|
|
127
142
|
);
|
|
@@ -137,9 +152,9 @@ function J(n) {
|
|
|
137
152
|
/**
|
|
138
153
|
* @description 清空所有缓存,重新请求
|
|
139
154
|
*/
|
|
140
|
-
reload:
|
|
155
|
+
reload: z
|
|
141
156
|
};
|
|
142
157
|
}
|
|
143
158
|
export {
|
|
144
|
-
|
|
159
|
+
K as useDataPermissionOptions
|
|
145
160
|
};
|