@ithinkdt/ui 4.0.0-700 → 4.0.0-801

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/page.js CHANGED
@@ -1,17 +1,18 @@
1
1
  import { n as useI18n } from "./use-i18n-D-AJ8KbA.js";
2
- import { a as DtUserRender, h as DataForm, i as DtUserDept, r as DtDeptRender, s as NRadios, x as NCheckboxes } from "./components-Yo5FKzwp.js";
3
- import { computed, createVNode, defineComponent, h, isVNode, mergeProps, nextTick, ref, shallowRef, unref } from "vue";
4
- import { until } from "@vueuse/core";
5
- import { NButton, NCheckbox, NColorPicker, NDatePicker, NDrawer, NDrawerContent, NFlex, NInput, NInputNumber, NModal, NScrollbar, NSelect, NText, NUpload, useMessage } from "ithinkdt-ui";
2
+ import { a as DtUserRender, h as DataForm, i as DtUserDept, r as DtDeptRender, s as NRadios, x as NCheckboxes } from "./components-BqDuqv2P.js";
3
+ import { computed, createVNode, defineComponent, h, isVNode, mergeProps, nextTick, ref, shallowRef, toValue, unref } from "vue";
4
+ import { until, useClipboard } from "@vueuse/core";
5
+ import { NButton, NCheckbox, NColorPicker, NDatePicker, NDrawer, NDrawerContent, NFlex, NIcon, NInput, NInputNumber, NModal, NScrollbar, NSelect, NText, NUpload, useMessage } from "ithinkdt-ui";
6
6
  import { nanoid } from "nanoid";
7
7
  import { format } from "date-fns";
8
8
  import { useFormItem } from "ithinkdt-ui/es/_mixins";
9
+ import { useModal } from "@ithinkdt/page";
9
10
  import { isNullish } from "@ithinkdt/common";
10
11
  import { useDict, useDictMap } from "@ithinkdt/common/dict";
11
- function _isSlot(a) {
12
- return typeof a == "function" || Object.prototype.toString.call(a) === "[object Object]" && !isVNode(a);
12
+ function _isSlot(e) {
13
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !isVNode(e);
13
14
  }
14
- var mapProps = (a) => Object.fromEntries(Object.entries(a || {}).map(([a, c]) => [a, unref(c)])), SimpleUpload = /* @__PURE__ */ defineComponent({
15
+ var mapProps = (e) => Object.fromEntries(Object.entries(e || {}).map(([e, t]) => [e, unref(t)])), SimpleUpload = /* @__PURE__ */ defineComponent({
15
16
  name: "SimpleUpload",
16
17
  props: {
17
18
  type: {
@@ -49,496 +50,592 @@ var mapProps = (a) => Object.fromEntries(Object.entries(a || {}).map(([a, c]) =>
49
50
  onUpdateFileList: { type: [Array, Function] },
50
51
  uploadFile: { type: Function }
51
52
  },
52
- setup(c, { slots: l, expose: u }) {
53
- let { t: d } = useI18n();
54
- SimpleUpload.t = d;
55
- let f = useFormItem(c), p = useMessage(), g = computed(() => c.customRequest || (({ file: a, onProgress: l, onFinish: u, onError: d }) => {
56
- c.uploadFile(a.file, (a) => l({ percent: a })).then((c) => {
57
- a.file.fileId = c, u();
58
- }).catch((a) => {
59
- p.error(a.message), d(a);
53
+ setup(t, { slots: n, expose: r }) {
54
+ let { t: i } = useI18n();
55
+ SimpleUpload.t = i;
56
+ let a = useFormItem(t), o = useMessage(), c = computed(() => t.customRequest || (({ file: e, onProgress: n, onFinish: r, onError: i }) => {
57
+ t.uploadFile(e.file, (e) => n({ percent: e })).then((t) => {
58
+ e.file.fileId = t, r();
59
+ }).catch((e) => {
60
+ o.error(e.message), i(e);
60
61
  });
61
- })), _ = ref();
62
- u({ submit() {
63
- return until(_).toBeTruthy().then((a) => a.submit());
62
+ })), l = ref();
63
+ r({ submit() {
64
+ return until(l).toBeTruthy().then((e) => e.submit());
64
65
  } });
65
- let v = (a) => {
66
- c.onUpdateFileList?.(a), nextTick(() => f.nTriggerFormChange());
66
+ let u = (e) => {
67
+ if (e) for (let n of e) n.size > t.maxSize * 1024 && (n.status = "error");
68
+ t.onUpdateFileList?.(e), nextTick(() => a.nTriggerFormChange());
67
69
  };
68
70
  return () => {
69
- let { type: a, onUpdateFileList: u, ...p } = c;
70
- return createVNode(NUpload, mergeProps(p, {
71
- ref: _,
72
- customRequest: g.value,
73
- listType: a === "image" ? "image-card" : "text",
74
- accept: p.accept ?? a === "image" ? "image/*" : void 0,
75
- "onUpdate:fileList": v
71
+ let { type: e, onUpdateFileList: r, ...o } = t;
72
+ return createVNode(NUpload, mergeProps(o, {
73
+ ref: l,
74
+ customRequest: c.value,
75
+ listType: e === "image" ? "image-card" : "text",
76
+ accept: o.accept ?? e === "image" ? "image/*" : void 0,
77
+ "onUpdate:fileList": u
76
78
  }), {
77
- default: a === "image" ? void 0 : () => {
78
- let a;
79
+ default: e === "image" ? void 0 : () => {
80
+ let e;
79
81
  return createVNode(NButton, {
80
- disabled: f.mergedDisabledRef.value,
81
- size: f.mergedSizeRef.value
82
- }, _isSlot(a = d("common.page.form.selectFileText")) ? a : { default: () => [a] });
82
+ disabled: a.mergedDisabledRef.value,
83
+ size: a.mergedSizeRef.value
84
+ }, _isSlot(e = i("common.page.form.selectFileText")) ? e : { default: () => [e] });
83
85
  },
84
- ...l
86
+ ...n
85
87
  });
86
88
  };
87
89
  }
88
90
  });
89
- function createPageFormHelper({ getUserGroups: a, getUsersByGroup: l, getDeptsByCode: d, getUsersByDept: m, getUsersByUsername: g, uploadFile: v, getFileInfos: y }) {
90
- let b = (a) => a, x = (a) => isNullish(a) ? a : String(a), T = (a) => isNullish(a) ? a : Number(a);
91
+ function createPageFormHelper({ getUserGroups: e, getUsersByGroup: n, getDeptsByCode: i, getUsersByDept: s, getUsersByUsername: c, uploadFile: u, getFileInfos: d }) {
92
+ let f = (e) => e, p = (e) => isNullish(e) ? e : String(e), g = (e) => isNullish(e) ? e : Number(e);
91
93
  return {
92
- input: () => ({ slots: a, props: c }, { modelValue: l, "onUpdate:modelValue": u, required: d, readonly: f, ...p }) => f ? createVNode(NText, {
94
+ input: () => ({ slots: e, props: t }, { modelValue: n, "onUpdate:modelValue": r, required: i, readonly: a, ...o }) => a ? createVNode(NText, {
93
95
  depth: 2,
94
96
  style: "line-height: 1.25"
95
- }, { default: () => [l ?? ""] }) : (c = mapProps(c), h(NInput, {
97
+ }, { default: () => [n ?? ""] }) : (t = mapProps(t), h(NInput, {
96
98
  clearable: !0,
97
- ...c,
98
- ...p,
99
- value: l,
100
- "onUpdate:value": u
101
- }, a)),
99
+ ...t,
100
+ ...o,
101
+ value: n,
102
+ "onUpdate:value": r
103
+ }, e)),
102
104
  number: () => {
103
- let a, c;
104
- return ({ slots: l, props: u }, { modelValue: d, "onUpdate:modelValue": f, required: p, readonly: m, ...g }) => {
105
- if (m) return createVNode(NText, {
105
+ let e, t;
106
+ return ({ slots: n, props: r }, { modelValue: i, "onUpdate:modelValue": a, required: o, readonly: s, ...c }) => {
107
+ if (s) return createVNode(NText, {
106
108
  depth: 2,
107
109
  style: "line-height: 1.25"
108
- }, { default: () => [d ?? ""] });
109
- let { valueType: v = "number", ...y } = mapProps(u), b = v === "string" ? T(d) : d;
110
- return a = f, v === "string" && !c && (c = (c, ...l) => {
111
- a(x(c), ...l);
110
+ }, { default: () => [i ?? ""] });
111
+ let { valueType: u = "number", ...d } = mapProps(r), f = u === "string" ? g(i) : i;
112
+ return e = a, u === "string" && !t && (t = (t, ...n) => {
113
+ e(p(t), ...n);
112
114
  }), h(NInputNumber, {
113
115
  clearable: !0,
114
- ...y,
115
- ...g,
116
- value: b,
117
- "onUpdate:value": v === "string" ? c : a
118
- }, l);
116
+ ...d,
117
+ ...c,
118
+ value: f,
119
+ "onUpdate:value": u === "string" ? t : e
120
+ }, n);
119
121
  };
120
122
  },
121
123
  select: () => {
122
- let a, c, l, u, d;
123
- return ({ slots: f, props: p }, { modelValue: m, "onUpdate:modelValue": g, required: v, readonly: y, ...S }) => {
124
- let { dictType: w, options: E, valueType: D = "string", ...O } = mapProps(p), k = D === "number" ? x : b;
125
- E ? c = E : a !== w && (a = w, !c && a && (c = useDict(a)));
126
- let A = O.multiple ? m?.map(k) : k(m);
127
- if (y) if (O.multiple) {
128
- let a;
124
+ let e, t, n, r, i;
125
+ return ({ slots: a, props: o }, { modelValue: s, "onUpdate:modelValue": c, required: u, readonly: d, ...m }) => {
126
+ let { dictType: v, options: y, valueType: b = "string", ...x } = mapProps(o), S = b === "number" ? p : f;
127
+ y ? t = y : e !== v && (e = v, !t && e && (t = useDict(e)));
128
+ let C = x.multiple ? s?.map(S) : S(s);
129
+ if (d) if (x.multiple) {
130
+ let e;
129
131
  return createVNode(NText, {
130
132
  depth: 2,
131
133
  style: "line-height: 1.25"
132
- }, _isSlot(a = (A?.map((a) => c?.find((c) => c[O.valueField || "value"] === a)) ?? []).map((a, c, l) => {
133
- let u = a ? O.renderLabel ? O.renderLabel(a) ?? "" : a[O.labelField || "label"] ?? "" : A[c] ?? "";
134
- return createVNode("span", { key: a ? a[O.valueField || "value"] : A[c] ?? "" }, [u, c < l.length - 1 ? ", " : ""]);
135
- })) ? a : { default: () => [a] });
134
+ }, _isSlot(e = (C?.map((e) => t?.find((t) => t[x.valueField || "value"] === e)) ?? []).map((e, t, n) => {
135
+ let r = e ? x.renderLabel ? x.renderLabel(e) ?? "" : e[x.labelField || "label"] ?? "" : C[t] ?? "";
136
+ return createVNode("span", { key: e ? e[x.valueField || "value"] : C[t] ?? "" }, [r, t < n.length - 1 ? ", " : ""]);
137
+ })) ? e : { default: () => [e] });
136
138
  } else {
137
- let a = c?.find((a) => a[O.valueField || "value"] === A);
139
+ let e = t?.find((e) => e[x.valueField || "value"] === C);
138
140
  return createVNode(NText, {
139
141
  depth: 2,
140
142
  style: "line-height: 1.25"
141
- }, { default: () => [a ? O.renderLabel ? O.renderLabel(a) ?? "" : a[O.labelField || "label"] ?? "" : A ?? ""] });
143
+ }, { default: () => [e ? x.renderLabel ? x.renderLabel(e) ?? "" : e[x.labelField || "label"] ?? "" : C ?? ""] });
142
144
  }
143
- return u = O.multiple, l = g, D === "number" && !d && (d = (a, ...c) => {
144
- l(u ? a?.map(T) : T(a), ...c);
145
+ return r = x.multiple, n = c, b === "number" && !i && (i = (e, ...t) => {
146
+ n(r ? e?.map(g) : g(e), ...t);
145
147
  }), h(NSelect, {
146
148
  clearable: !0,
147
- loading: c?.loading,
148
- ...O,
149
- options: unref(c),
150
- ...S,
151
- value: A,
152
- "onUpdate:value": D === "number" ? d : l
153
- }, f);
149
+ loading: t?.loading,
150
+ ...x,
151
+ options: unref(t),
152
+ ...m,
153
+ value: C,
154
+ "onUpdate:value": b === "number" ? i : n
155
+ }, a);
154
156
  };
155
157
  },
156
- checkbox: () => ({ slots: a, props: c }, { modelValue: l, "onUpdate:modelValue": u, required: d, readonly: f, ...p }) => {
157
- if (c = mapProps(c), f) {
158
- let u;
159
- return u = l === (c.checkedValue ?? !0) ? a?.checked ? a.checked() : createVNode(NCheckbox, { checked: !0 }, null) : a?.unchecked ? a.unchecked() : createVNode(NCheckbox, { disabled: !0 }, null), createVNode(NText, {
158
+ checkbox: () => ({ slots: e, props: t }, { modelValue: n, "onUpdate:modelValue": r, required: i, readonly: a, ...o }) => {
159
+ if (t = mapProps(t), a) {
160
+ let r;
161
+ return r = n === (t.checkedValue ?? !0) ? e?.checked ? e.checked() : createVNode(NCheckbox, { checked: !0 }, null) : e?.unchecked ? e.unchecked() : createVNode(NCheckbox, { disabled: !0 }, null), createVNode(NText, {
160
162
  depth: 2,
161
163
  style: "line-height: 1.25"
162
- }, _isSlot(u) ? u : { default: () => [u] });
164
+ }, _isSlot(r) ? r : { default: () => [r] });
163
165
  }
164
166
  return h(NCheckbox, {
165
- ...c,
166
- ...p,
167
- checked: l,
168
- "onUpdate:checked": u
169
- }, a);
167
+ ...t,
168
+ ...o,
169
+ checked: n,
170
+ "onUpdate:checked": r
171
+ }, e);
170
172
  },
171
173
  checkboxes: () => {
172
- let a, c, l, u;
173
- return ({ props: d }, { modelValue: f, "onUpdate:modelValue": m, required: g, readonly: v, ...y }) => {
174
- let { dictType: S, options: C, valueType: w = "string", ...E } = mapProps(d), D = w === "number" ? x : b;
175
- C ? c = C : a !== S && (a = S, !c && a && (c = useDict(a)));
176
- let O = f?.map(D) ?? [];
177
- if (v) {
178
- let a;
174
+ let e, t, n, r;
175
+ return ({ props: i }, { modelValue: a, "onUpdate:modelValue": s, required: c, readonly: u, ...d }) => {
176
+ let { dictType: m, options: _, valueType: v = "string", ...y } = mapProps(i), b = v === "number" ? p : f;
177
+ _ ? t = _ : e !== m && (e = m, !t && e && (t = useDict(e)));
178
+ let x = a?.map(b) ?? [];
179
+ if (u) {
180
+ let e;
179
181
  return createVNode(NText, {
180
182
  depth: 2,
181
183
  style: "line-height: 2.4"
182
- }, _isSlot(a = (O?.map((a) => c?.find((c) => c[E.valueField || "value"] === a)) ?? []).map((a, c, l) => {
183
- let u = a ? a[E.labelField ?? "label"] ?? "" : O[c] ?? "";
184
- return createVNode("span", { key: a ? a[E.valueField ?? "value"] : O[c] ?? "" }, [u, c < l.length - 1 ? ", " : ""]);
185
- })) ? a : { default: () => [a] });
184
+ }, _isSlot(e = (x?.map((e) => t?.find((t) => t[y.valueField || "value"] === e)) ?? []).map((e, t, n) => {
185
+ let r = e ? e[y.labelField ?? "label"] ?? "" : x[t] ?? "";
186
+ return createVNode("span", { key: e ? e[y.valueField ?? "value"] : x[t] ?? "" }, [r, t < n.length - 1 ? ", " : ""]);
187
+ })) ? e : { default: () => [e] });
186
188
  }
187
- return l = m, w === "number" && !u && (u = (a, ...c) => {
188
- l(a?.map(T), ...c);
189
+ return n = s, v === "number" && !r && (r = (e, ...t) => {
190
+ n(e?.map(g), ...t);
189
191
  }), h(NCheckboxes, {
190
- ...E,
191
192
  ...y,
192
- options: c,
193
- modelValue: O,
194
- "onUpdate:modelValue": w === "number" ? u : l
193
+ ...d,
194
+ options: t,
195
+ modelValue: x,
196
+ "onUpdate:modelValue": v === "number" ? r : n
195
197
  });
196
198
  };
197
199
  },
198
200
  radios: () => {
199
- let a, c, l, u;
200
- return ({ props: d }, { modelValue: p, "onUpdate:modelValue": m, required: g, readonly: v, ...y }) => {
201
- let { dictType: S, options: C, valueType: w = "string", ...E } = mapProps(d), D = w === "number" ? x : b;
202
- C ? c = C : a !== S && (a = S, !c && a && (c = useDict(a)));
203
- let O = D(p);
204
- if (v) {
205
- let a = c?.find((a) => a[E.valueField ?? "value"] === O);
201
+ let e, t, n, r;
202
+ return ({ props: i }, { modelValue: o, "onUpdate:modelValue": s, required: c, readonly: u, ...d }) => {
203
+ let { dictType: m, options: _, valueType: v = "string", ...y } = mapProps(i), b = v === "number" ? p : f;
204
+ _ ? t = _ : e !== m && (e = m, !t && e && (t = useDict(e)));
205
+ let x = b(o);
206
+ if (u) {
207
+ let e = t?.find((e) => e[y.valueField ?? "value"] === x);
206
208
  return createVNode(NText, {
207
209
  depth: 2,
208
210
  style: "line-height: 1.25"
209
- }, { default: () => [a ? a[E.labelField ?? "label"] ?? "" : O ?? ""] });
211
+ }, { default: () => [e ? e[y.labelField ?? "label"] ?? "" : x ?? ""] });
210
212
  }
211
- return l = m, w === "number" && !u && (u = (a, ...c) => {
212
- l(T(a), ...c);
213
+ return n = s, v === "number" && !r && (r = (e, ...t) => {
214
+ n(g(e), ...t);
213
215
  }), h(NRadios, {
214
- ...E,
215
216
  ...y,
216
- options: c,
217
- modelValue: O,
218
- "onUpdate:modelValue": w === "number" ? u : l
217
+ ...d,
218
+ options: t,
219
+ modelValue: x,
220
+ "onUpdate:modelValue": v === "number" ? r : n
219
221
  });
220
222
  };
221
223
  },
222
- datepicker: () => ({ slots: a, props: c }, { modelValue: l, "onUpdate:modelValue": u, required: d, readonly: f, ...p }) => {
223
- let { type: m = "date", format: g = m.startsWith("datetime") ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM-dd", ...v } = mapProps(c);
224
- return f ? m.endsWith("range") ? createVNode(NText, {
224
+ datepicker: () => ({ slots: e, props: t }, { modelValue: n, "onUpdate:modelValue": r, required: i, readonly: a, ...o }) => {
225
+ let { type: s = "date", format: c = s.startsWith("datetime") ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM-dd", ...u } = mapProps(t);
226
+ return a ? s.endsWith("range") ? createVNode(NText, {
225
227
  depth: 2,
226
228
  style: "line-height: 1.25"
227
- }, { default: () => [l ? `${l[0] ? format(l[0], g) : ""} ~ ${l[1] ? format(l[1], g) : ""}` : ""] }) : createVNode(NText, {
229
+ }, { default: () => [n ? `${n[0] ? format(n[0], c) : ""} ~ ${n[1] ? format(n[1], c) : ""}` : ""] }) : createVNode(NText, {
228
230
  depth: 2,
229
231
  style: "line-height: 1.25"
230
- }, { default: () => [l ? format(l, g) : ""] }) : h(NDatePicker, {
232
+ }, { default: () => [n ? format(n, c) : ""] }) : h(NDatePicker, {
231
233
  actions: null,
232
234
  updateValueOnClose: !0,
233
235
  clearable: !0,
234
- ...v,
235
- ...p,
236
- type: m,
237
- format: g,
238
- value: l,
239
- "onUpdate:value": u
240
- }, a);
236
+ ...u,
237
+ ...o,
238
+ type: s,
239
+ format: c,
240
+ value: n,
241
+ "onUpdate:value": r
242
+ }, e);
241
243
  },
242
- file: () => ({ slots: a, props: c }, { modelValue: l, "onUpdate:modelValue": u, required: d, readonly: f, ...p }) => {
243
- if (c = mapProps(c), f) {
244
- let a;
245
- return console.warn("[file] 原则上此组建不应该显示在详情中"), l?.length ? createVNode(NFlex, {
244
+ file: () => ({ slots: e, props: t }, { modelValue: n, "onUpdate:modelValue": r, required: i, readonly: a, ...o }) => {
245
+ if (t = mapProps(t), a) {
246
+ let e;
247
+ return console.warn("[file] 原则上此组建不应该显示在详情中"), n?.length ? createVNode(NFlex, {
246
248
  gap: "8",
247
249
  vertical: !0
248
- }, _isSlot(a = l.map((a) => createVNode("a", {
249
- key: a.id,
250
- href: a.url,
250
+ }, _isSlot(e = n.map((e) => createVNode("a", {
251
+ key: e.id,
252
+ href: e.url,
251
253
  target: "_blank",
252
254
  rel: "noreferrer",
253
255
  style: "max-width: 100px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; display: inline-block"
254
- }, [a.name]))) ? a : { default: () => [a] }) : void 0;
256
+ }, [e.name]))) ? e : { default: () => [e] }) : void 0;
255
257
  }
256
258
  return h(SimpleUpload, {
257
- ...c,
258
- ...p,
259
+ ...t,
260
+ ...o,
259
261
  defaultUpload: !1,
260
- uploadFile: v,
261
- fileList: l,
262
- onUpdateFileList: u
263
- }, a);
262
+ uploadFile: u,
263
+ fileList: n,
264
+ onUpdateFileList: r
265
+ }, e);
264
266
  },
265
267
  upload: () => {
266
- let a = null, c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = shallowRef([]), d = 0, f = (a) => {
267
- let c = ++d;
268
- u.value = a.map((a) => l.get(a)).filter(Boolean);
269
- let f = a.filter((a) => !l.has(a));
270
- Promise.resolve(f.length > 0 ? y(f) : []).then((f) => {
271
- if (c === d) {
272
- u.value = a.map((a) => l.get(a) || f.find((c) => c.id === a)), l.clear();
273
- for (let a of u.value) l.set(a.id, a);
268
+ let e = null, t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = shallowRef([]), i = 0, a = (e) => {
269
+ let t = ++i;
270
+ r.value = e.map((e) => n.get(e)).filter(Boolean);
271
+ let a = e.filter((e) => !n.has(e));
272
+ Promise.resolve(a.length > 0 ? d(a) : []).then((a) => {
273
+ if (t === i) {
274
+ r.value = e.map((e) => n.get(e) || a.find((t) => t.id === e)), n.clear();
275
+ for (let e of r.value) n.set(e.id, e);
274
276
  }
275
277
  });
276
- }, p;
278
+ }, o, s;
277
279
  return {
278
- renderer: ({ slots: d, props: m }, { modelValue: g, "onUpdate:modelValue": y, required: b, readonly: x, ...C }) => {
279
- let w = mapProps(m);
280
- if (p = w.ref ??= shallowRef(), a !== g && (a = g, f(g?.split(",") ?? [])), x) {
281
- let a;
282
- return u.value.length === 0 ? void 0 : createVNode(NFlex, {
280
+ renderer: ({ slots: i, props: c }, { modelValue: d, "onUpdate:modelValue": f, required: p, readonly: g, ..._ }) => {
281
+ let v = mapProps(c);
282
+ if (s = v.maxSize, o = v.ref ??= shallowRef(), e !== d && (e = d, a(d?.split(",") ?? [])), g) {
283
+ let e;
284
+ return r.value.length === 0 ? void 0 : createVNode(NFlex, {
283
285
  gap: "8",
284
286
  vertical: !0,
285
287
  style: "padding: 6px 0"
286
- }, _isSlot(a = u.value.map((a) => createVNode("a", {
287
- key: a.id,
288
- href: a.url,
288
+ }, _isSlot(e = r.value.map((e) => createVNode("a", {
289
+ key: e.id,
290
+ href: e.url,
289
291
  target: "_blank",
290
292
  rel: "noreferrer",
291
- title: a.name,
292
- download: a.name,
293
+ title: e.name,
294
+ download: e.name,
293
295
  style: "max-width: 100%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; display: inline-block"
294
- }, [a.name]))) ? a : { default: () => [a] });
296
+ }, [e.name]))) ? e : { default: () => [e] });
295
297
  }
296
298
  return h(SimpleUpload, {
297
- ...w,
298
- ...C,
299
- uploadFile: v,
300
- fileList: u.value,
301
- onUpdateFileList: (a = []) => {
302
- l.clear();
303
- for (let u of a) u.file?.fileId && c.set(u.id, u.file.fileId), u.file?.fileId ? l.set(u.file.fileId, u) : l.set(u.id, u);
304
- u.value = a, y(u.value.map((a) => c.get(a.id) || a.id).join(",") || null);
299
+ ...v,
300
+ ..._,
301
+ uploadFile: u,
302
+ fileList: r.value,
303
+ onUpdateFileList: (e = []) => {
304
+ n.clear();
305
+ for (let r of e) r.file?.fileId && t.set(r.id, r.file.fileId), r.file?.fileId ? n.set(r.file.fileId, r) : n.set(r.id, r);
306
+ r.value = e, f(r.value.map((e) => t.get(e.id) || e.id).join(",") || null);
305
307
  }
306
- }, d);
308
+ }, i);
307
309
  },
308
310
  beforeSubmit: async () => {
309
- if (await p?.value?.submit(), await until(u).toMatch((a) => a.every((a) => !["pending", "uploading"].includes(a.status))), u.value.some((a) => a.status === "error")) return SimpleUpload.t("common.page.form.validate.fileErrorMessage");
311
+ if (await o?.value?.submit(), await until(r).toMatch((e) => e.every((e) => !["pending", "uploading"].includes(e.status))), r.value.some((e) => e.size > s * 1024)) return SimpleUpload.t("common.page.form.validate.fileSizeExceeded", { maxSize: s });
312
+ if (r.value.some((e) => e.status === "error")) return SimpleUpload.t("common.page.form.validate.fileErrorMessage");
310
313
  }
311
314
  };
312
315
  },
313
316
  user: () => {
314
- let f, p, v;
315
- return ({ slots: y, props: b }, { modelValue: x, "onUpdate:modelValue": C, required: w, readonly: T, ...E }) => {
316
- let D = mapProps(b);
317
- return f || (f = shallowRef([]), p = shallowRef([]), v = shallowRef([]), g().then((a) => {
318
- f.value = a;
319
- }), a().then((a) => {
320
- p.value = a;
321
- }), d().then((a) => {
322
- v.value = a;
323
- })), T ? createVNode(DtUserRender, {
324
- value: x,
325
- multiple: D.multiple,
326
- getUsersByUsername: g
317
+ let a, o, u;
318
+ return ({ slots: d, props: f }, { modelValue: p, "onUpdate:modelValue": g, required: _, readonly: v, ...y }) => {
319
+ let b = mapProps(f);
320
+ return a || (a = shallowRef([]), o = shallowRef([]), u = shallowRef([]), c().then((e) => {
321
+ a.value = e;
322
+ }), e().then((e) => {
323
+ o.value = e;
324
+ }), i().then((e) => {
325
+ u.value = e;
326
+ })), v ? createVNode(DtUserRender, {
327
+ value: p,
328
+ multiple: b.multiple,
329
+ getUsersByUsername: c,
330
+ renderInfo: b.renderInfo
327
331
  }, null) : h(DtUserDept, {
328
332
  type: "user",
329
- users: f.value,
330
- depts: v.value,
331
- groups: p.value,
332
- getUsersByDept: m,
333
- getUsersByGroup: l,
334
- ...D,
335
- ...E,
336
- modelValue: x,
337
- "onUpdate:modelValue": C
338
- }, y);
333
+ users: a.value,
334
+ depts: u.value,
335
+ groups: o.value,
336
+ getUsersByDept: s,
337
+ getUsersByGroup: n,
338
+ ...b,
339
+ ...y,
340
+ renderUserInfo: b.renderInfo,
341
+ modelValue: p,
342
+ "onUpdate:modelValue": g
343
+ }, d);
339
344
  };
340
345
  }
341
346
  };
342
347
  }
343
- function createDescriptionHelper({ getDeptsByCode: a, getUsersByUsername: l, getFileInfos: u, previewFileUrl: f }) {
344
- let p = (a) => () => (c, l, { params: u = {} }) => {
345
- if (c != null) return format(c, u.formatter ?? a);
346
- }, m = (a = {}) => createVNode("svg", mergeProps({
348
+ function createDescriptionHelper({ getDeptsByCode: e, getUsersByUsername: n, getFileInfos: r, previewFileUrl: a }) {
349
+ let o = (e) => (t, n, { params: r = {} }) => {
350
+ if (t != null) return format(t, r.formatter ?? e);
351
+ }, s = (e = {}) => createVNode("svg", mergeProps({
347
352
  xmlns: "http://www.w3.org/2000/svg",
348
353
  width: "1em",
349
354
  height: "1em",
350
355
  viewBox: "0 0 32 32"
351
- }, a), [createVNode("circle", {
356
+ }, e), [createVNode("circle", {
352
357
  cx: "16",
353
358
  cy: "16",
354
359
  r: "8",
355
360
  fill: "currentColor"
361
+ }, null)]), c = (e = {}) => createVNode("svg", mergeProps({
362
+ xmlns: "http://www.w3.org/2000/svg",
363
+ width: "1em",
364
+ height: "1em",
365
+ viewBox: "0 0 24 24"
366
+ }, e), [createVNode("path", {
367
+ fill: "currentColor",
368
+ d: "M12 9a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3m0-4.5c5 0 9.27 3.11 11 7.5c-1.73 4.39-6 7.5-11 7.5S2.73 16.39 1 12c1.73-4.39 6-7.5 11-7.5M3.18 12a9.821 9.821 0 0 0 17.64 0a9.821 9.821 0 0 0-17.64 0"
369
+ }, null)]), l = (e) => createVNode("svg", mergeProps({
370
+ xmlns: "http://www.w3.org/2000/svg",
371
+ width: "1em",
372
+ height: "1em",
373
+ viewBox: "0 0 24 24"
374
+ }, e), [createVNode("path", {
375
+ fill: "currentColor",
376
+ d: "M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12z"
377
+ }, null)]), u = (e) => createVNode("svg", mergeProps({
378
+ xmlns: "http://www.w3.org/2000/svg",
379
+ width: "1em",
380
+ height: "1em",
381
+ viewBox: "0 0 24 24"
382
+ }, e), [createVNode("path", {
383
+ fill: "currentColor",
384
+ d: "M20 12a8 8 0 0 1-8 8a8 8 0 0 1-8-8a8 8 0 0 1 8-8c.76 0 1.5.11 2.2.31l1.57-1.57A9.8 9.8 0 0 0 12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10M7.91 10.08L6.5 11.5L11 16L21 6l-1.41-1.42L11 13.17z"
356
385
  }, null)]);
357
386
  return {
358
- date: p("yyyy-MM-dd"),
359
- datetime: p("yyyy-MM-dd HH:mm:ss"),
387
+ longtext: () => {
388
+ let e = ref(), { open: t } = useModal({
389
+ type: "drawer",
390
+ resizable: !0,
391
+ content: () => createVNode("div", null, [createVNode("span", null, [e.value])]),
392
+ width: 600,
393
+ footer: null,
394
+ maskClosable: !0
395
+ }), { copy: n, copied: r } = useClipboard({ legacy: !0 }), i = (i, a, o) => {
396
+ if (!a) return t(i);
397
+ let s = () => {
398
+ o ? o(e.value) : n(e.value);
399
+ };
400
+ return t(() => createVNode("div", { style: "display: flex; align-items: center; justify-content: space-between; margin-right: 4px;" }, [toValue(i), r.value ? createVNode(NButton, {
401
+ quaternary: !0,
402
+ size: "tiny",
403
+ type: "success"
404
+ }, { icon: () => createVNode(NIcon, { size: 18 }, { default: () => [createVNode(u, null, null)] }) }) : createVNode(NButton, {
405
+ quaternary: !0,
406
+ size: "tiny",
407
+ onClick: s
408
+ }, { icon: () => createVNode(NIcon, { size: 16 }, { default: () => [createVNode(l, null, null)] }) })]));
409
+ };
410
+ return {
411
+ renderer: (t, n, { params: r = {} }, { label: a }) => createVNode("div", { style: "white-space: nowrap; overflow: hidden; display: flex; gap: 8px; align-items: center; justify-content: space-between" }, [createVNode("div", { style: "flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;" }, [t]), createVNode(NButton, {
412
+ type: "info",
413
+ text: !0,
414
+ style: "position: sticky; right: 0; z-index: 2",
415
+ onClick: r.showText ? () => r.showText(t) : () => {
416
+ e.value = r.formatText ? r.formatText(t) : t, i(r.title || a, r.copyable !== !1, r.onCopy);
417
+ }
418
+ }, { default: () => [createVNode(NIcon, { size: 18 }, { default: () => [createVNode(c, null, null)] })] })]),
419
+ default: { table: { ellipsis: !1 } }
420
+ };
421
+ },
422
+ date: () => ({
423
+ renderer: o("yyyy-MM-dd"),
424
+ default: { table: {
425
+ width: 140,
426
+ align: "center",
427
+ sortable: !0
428
+ } }
429
+ }),
430
+ datetime: () => ({
431
+ renderer: o("yyyy-MM-dd HH:mm:ss"),
432
+ default: { table: {
433
+ width: 174,
434
+ align: "center",
435
+ sortable: !0
436
+ } }
437
+ }),
360
438
  dict: () => {
361
- let a, c, l;
362
- return (u, d, { params: f = {} }) => {
363
- if (u == null) return;
364
- let { dictType: p, options: g, multiple: _, statusMap: v } = mapProps(f);
365
- if (g ? c !== g && (c = g, l = new Map(g.map((a) => [a[f.valueField || "value"], a]))) : a !== p && (a = p, !l && a && (l = useDictMap(a))), !_) {
366
- if (u = u.toString(), v && u in v) {
367
- let a = v[u] ?? "default";
439
+ let e, t, n;
440
+ return (r, i, { params: a = {} }) => {
441
+ if (r == null) return;
442
+ let { dictType: o, options: c, multiple: l, statusMap: u } = mapProps(a);
443
+ if (c ? t !== c && (t = c, n = new Map(c.map((e) => [e[a.valueField || "value"], e]))) : e !== o && (e = o, !n && e && (n = useDictMap(e))), !l) {
444
+ if (r = r.toString(), u && r in u) {
445
+ let e = u[r] ?? "default";
368
446
  return [
369
447
  "primary",
370
448
  "success",
371
449
  "warning",
372
450
  "danger"
373
- ].includes(a) && (a = `var(--color-${a})`), createVNode("span", { style: "position: relative; padding-left: 1.25em" }, [createVNode(m, { style: `color: ${a}; position: absolute;left: 0; top: 1.5px` }, null), createVNode("span", null, [l.get(u)?.[f.labelField || "label"] ?? u ?? ""])]);
451
+ ].includes(e) && (e = `var(--color-${e})`), createVNode("span", { style: "position: relative; padding-left: 1.25em" }, [createVNode(s, { style: `color: ${e}; position: absolute;left: 0; top: 1.5px` }, null), createVNode("span", null, [n.get(r)?.[a.labelField || "label"] ?? r ?? ""])]);
374
452
  }
375
- return l.get(u)?.[f.labelField || "label"] ?? u ?? "";
453
+ return n.get(r)?.[a.labelField || "label"] ?? r ?? "";
376
454
  }
377
- return u?.map((a) => l.get(a?.toString())?.[f.labelField || "label"] ?? a?.toString() ?? "") ?? "";
455
+ return r?.map((e) => n.get(e?.toString())?.[a.labelField || "label"] ?? e?.toString() ?? "") ?? "";
378
456
  };
379
457
  },
380
- number: () => (a, c, { params: l = {} }) => {
381
- if (a != null) {
382
- switch (l.percent && (a = Number(a) * 100), "number") {
383
- case typeof l.fixed:
384
- a = a.toFixed(l.fixed);
385
- break;
386
- case typeof l.round:
387
- a = a.toFixed(l.round).replace(/0+$/, "");
388
- break;
389
- case typeof l.precision:
390
- a = a.toPrecision(l.precision);
391
- break;
458
+ number: () => ({
459
+ renderer: (e, t, { params: n = {} }) => {
460
+ if (e != null) {
461
+ switch (n.percent && (e = Number(e) * 100), "number") {
462
+ case typeof n.fixed:
463
+ e = e.toFixed(n.fixed);
464
+ break;
465
+ case typeof n.round:
466
+ e = e.toFixed(n.round).replace(/0+$/, "");
467
+ break;
468
+ case typeof n.precision:
469
+ e = e.toPrecision(n.precision);
470
+ break;
471
+ }
472
+ return n?.separator ? Number(e).toLocaleString() : e;
392
473
  }
393
- return l?.separator ? Number(a).toLocaleString() : a;
394
- }
395
- },
396
- email: () => (a) => createVNode("a", { href: `mailto:${a}` }, [a]),
397
- url: () => (a) => createVNode("a", { href: a }, [a]),
398
- color: () => (a) => createVNode(NColorPicker, {
399
- value: a,
474
+ },
475
+ default: { table: {
476
+ width: 100,
477
+ align: "right",
478
+ sortable: !0
479
+ } }
480
+ }),
481
+ email: () => (e) => createVNode("a", { href: `mailto:${e}` }, [e]),
482
+ url: () => (e) => createVNode("a", { href: e }, [e]),
483
+ color: () => (e) => createVNode(NColorPicker, {
484
+ value: e,
400
485
  disabled: !0,
401
486
  size: "small"
402
487
  }, null),
403
- image: () => (a, c, { params: l = {} }) => {
404
- let u;
405
- return a ? createVNode(NFlex, {
488
+ image: () => (e, t, { params: n = {} }) => {
489
+ let r;
490
+ return e ? createVNode(NFlex, {
406
491
  gap: "8",
407
492
  wrap: !0
408
- }, _isSlot(u = (Array.isArray(a) ? a : l?.multiple ? a.split(",") : [a]).map((a) => f(a)).map((a) => createVNode("img", {
409
- key: a,
410
- src: a,
493
+ }, _isSlot(r = (Array.isArray(e) ? e : n?.multiple ? e.split(",") : [e]).map((e) => a(e)).map((e) => createVNode("img", {
494
+ key: e,
495
+ src: e,
411
496
  style: "max-height: 32px; max-width: 100px; object-fit: contain"
412
- }, null))) ? u : { default: () => [u] }) : void 0;
497
+ }, null))) ? r : { default: () => [r] }) : void 0;
413
498
  },
414
499
  file: () => {
415
- let a = nanoid();
416
- return (c, l, { params: d = {} }) => {
417
- let f;
418
- return c ? (l.__file_urls ??= {}, l.__file_urls[a] || u(Array.isArray(c) ? c : d?.multiple ? c.split(",") : [c]).then((c) => {
419
- l.__file_urls[a] = c;
500
+ let e = nanoid();
501
+ return (t, n, { params: i = {} }) => {
502
+ let a;
503
+ return t ? (n.__file_urls ??= {}, n.__file_urls[e] || r(Array.isArray(t) ? t : i?.multiple ? t.split(",") : [t]).then((t) => {
504
+ n.__file_urls[e] = t;
420
505
  }), createVNode(NFlex, {
421
506
  gap: "8",
422
507
  wrap: !0
423
- }, _isSlot(f = (l.__file_urls[a] || []).map((a) => createVNode("a", {
424
- key: a.id,
425
- href: a.url,
508
+ }, _isSlot(a = (n.__file_urls[e] || []).map((e) => createVNode("a", {
509
+ key: e.id,
510
+ href: e.url,
426
511
  target: "_blank",
427
512
  rel: "noreferrer",
428
513
  style: "max-width: 100px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; display: inline-block"
429
- }, [a.name]))) ? f : { default: () => [f] })) : void 0;
514
+ }, [e.name]))) ? a : { default: () => [a] })) : void 0;
430
515
  };
431
516
  },
432
- dept: () => (c, l, { params: u = {} }) => {
433
- if (c) return createVNode(DtDeptRender, {
434
- value: c,
435
- multiple: u?.multiple,
436
- getDeptsByCode: a
517
+ dept: () => (t, n, { params: r = {} }) => {
518
+ if (t) return createVNode(DtDeptRender, {
519
+ value: t,
520
+ multiple: r?.multiple,
521
+ getDeptsByCode: e
437
522
  }, null);
438
523
  },
439
- user: () => (a, u, { params: d = {} }) => {
440
- if (a) return createVNode(DtUserRender, {
441
- value: a,
442
- multiple: d?.multiple,
443
- getUsersByUsername: l
444
- }, null);
524
+ user: () => {
525
+ let e = { style: "padding-block: 0" };
526
+ return {
527
+ renderer: (e, r, { params: i = {} }) => {
528
+ if (e) return createVNode(DtUserRender, {
529
+ value: e,
530
+ multiple: i?.multiple,
531
+ getUsersByUsername: n
532
+ }, null);
533
+ },
534
+ default: { table: {
535
+ width: 150,
536
+ ellipsis: !1,
537
+ align: "center",
538
+ cellProps: () => e
539
+ } }
540
+ };
445
541
  }
446
542
  };
447
543
  }
448
544
  function createFormHelper() {
449
- return () => ({ items: a, model: c, handleSubmit: u, reset: d, validation: f, readonly: p, inModal: m, showFeedback: g, showColon: _, labelWidth: v, labelAlign: y, labelPlacement: b, showRequireMark: x, requireMarkPlacement: S }) => createVNode(DataForm, {
450
- readonly: p,
451
- model: c,
452
- items: a,
453
- validation: f,
454
- showColon: unref(_) ?? !0,
455
- labelWidth: unref(v),
456
- labelAlign: unref(y),
457
- labelPlacement: unref(b),
458
- showRequireMark: unref(x),
459
- requireMarkPlacement: unref(S),
460
- showFeedback: unref(g) ?? !0,
545
+ return () => ({ items: e, model: t, handleSubmit: r, reset: i, validation: a, readonly: o, inModal: s, showFeedback: c, showColon: l, labelWidth: u, labelAlign: d, labelPlacement: f, showRequireMark: p, requireMarkPlacement: m }) => createVNode(DataForm, {
546
+ readonly: o,
547
+ model: t,
548
+ items: e,
549
+ validation: a,
550
+ showColon: unref(l) ?? !0,
551
+ labelWidth: unref(u),
552
+ labelAlign: unref(d),
553
+ labelPlacement: unref(f),
554
+ showRequireMark: unref(p),
555
+ requireMarkPlacement: unref(m),
556
+ showFeedback: unref(c) ?? !0,
461
557
  showAction: !1,
462
- onSubmit: u,
463
- onRest: d,
464
- style: m ? "padding-right: 2rem; padding-top: 1rem" : void 0
558
+ onSubmit: r,
559
+ onReset: i,
560
+ style: s ? "padding-right: 2rem; padding-top: 1rem" : void 0
465
561
  }, null);
466
562
  }
467
563
  function createModalHelper() {
468
- let a = (a) => typeof a == "number" ? `${a}px` : a, c = {
564
+ let e = (e) => typeof e == "number" ? `${e}px` : e, t = {
469
565
  maxHeight: "calc(100vh - 130px)",
470
566
  display: "flex",
471
567
  flexDirection: "column"
472
- }, l = { content: !0 };
473
- return () => ({ type: u = "dialog", visible: d, title: f, content: p, footer: m, placement: g, resizable: _, draggable: v, closeOnEsc: b, closable: x, showMask: S, maskClosable: C, width: w, height: E, style: D, onClose: O, onCancel: j, onConfirm: M, onAfterClose: N, onAfterOpen: P, confirmText: F, confirmDisabled: I, confirmLoading: L, cancelText: R, cancelDisabled: z, cancelLoading: B, nativeScrollbar: V, ...H }) => {
474
- let U = m ? () => m : m === null ? null : () => createVNode(NFlex, {
568
+ }, n = { content: !0 };
569
+ return () => ({ type: r = "dialog", visible: i, title: a, content: o, footer: s, placement: c, resizable: l, draggable: u, closeOnEsc: f, closable: p, showMask: m, maskClosable: g, width: _, height: v, style: y, onClose: x, onCancel: S, onConfirm: C, onAfterClose: w, onAfterOpen: T, confirmText: E, confirmDisabled: D, confirmLoading: O, cancelText: k, cancelDisabled: A, cancelLoading: j, nativeScrollbar: M, ...N }) => {
570
+ let P = s ? () => s : s === null ? null : () => createVNode(NFlex, {
475
571
  justify: "end",
476
572
  gap: "16"
477
- }, { default: () => [R === null ? void 0 : createVNode(NButton, {
478
- onClick: j,
479
- disabled: z,
480
- loading: B,
573
+ }, { default: () => [k === null ? void 0 : createVNode(NButton, {
574
+ onClick: S,
575
+ disabled: A,
576
+ loading: j,
481
577
  style: "min-width: 60px"
482
- }, _isSlot(R) ? R : { default: () => [R] }), F === null ? void 0 : createVNode(NButton, {
578
+ }, _isSlot(k) ? k : { default: () => [k] }), E === null ? void 0 : createVNode(NButton, {
483
579
  type: "primary",
484
- onClick: M,
485
- disabled: I,
486
- loading: L,
580
+ onClick: C,
581
+ disabled: D,
582
+ loading: O,
487
583
  style: "min-width: 60px"
488
- }, _isSlot(F) ? F : { default: () => [F] })] });
489
- if (u === "dialog") {
490
- let { style: u } = mergeProps({ style: {
491
- width: a(w ?? 520),
492
- height: a(E)
493
- } }, { style: D });
584
+ }, _isSlot(E) ? E : { default: () => [E] })] });
585
+ if (r === "dialog") {
586
+ let { style: r } = mergeProps({ style: {
587
+ width: e(_ ?? 520),
588
+ height: e(v)
589
+ } }, { style: y });
494
590
  return createVNode(NModal, mergeProps({
495
- show: d,
591
+ show: i,
496
592
  preset: "card",
497
- title: () => f,
498
- maskClosable: C ?? !1,
499
- closeOnEsc: b,
500
- closable: x,
501
- onClose: O,
502
- segmented: l,
593
+ title: () => a,
594
+ maskClosable: g ?? !1,
595
+ closeOnEsc: f,
596
+ closable: p,
597
+ onClose: x,
598
+ segmented: n,
503
599
  size: "small",
504
- onAfterEnter: P,
505
- onAfterLeave: N,
506
- onUpdateShow: O,
507
- draggable: v ?? !0,
508
- style: u,
509
- contentStyle: c
510
- }, H), {
600
+ onAfterEnter: T,
601
+ onAfterLeave: w,
602
+ onUpdateShow: x,
603
+ draggable: u ?? !0,
604
+ style: r,
605
+ contentStyle: t
606
+ }, N), {
511
607
  default: () => createVNode(NScrollbar, {
512
608
  abstract: !0,
513
609
  style: "display: flex; flex-direction: column"
514
- }, _isSlot(p) ? p : { default: () => [p] }),
515
- action: U
610
+ }, _isSlot(o) ? o : { default: () => [o] }),
611
+ action: P
516
612
  });
517
613
  }
518
- let { bodyContentClass: W, bodyContentStyle: G, ...K } = H;
614
+ let { bodyContentClass: F, bodyContentStyle: I, ...L } = N;
519
615
  return createVNode(NDrawer, mergeProps({
520
- show: d,
616
+ show: i,
521
617
  trapFocus: !1,
522
- closeOnEsc: b,
523
- showMask: S,
524
- maskClosable: C,
525
- resizable: _,
526
- placement: g,
527
- width: w ?? 440,
528
- height: E,
529
- onUpdateShow: O,
530
- onAfterEnter: P,
531
- onAfterLeave: N,
532
- style: D
533
- }, K), { default: () => [createVNode(NDrawerContent, {
534
- closable: x,
535
- nativeScrollbar: V ?? !1,
536
- bodyContentClass: W,
537
- bodyContentStyle: G
618
+ closeOnEsc: f,
619
+ showMask: m,
620
+ maskClosable: g,
621
+ resizable: l,
622
+ placement: c,
623
+ width: l ? void 0 : _ ?? 440,
624
+ defaultWidth: l ? _ ?? 440 : void 0,
625
+ height: v,
626
+ onUpdateShow: x,
627
+ onAfterEnter: T,
628
+ onAfterLeave: w,
629
+ style: y
630
+ }, L), { default: () => [createVNode(NDrawerContent, {
631
+ closable: p,
632
+ nativeScrollbar: M ?? !1,
633
+ bodyContentClass: F,
634
+ bodyContentStyle: I
538
635
  }, {
539
- default: () => p,
540
- header: () => f,
541
- footer: U
636
+ default: () => o,
637
+ header: () => a,
638
+ footer: P
542
639
  })] });
543
640
  };
544
641
  }