@ithinkdt/ui 4.0.0-403 → 4.0.0-405

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.
@@ -1,6 +1,6 @@
1
- import { n as useI18n } from "./use-i18n-Dx7V4KrY.js";
2
- import { i as vTooltip } from "./directives-qqYcWl1I.js";
3
- import { g as useStyle, h as useMergedClsPrefix, n as cB, r as cE, t as c } from "./use-style-DcT-1dj4.js";
1
+ import { n as useI18n } from "./use-i18n-D-AJ8KbA.js";
2
+ import { i as vTooltip } from "./directives-Bpfh9AKg.js";
3
+ import { g as useStyle, h as useMergedClsPrefix, n as cB, r as cE, t as c } from "./use-style-mj2B1q0l.js";
4
4
  import { Fragment, computed, createTextVNode, createVNode, defineComponent, inject, isVNode, mergeProps, nextTick, reactive, ref, shallowRef, toRaw, toRef, toValue, unref, useTemplateRef, watch, withDirectives } from "vue";
5
5
  import { toReactive, unrefElement, until, useCurrentElement, useElementSize, watchDebounced } from "@vueuse/core";
6
6
  import { NAvatar, NAvatarGroup, NButton, NCard, NCheckbox, NCheckboxGroup, NDataTable, NDropdown, NEllipsis, NEmpty, NFlex, NForm, NFormItem, NGi, NGrid, NH4, NIcon, NInput, NList, NListItem, NPagination, NPerformantEllipsis, NPopover, NRadio, NRadioButton, NRadioGroup, NSelect, NSpin, NTag, NText, NTooltip, NTransfer, NTree, NTreeSelect, dataTableProps, formProps, useDialog } from "ithinkdt-ui";
@@ -1737,6 +1737,10 @@ const DtDeptRender = /* @__PURE__ */ defineComponent({
1737
1737
  type: Boolean,
1738
1738
  default: void 0
1739
1739
  },
1740
+ type: {
1741
+ type: String,
1742
+ default: void 0
1743
+ },
1740
1744
  succeeded: {
1741
1745
  type: [Boolean, Object],
1742
1746
  default: void 0
@@ -1762,13 +1766,13 @@ const DtDeptRender = /* @__PURE__ */ defineComponent({
1762
1766
  props: StateButtonProps,
1763
1767
  setup(e, { slots: v }) {
1764
1768
  return () => {
1765
- let { disabled: y, succeeded: b, successText: x, failureText: S } = e;
1769
+ let { type: y, disabled: b, succeeded: x, successText: S, failureText: C } = e;
1766
1770
  return createVNode(NButton, {
1767
- type: b ? "success" : b === !1 ? "error" : void 0,
1768
- disabled: typeof b == "boolean" ? !0 : y
1771
+ type: x ? "success" : x === !1 ? "error" : y,
1772
+ disabled: typeof x == "boolean" ? !0 : b
1769
1773
  }, {
1770
- default: () => (b ? v.success ? v.success() : x : b === !1 ? v.failure ? v.failure() : S : v.default?.()) ?? v.default(),
1771
- icon: () => b ? v.successIcon ? v.successIcon() : createVNode(NIcon, null, { default: () => [createVNode(ICheck, null, null)] }) : b === !1 ? v.failureIcon ? v.failureIcon() : createVNode(NIcon, null, { default: () => [createVNode(IClose, null, null)] }) : v.icon?.()
1774
+ default: () => (x ? v.success ? v.success() : S : x === !1 ? v.failure ? v.failure() : C : v.default?.()) ?? v.default(),
1775
+ icon: () => x ? v.successIcon ? v.successIcon() : createVNode(NIcon, null, { default: () => [createVNode(ICheck, null, null)] }) : x === !1 ? v.failureIcon ? v.failureIcon() : createVNode(NIcon, null, { default: () => [createVNode(IClose, null, null)] }) : v.icon?.()
1772
1776
  });
1773
1777
  };
1774
1778
  }
@@ -1,5 +1,5 @@
1
- import "./use-i18n-Dx7V4KrY.js";
2
- import "./directives-qqYcWl1I.js";
3
- import "./use-style-DcT-1dj4.js";
4
- import { _ as dataFormActionsProps, a as DtUserRender, b as NCheckboxes, c as DataTable, d as DataPagination, f as DataLocaleInput, g as DataFormActions, h as DataForm, i as DtUserDept, l as useDataTableDrag, m as DataFilter, n as StateButtonProps, o as renderUsers, p as useLocaleEdit, r as DtDeptRender, s as NRadios, t as NStateButton, u as DataSelection, v as DataCustom, y as DataActions } from "./components-CYEw_C_U.js";
1
+ import "./use-i18n-D-AJ8KbA.js";
2
+ import "./directives-Bpfh9AKg.js";
3
+ import "./use-style-mj2B1q0l.js";
4
+ import { _ as dataFormActionsProps, a as DtUserRender, b as NCheckboxes, c as DataTable, d as DataPagination, f as DataLocaleInput, g as DataFormActions, h as DataForm, i as DtUserDept, l as useDataTableDrag, m as DataFilter, n as StateButtonProps, o as renderUsers, p as useLocaleEdit, r as DtDeptRender, s as NRadios, t as NStateButton, u as DataSelection, v as DataCustom, y as DataActions } from "./components--Rlef087.js";
5
5
  export { DataActions, DataCustom, DataFilter, DataForm, DataFormActions, DataLocaleInput, DataPagination, DataSelection, DataTable, DtDeptRender, DtUserDept, DtUserRender, NCheckboxes, NRadios, NStateButton, StateButtonProps, dataFormActionsProps, renderUsers, useDataTableDrag, useLocaleEdit };
@@ -1,4 +1,4 @@
1
- import { g as useStyle, i as cM, n as cB, r as cE, t as c } from "./use-style-DcT-1dj4.js";
1
+ import { g as useStyle, i as cM, n as cB, r as cE, t as c } from "./use-style-mj2B1q0l.js";
2
2
  import { Fragment, createVNode, defineComponent, h, nextTick, reactive, ref, shallowRef, toRef, watch } from "vue";
3
3
  import { promiseTimeout, useEventListener } from "@vueuse/core";
4
4
  import { NTooltip } from "ithinkdt-ui";
@@ -1,3 +1,3 @@
1
- import { i as vTooltip, n as vSpin, r as TooltipDirectiveProvider, t as SpinDirectiveProvider } from "./directives-qqYcWl1I.js";
2
- import "./use-style-DcT-1dj4.js";
1
+ import { i as vTooltip, n as vSpin, r as TooltipDirectiveProvider, t as SpinDirectiveProvider } from "./directives-Bpfh9AKg.js";
2
+ import "./use-style-mj2B1q0l.js";
3
3
  export { SpinDirectiveProvider, TooltipDirectiveProvider, vSpin, vTooltip };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { n as useI18n, t as UI_I18N_INJECTION } from "./use-i18n-Dx7V4KrY.js";
2
- import { i as vTooltip, n as vSpin, r as TooltipDirectiveProvider, t as SpinDirectiveProvider } from "./directives-qqYcWl1I.js";
3
- import { g as useStyle, i as cM, n as cB, r as cE, t as c } from "./use-style-DcT-1dj4.js";
1
+ import { n as useI18n, t as UI_I18N_INJECTION } from "./use-i18n-D-AJ8KbA.js";
2
+ import { i as vTooltip, n as vSpin, r as TooltipDirectiveProvider, t as SpinDirectiveProvider } from "./directives-Bpfh9AKg.js";
3
+ import { g as useStyle, i as cM, n as cB, r as cE, t as c } from "./use-style-mj2B1q0l.js";
4
4
  import { Fragment, computed, createVNode, defineComponent, inject, isVNode, mergeProps, provide, reactive, ref, renderSlot, shallowRef, toRef, toValue, unref, useTemplateRef, watch, withDirectives } from "vue";
5
5
  import { computedAsync, promiseTimeout, useElementHover, useElementSize, useEventListener, useFullscreen, watchDebounced } from "@vueuse/core";
6
6
  import { NAvatar, NBadge, NBreadcrumb, NBreadcrumbItem, NButton, NDrawer, NDrawerContent, NDropdown, NEmpty, NIcon, NList, NListItem, NMenu, NPagination, NPopover, NScrollbar, NText, NThing, useThemeVars } from "ithinkdt-ui";
package/dist/page.js CHANGED
@@ -1,17 +1,18 @@
1
- import { n as useI18n } from "./use-i18n-Dx7V4KrY.js";
2
- import "./directives-qqYcWl1I.js";
3
- import "./use-style-DcT-1dj4.js";
4
- import { a as DtUserRender, b as NCheckboxes, h as DataForm, i as DtUserDept, r as DtDeptRender, s as NRadios } from "./components-CYEw_C_U.js";
1
+ import { n as useI18n } from "./use-i18n-D-AJ8KbA.js";
2
+ import "./directives-Bpfh9AKg.js";
3
+ import "./use-style-mj2B1q0l.js";
4
+ import { a as DtUserRender, b as NCheckboxes, h as DataForm, i as DtUserDept, r as DtDeptRender, s as NRadios } from "./components--Rlef087.js";
5
5
  import { computed, createVNode, defineComponent, h, isVNode, mergeProps, ref, shallowRef, unref } from "vue";
6
6
  import { until } from "@vueuse/core";
7
7
  import { NButton, NCheckbox, NColorPicker, NDatePicker, NDrawer, NDrawerContent, NFlex, NInput, NInputNumber, NModal, NScrollbar, NSelect, NText, NUpload, useMessage } from "ithinkdt-ui";
8
8
  import { format } from "date-fns";
9
9
  import { useFormItem } from "ithinkdt-ui/es/_mixins";
10
+ import { isNullish } from "@ithinkdt/common";
10
11
  import { useDict, useDictMap } from "@ithinkdt/common/dict";
11
- function _isSlot(n) {
12
- return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !isVNode(n);
12
+ function _isSlot(r) {
13
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !isVNode(r);
13
14
  }
14
- var mapProps = (n) => Object.fromEntries(Object.entries(n || {}).map(([n, c]) => [n, unref(c)])), SimpleUpload = /* @__PURE__ */ defineComponent({
15
+ var mapProps = (r) => Object.fromEntries(Object.entries(r || {}).map(([r, a]) => [r, unref(a)])), SimpleUpload = /* @__PURE__ */ defineComponent({
15
16
  name: "SimpleUpload",
16
17
  props: {
17
18
  type: {
@@ -49,405 +50,420 @@ var mapProps = (n) => Object.fromEntries(Object.entries(n || {}).map(([n, 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: n, onProgress: l, onFinish: u, onError: d }) => {
56
- c.uploadFile(n.file, (n) => l({ percent: n })).then((c) => {
57
- n.file.fileId = c, u();
58
- }).catch((n) => {
59
- p.error(n.message), d(n);
53
+ setup(a, { slots: o, expose: s }) {
54
+ let { t: c } = useI18n();
55
+ SimpleUpload.t = c;
56
+ let l = useFormItem(a), u = useMessage(), f = computed(() => a.customRequest || (({ file: r, onProgress: o, onFinish: s, onError: c }) => {
57
+ a.uploadFile(r.file, (r) => o({ percent: r })).then((a) => {
58
+ r.file.fileId = a, s();
59
+ }).catch((r) => {
60
+ u.error(r.message), c(r);
60
61
  });
61
- })), _ = ref();
62
- u({ submit() {
63
- return until(_).toBeTruthy().then((n) => n.submit());
62
+ })), p = ref();
63
+ s({ submit() {
64
+ return until(p).toBeTruthy().then((r) => r.submit());
64
65
  } });
65
- let v = (n) => {
66
- c.onUpdateFileList?.(n), nextTick(() => f.nTriggerFormChange());
66
+ let m = (r) => {
67
+ a.onUpdateFileList?.(r), nextTick(() => l.nTriggerFormChange());
67
68
  };
68
69
  return () => {
69
- let { type: n, onUpdateFileList: u, ...p } = c;
70
- return createVNode(NUpload, mergeProps(p, {
71
- ref: _,
72
- customRequest: g.value,
73
- listType: n === "image" ? "image-card" : "text",
74
- accept: p.accept ?? n === "image" ? "image/*" : void 0,
75
- "onUpdate:fileList": v
70
+ let { type: r, onUpdateFileList: s, ...u } = a;
71
+ return createVNode(NUpload, mergeProps(u, {
72
+ ref: p,
73
+ customRequest: f.value,
74
+ listType: r === "image" ? "image-card" : "text",
75
+ accept: u.accept ?? r === "image" ? "image/*" : void 0,
76
+ "onUpdate:fileList": m
76
77
  }), {
77
- default: n === "image" ? void 0 : () => {
78
- let n;
78
+ default: r === "image" ? void 0 : () => {
79
+ let r;
79
80
  return createVNode(NButton, {
80
- disabled: f.mergedDisabledRef.value,
81
- size: f.mergedSizeRef.value
82
- }, _isSlot(n = d("common.page.form.selectFileText")) ? n : { default: () => [n] });
81
+ disabled: l.mergedDisabledRef.value,
82
+ size: l.mergedSizeRef.value
83
+ }, _isSlot(r = c("common.page.form.selectFileText")) ? r : { default: () => [r] });
83
84
  },
84
- ...l
85
+ ...o
85
86
  });
86
87
  };
87
88
  }
88
89
  });
89
- function createPageFormHelper({ getUserGroups: n, getUsersByGroup: u, getDeptsByCode: f, getUsersByDept: m, getUsersByUsername: g, uploadFile: v, getFileInfos: y }) {
90
+ function createPageFormHelper({ getUserGroups: r, getUsersByGroup: s, getDeptsByCode: l, getUsersByDept: d, getUsersByUsername: f, uploadFile: m, getFileInfos: g }) {
91
+ let _ = (r) => isNullish(r) ? r : String(r), x = (r) => r, C = (r) => isNullish(r) ? r : Number(r);
90
92
  return {
91
- input: () => ({ slots: n, props: c }, { modelValue: l, "onUpdate:modelValue": u, required: d, readonly: f, ...p }) => f ? createVNode(NText, {
93
+ input: () => ({ slots: r, props: a }, { modelValue: o, "onUpdate:modelValue": s, required: c, readonly: l, ...u }) => l ? createVNode(NText, {
92
94
  depth: 2,
93
95
  style: "line-height: 1.25"
94
- }, { default: () => [l ?? ""] }) : (c = mapProps(c), h(NInput, {
96
+ }, { default: () => [o ?? ""] }) : (a = mapProps(a), h(NInput, {
95
97
  clearable: !0,
96
- ...c,
97
- ...p,
98
- value: l,
99
- "onUpdate:value": u
100
- }, n)),
101
- number: () => ({ slots: n, props: c }, { modelValue: l, "onUpdate:modelValue": u, required: d, readonly: f, ...p }) => f ? createVNode(NText, {
98
+ ...a,
99
+ ...u,
100
+ value: o,
101
+ "onUpdate:value": s
102
+ }, r)),
103
+ number: () => ({ slots: r, props: a }, { modelValue: o, "onUpdate:modelValue": s, required: c, readonly: l, ...u }) => l ? createVNode(NText, {
102
104
  depth: 2,
103
105
  style: "line-height: 1.25"
104
- }, { default: () => [l ?? ""] }) : (c = mapProps(c), h(NInputNumber, {
106
+ }, { default: () => [o ?? ""] }) : (a = mapProps(a), h(NInputNumber, {
105
107
  clearable: !0,
106
- ...c,
107
- ...p,
108
- value: l,
109
- "onUpdate:value": u
110
- }, n)),
108
+ ...a,
109
+ ...u,
110
+ value: o,
111
+ "onUpdate:value": s
112
+ }, r)),
111
113
  select: () => {
112
- let n, c;
113
- return ({ slots: l, props: u }, { modelValue: d, "onUpdate:modelValue": f, required: p, readonly: m, ...g }) => {
114
- let { dictType: v, options: y, ...b } = mapProps(u);
115
- if (y ? c = y : n !== v && (n = v, !c && n && (c = useDict(n))), m) if (b.multiple) {
116
- let n;
114
+ let r, a, o, s, c;
115
+ return ({ slots: l, props: u }, { modelValue: d, "onUpdate:modelValue": f, required: m, readonly: g, ...v }) => {
116
+ let { dictType: b, options: S, valueType: w = "string", ...T } = mapProps(u), E = w === "number" ? _ : x;
117
+ S ? a = S : r !== b && (r = b, !a && r && (a = useDict(r)));
118
+ let D = T.multiple ? d?.map(E) : E(d);
119
+ if (g) if (T.multiple) {
120
+ let r;
117
121
  return createVNode(NText, {
118
122
  depth: 2,
119
123
  style: "line-height: 1.25"
120
- }, _isSlot(n = (d?.map((n) => c?.find((c) => c[b.valueField || "value"] === n)) ?? []).map((n, c, l) => {
121
- let u = n ? b.renderLabel ? b.renderLabel(n) ?? "" : n[b.labelField || "label"] ?? "" : d[c] ?? "";
122
- return createVNode("span", { key: n ? n[b.valueField || "value"] : d[c] ?? "" }, [u, c < l.length - 1 ? ", " : ""]);
123
- })) ? n : { default: () => [n] });
124
+ }, _isSlot(r = (D?.map((r) => a?.find((a) => a[T.valueField || "value"] === r)) ?? []).map((r, a, o) => {
125
+ let s = r ? T.renderLabel ? T.renderLabel(r) ?? "" : r[T.labelField || "label"] ?? "" : D[a] ?? "";
126
+ return createVNode("span", { key: r ? r[T.valueField || "value"] : D[a] ?? "" }, [s, a < o.length - 1 ? ", " : ""]);
127
+ })) ? r : { default: () => [r] });
124
128
  } else {
125
- let n = c?.find((n) => n[b.valueField || "value"] === d);
129
+ let r = a?.find((r) => r[T.valueField || "value"] === D);
126
130
  return createVNode(NText, {
127
131
  depth: 2,
128
132
  style: "line-height: 1.25"
129
- }, { default: () => [n ? b.renderLabel ? b.renderLabel(n) ?? "" : n[b.labelField || "label"] ?? "" : d ?? ""] });
133
+ }, { default: () => [r ? T.renderLabel ? T.renderLabel(r) ?? "" : r[T.labelField || "label"] ?? "" : D ?? ""] });
130
134
  }
131
- return h(NSelect, {
135
+ return s = T.multiple, o = f, w === "number" && !c && (c = (r, ...a) => {
136
+ o(s ? r?.map(C) : C(r), ...a);
137
+ }), h(NSelect, {
132
138
  clearable: !0,
133
- loading: c?.loading,
134
- ...b,
135
- options: unref(c),
136
- ...g,
137
- value: d,
138
- "onUpdate:value": f
139
+ loading: a?.loading,
140
+ ...T,
141
+ options: unref(a),
142
+ ...v,
143
+ value: D,
144
+ "onUpdate:value": w === "number" ? c : o
139
145
  }, l);
140
146
  };
141
147
  },
142
- checkbox: () => ({ slots: n, props: c }, { modelValue: l, "onUpdate:modelValue": u, required: d, readonly: f, ...p }) => {
143
- if (c = mapProps(c), f) {
144
- let u;
145
- return u = l === (c.checkedValue ?? !0) ? n?.checked ? n.checked() : createVNode(NCheckbox, { checked: !0 }, null) : n?.unchecked ? n.unchecked() : createVNode(NCheckbox, { disabled: !0 }, null), createVNode(NText, {
148
+ checkbox: () => ({ slots: r, props: a }, { modelValue: o, "onUpdate:modelValue": s, required: c, readonly: l, ...u }) => {
149
+ if (a = mapProps(a), l) {
150
+ let s;
151
+ return s = o === (a.checkedValue ?? !0) ? r?.checked ? r.checked() : createVNode(NCheckbox, { checked: !0 }, null) : r?.unchecked ? r.unchecked() : createVNode(NCheckbox, { disabled: !0 }, null), createVNode(NText, {
146
152
  depth: 2,
147
153
  style: "line-height: 1.25"
148
- }, _isSlot(u) ? u : { default: () => [u] });
154
+ }, _isSlot(s) ? s : { default: () => [s] });
149
155
  }
150
156
  return h(NCheckbox, {
151
- ...c,
152
- ...p,
153
- checked: l,
154
- "onUpdate:checked": u
155
- }, n);
157
+ ...a,
158
+ ...u,
159
+ checked: o,
160
+ "onUpdate:checked": s
161
+ }, r);
156
162
  },
157
163
  checkboxes: () => {
158
- let n, c;
159
- return ({ props: u }, { modelValue: d, required: f, readonly: p, ...m }) => {
160
- let { dictType: g, options: v, ...y } = mapProps(u);
161
- if (v ? c = v : n !== g && (n = g, !c && n && (c = useDict(n))), p) {
162
- let n;
164
+ let r, a, s, c;
165
+ return ({ props: l }, { modelValue: u, "onUpdate:modelValue": d, required: f, readonly: m, ...g }) => {
166
+ let { dictType: v, options: y, valueType: b = "string", ...S } = mapProps(l), w = b === "number" ? _ : x;
167
+ y ? a = y : r !== v && (r = v, !a && r && (a = useDict(r)));
168
+ let T = u?.map(w) ?? [];
169
+ if (m) {
170
+ let r;
163
171
  return createVNode(NText, {
164
172
  depth: 2,
165
173
  style: "line-height: 2.4"
166
- }, _isSlot(n = (d?.map((n) => c?.find((c) => c[y.valueField || "value"] === n)) ?? []).map((n, c, l) => {
167
- let u = n ? n[y.labelField ?? "label"] ?? "" : d[c] ?? "";
168
- return createVNode("span", { key: n ? n[y.valueField ?? "value"] : d[c] ?? "" }, [u, c < l.length - 1 ? ", " : ""]);
169
- })) ? n : { default: () => [n] });
174
+ }, _isSlot(r = (T?.map((r) => a?.find((a) => a[S.valueField || "value"] === r)) ?? []).map((r, a, o) => {
175
+ let s = r ? r[S.labelField ?? "label"] ?? "" : T[a] ?? "";
176
+ return createVNode("span", { key: r ? r[S.valueField ?? "value"] : T[a] ?? "" }, [s, a < o.length - 1 ? ", " : ""]);
177
+ })) ? r : { default: () => [r] });
170
178
  }
171
- return h(NCheckboxes, {
172
- ...y,
173
- ...m,
174
- options: c,
175
- modelValue: d
179
+ return s = d, b === "number" && !c && (c = (r, ...a) => {
180
+ s(multiple0 ? r?.map(C) : C(r), ...a);
181
+ }), h(NCheckboxes, {
182
+ ...S,
183
+ ...g,
184
+ options: a,
185
+ modelValue: T,
186
+ "onUpdate:modelValue": b === "number" ? c : s
176
187
  });
177
188
  };
178
189
  },
179
190
  radios: () => {
180
- let n, c;
181
- return ({ props: l }, { modelValue: u, required: d, readonly: f, ...m }) => {
182
- let { dictType: g, options: v, ...y } = mapProps(l);
183
- if (v ? c = v : n !== g && (n = g, !c && n && (c = useDict(n))), f) {
184
- let n = c?.find((n) => n[y.valueField ?? "value"] === u);
191
+ let r, a, o, s;
192
+ return ({ props: c }, { modelValue: l, "onUpdate:modelValue": d, required: f, readonly: m, ...g }) => {
193
+ let { dictType: v, options: y, valueType: b = "string", ...S } = mapProps(c), w = b === "number" ? _ : x;
194
+ y ? a = y : r !== v && (r = v, !a && r && (a = useDict(r)));
195
+ let T = w(l);
196
+ if (m) {
197
+ let r = a?.find((r) => r[S.valueField ?? "value"] === T);
185
198
  return createVNode(NText, {
186
199
  depth: 2,
187
200
  style: "line-height: 1.25"
188
- }, { default: () => [n ? n[y.labelField ?? "label"] ?? "" : u ?? ""] });
201
+ }, { default: () => [r ? r[S.labelField ?? "label"] ?? "" : T ?? ""] });
189
202
  }
190
- return h(NRadios, {
191
- ...y,
192
- ...m,
193
- options: c,
194
- modelValue: u
203
+ return o = d, b === "number" && !s && (s = (r, ...a) => {
204
+ o(C(r), ...a);
205
+ }), h(NRadios, {
206
+ ...S,
207
+ ...g,
208
+ options: a,
209
+ modelValue: T,
210
+ "onUpdate:modelValue": b === "number" ? s : o
195
211
  });
196
212
  };
197
213
  },
198
- datepicker: () => ({ slots: n, props: c }, { modelValue: l, "onUpdate:modelValue": u, required: d, readonly: f, ...p }) => {
199
- let { type: m = "date", format: g = m.startsWith("datetime") ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM-dd", ...v } = mapProps(c);
200
- return f ? m.endsWith("range") ? createVNode(NText, {
214
+ datepicker: () => ({ slots: r, props: a }, { modelValue: o, "onUpdate:modelValue": s, required: c, readonly: l, ...u }) => {
215
+ let { type: d = "date", format: f = d.startsWith("datetime") ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM-dd", ...m } = mapProps(a);
216
+ return l ? d.endsWith("range") ? createVNode(NText, {
201
217
  depth: 2,
202
218
  style: "line-height: 1.25"
203
- }, { default: () => [l ? `${l[0] ? format(l[0], g) : ""} ~ ${l[1] ? format(l[1], g) : ""}` : ""] }) : createVNode(NText, {
219
+ }, { default: () => [o ? `${o[0] ? format(o[0], f) : ""} ~ ${o[1] ? format(o[1], f) : ""}` : ""] }) : createVNode(NText, {
204
220
  depth: 2,
205
221
  style: "line-height: 1.25"
206
- }, { default: () => [l ? format(l, g) : ""] }) : h(NDatePicker, {
222
+ }, { default: () => [o ? format(o, f) : ""] }) : h(NDatePicker, {
207
223
  actions: null,
208
224
  updateValueOnClose: !0,
209
225
  clearable: !0,
210
- ...v,
211
- ...p,
212
- type: m,
213
- format: g,
214
- value: l,
215
- "onUpdate:value": u
216
- }, n);
226
+ ...m,
227
+ ...u,
228
+ type: d,
229
+ format: f,
230
+ value: o,
231
+ "onUpdate:value": s
232
+ }, r);
217
233
  },
218
- file: () => ({ slots: n, props: c }, { modelValue: l, "onUpdate:modelValue": u, required: d, readonly: f, ...p }) => {
219
- if (c = mapProps(c), f) {
220
- let n;
234
+ file: () => ({ slots: r, props: a }, { modelValue: o, "onUpdate:modelValue": s, required: c, readonly: l, ...u }) => {
235
+ if (a = mapProps(a), l) {
236
+ let r;
221
237
  return console.warn("[file] 原则上此组建不应该显示在详情中"), fileList.value.length === 0 ? void 0 : createVNode(NFlex, {
222
238
  gap: "8",
223
239
  vertical: !0
224
- }, _isSlot(n = l.map((n) => createVNode("a", {
225
- key: n.id,
226
- href: n.url,
240
+ }, _isSlot(r = o.map((r) => createVNode("a", {
241
+ key: r.id,
242
+ href: r.url,
227
243
  target: "_blank",
228
244
  rel: "noreferrer",
229
245
  style: "max-width: 100px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; display: inline-block"
230
- }, [n.name]))) ? n : { default: () => [n] });
246
+ }, [r.name]))) ? r : { default: () => [r] });
231
247
  }
232
248
  return h(SimpleUpload, {
233
- ...c,
234
- ...p,
249
+ ...a,
250
+ ...u,
235
251
  defaultUpload: !1,
236
- uploadFile: v,
237
- fileList: l,
238
- onUpdateFileList: u
239
- }, n);
252
+ uploadFile: m,
253
+ fileList: o,
254
+ onUpdateFileList: s
255
+ }, r);
240
256
  },
241
257
  upload: () => {
242
- let n = null, c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = shallowRef([]), d = 0, f = (n) => {
243
- let c = ++d;
244
- u.value = n.map((n) => l.get(n)).filter(Boolean);
245
- let f = n.filter((n) => !l.has(n));
246
- Promise.resolve(f.length > 0 ? y(f) : []).then((f) => {
247
- if (c === d) {
248
- u.value = n.map((n) => l.get(n) || f.find((c) => c.id === n)), l.clear();
249
- for (let n of u.value) l.set(n.id, n);
258
+ let r = null, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = shallowRef([]), c = 0, l = (r) => {
259
+ let a = ++c;
260
+ s.value = r.map((r) => o.get(r)).filter(Boolean);
261
+ let l = r.filter((r) => !o.has(r));
262
+ Promise.resolve(l.length > 0 ? g(l) : []).then((l) => {
263
+ if (a === c) {
264
+ s.value = r.map((r) => o.get(r) || l.find((a) => a.id === r)), o.clear();
265
+ for (let r of s.value) o.set(r.id, r);
250
266
  }
251
267
  });
252
- }, p;
268
+ }, u;
253
269
  return {
254
- renderer: ({ slots: d, props: m }, { modelValue: g, "onUpdate:modelValue": y, required: b, readonly: S, ...C }) => {
255
- let w = mapProps(m);
256
- if (p = w.ref ??= shallowRef(), n !== g && (n = g, f(g?.split(",") ?? [])), S) {
257
- let n;
258
- return u.value.length === 0 ? void 0 : createVNode(NFlex, {
270
+ renderer: ({ slots: c, props: d }, { modelValue: f, "onUpdate:modelValue": g, required: _, readonly: y, ...b }) => {
271
+ let x = mapProps(d);
272
+ if (u = x.ref ??= shallowRef(), r !== f && (r = f, l(f?.split(",") ?? [])), y) {
273
+ let r;
274
+ return s.value.length === 0 ? void 0 : createVNode(NFlex, {
259
275
  gap: "8",
260
276
  vertical: !0,
261
277
  style: "padding: 6px 0"
262
- }, _isSlot(n = u.value.map((n) => createVNode("a", {
263
- key: n.id,
264
- href: n.url,
278
+ }, _isSlot(r = s.value.map((r) => createVNode("a", {
279
+ key: r.id,
280
+ href: r.url,
265
281
  target: "_blank",
266
282
  rel: "noreferrer",
267
- title: n.name,
268
- download: n.name,
283
+ title: r.name,
284
+ download: r.name,
269
285
  style: "max-width: 100%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; display: inline-block"
270
- }, [n.name]))) ? n : { default: () => [n] });
286
+ }, [r.name]))) ? r : { default: () => [r] });
271
287
  }
272
288
  return h(SimpleUpload, {
273
- ...w,
274
- ...C,
275
- uploadFile: v,
276
- fileList: u.value,
277
- onUpdateFileList: (n = []) => {
278
- l.clear();
279
- for (let u of n) u.file?.fileId && c.set(u.id, u.file.fileId), u.file?.fileId ? l.set(u.file.fileId, u) : l.set(u.id, u);
280
- u.value = n, y(u.value.map((n) => c.get(n.id) || n.id).join(",") || null);
289
+ ...x,
290
+ ...b,
291
+ uploadFile: m,
292
+ fileList: s.value,
293
+ onUpdateFileList: (r = []) => {
294
+ o.clear();
295
+ for (let s of r) s.file?.fileId && a.set(s.id, s.file.fileId), s.file?.fileId ? o.set(s.file.fileId, s) : o.set(s.id, s);
296
+ s.value = r, g(s.value.map((r) => a.get(r.id) || r.id).join(",") || null);
281
297
  }
282
- }, d);
298
+ }, c);
283
299
  },
284
300
  beforeSubmit: async () => {
285
- if (await p?.value?.submit(), await until(u).toMatch((n) => n.every((n) => !["pending", "uploading"].includes(n.status))), u.value.some((n) => n.status === "error")) return SimpleUpload.t("common.page.form.validate.fileErrorMessage");
301
+ if (await u?.value?.submit(), await until(s).toMatch((r) => r.every((r) => !["pending", "uploading"].includes(r.status))), s.value.some((r) => r.status === "error")) return SimpleUpload.t("common.page.form.validate.fileErrorMessage");
286
302
  }
287
303
  };
288
304
  },
289
305
  user: () => {
290
- let l, p, v;
291
- return ({ slots: y, props: b }, { modelValue: S, "onUpdate:modelValue": C, required: w, readonly: T, ...E }) => {
292
- let D = mapProps(b);
293
- return l || (l = shallowRef([]), p = shallowRef([]), v = shallowRef([]), g().then((n) => {
294
- l.value = n;
295
- }), n().then((n) => {
296
- p.value = n;
297
- }), f().then((n) => {
298
- v.value = n;
299
- })), T ? createVNode(DtUserRender, {
300
- value: S,
301
- multiple: D.multiple,
302
- getUsersByUsername: g
306
+ let o, u, m;
307
+ return ({ slots: g, props: _ }, { modelValue: y, "onUpdate:modelValue": b, required: x, readonly: S, ...C }) => {
308
+ let w = mapProps(_);
309
+ return o || (o = shallowRef([]), u = shallowRef([]), m = shallowRef([]), f().then((r) => {
310
+ o.value = r;
311
+ }), r().then((r) => {
312
+ u.value = r;
313
+ }), l().then((r) => {
314
+ m.value = r;
315
+ })), S ? createVNode(DtUserRender, {
316
+ value: y,
317
+ multiple: w.multiple,
318
+ getUsersByUsername: f
303
319
  }, null) : h(DtUserDept, {
304
320
  type: "user",
305
- users: l.value,
306
- depts: v.value,
307
- groups: p.value,
308
- getUsersByDept: m,
309
- getUsersByGroup: u,
310
- ...D,
311
- ...E,
312
- modelValue: S,
313
- "onUpdate:modelValue": C
314
- }, y);
321
+ users: o.value,
322
+ depts: m.value,
323
+ groups: u.value,
324
+ getUsersByDept: d,
325
+ getUsersByGroup: s,
326
+ ...w,
327
+ ...C,
328
+ modelValue: y,
329
+ "onUpdate:modelValue": b
330
+ }, g);
315
331
  };
316
332
  }
317
333
  };
318
334
  }
319
- function createPageTableHelper({ getDeptsByCode: n, getUsersByUsername: l, getFileInfos: u, previewFileUrl: d }) {
320
- let p = (n) => () => (c, l, u, d) => {
321
- if (c != null) return format(c, d.formatter ?? n);
322
- }, m = (n = {}) => createVNode("svg", mergeProps({
335
+ function createPageTableHelper({ getDeptsByCode: r, getUsersByUsername: o, getFileInfos: s, previewFileUrl: c }) {
336
+ let u = (r) => () => (a, o, s, c) => {
337
+ if (a != null) return format(a, c.formatter ?? r);
338
+ }, d = (r = {}) => createVNode("svg", mergeProps({
323
339
  xmlns: "http://www.w3.org/2000/svg",
324
340
  width: "1em",
325
341
  height: "1em",
326
342
  viewBox: "0 0 32 32"
327
- }, n), [createVNode("circle", {
343
+ }, r), [createVNode("circle", {
328
344
  cx: "16",
329
345
  cy: "16",
330
346
  r: "8",
331
347
  fill: "currentColor"
332
348
  }, null)]);
333
349
  return {
334
- date: p("yyyy-MM-dd"),
335
- datetime: p("yyyy-MM-dd HH:mm:ss"),
350
+ date: u("yyyy-MM-dd"),
351
+ datetime: u("yyyy-MM-dd HH:mm:ss"),
336
352
  dict: () => {
337
- let n, c, l;
338
- return (u, d, f, p) => {
339
- if (u == null) return;
340
- let { dictType: g, options: _, multiple: v, statusMap: y } = mapProps(p);
341
- if (_ ? c !== _ && (c = _, l = new Map(_.map((n) => [n[p.valueField || "value"], n]))) : n !== g && (n = g, !l && n && (l = useDictMap(n))), !v) {
342
- if (u = u.toString(), y && u in y) {
343
- let n = y[u] ?? "default";
353
+ let r, a, o;
354
+ return (s, c, l, u) => {
355
+ if (s == null) return;
356
+ let { dictType: f, options: p, multiple: m, statusMap: g } = mapProps(u);
357
+ if (p ? a !== p && (a = p, o = new Map(p.map((r) => [r[u.valueField || "value"], r]))) : r !== f && (r = f, !o && r && (o = useDictMap(r))), !m) {
358
+ if (s = s.toString(), g && s in g) {
359
+ let r = g[s] ?? "default";
344
360
  return [
345
361
  "primary",
346
362
  "success",
347
363
  "warning",
348
364
  "danger"
349
- ].includes(n) && (n = `var(--color-${n})`), createVNode("span", { style: "position: relative; padding-left: 1.25em" }, [createVNode(m, { style: `color: ${n}; position: absolute;left: 0; top: 1.5px` }, null), createVNode("span", null, [l.get(u)?.[p.labelField || "label"] ?? u ?? ""])]);
365
+ ].includes(r) && (r = `var(--color-${r})`), createVNode("span", { style: "position: relative; padding-left: 1.25em" }, [createVNode(d, { style: `color: ${r}; position: absolute;left: 0; top: 1.5px` }, null), createVNode("span", null, [o.get(s)?.[u.labelField || "label"] ?? s ?? ""])]);
350
366
  }
351
- return l.get(u)?.[p.labelField || "label"] ?? u ?? "";
367
+ return o.get(s)?.[u.labelField || "label"] ?? s ?? "";
352
368
  }
353
- return u?.map((n) => l.get(n?.toString())?.[p.labelField || "label"] ?? n?.toString() ?? "") ?? "";
369
+ return s?.map((r) => o.get(r?.toString())?.[u.labelField || "label"] ?? r?.toString() ?? "") ?? "";
354
370
  };
355
371
  },
356
- number: () => (n, c, l, u) => {
357
- if (n != null) {
358
- switch (u.percent && (n = Number(n) * 100), "number") {
359
- case typeof u.fixed:
360
- n = n.toFixed(u.fixed);
372
+ number: () => (r, a, o, s) => {
373
+ if (r != null) {
374
+ switch (s.percent && (r = Number(r) * 100), "number") {
375
+ case typeof s.fixed:
376
+ r = r.toFixed(s.fixed);
361
377
  break;
362
- case typeof u.round:
363
- n = n.toFixed(u.round).replace(/0+$/, "");
378
+ case typeof s.round:
379
+ r = r.toFixed(s.round).replace(/0+$/, "");
364
380
  break;
365
- case typeof u.precision:
366
- n = n.toPrecision(u.precision);
381
+ case typeof s.precision:
382
+ r = r.toPrecision(s.precision);
367
383
  break;
368
384
  }
369
- return u?.separator ? Number(n).toLocaleString() : n;
385
+ return s?.separator ? Number(r).toLocaleString() : r;
370
386
  }
371
387
  },
372
- email: () => (n) => createVNode("a", { href: `mailto:${n}` }, [n]),
373
- url: () => (n) => createVNode("a", { href: n }, [n]),
374
- color: () => (n) => createVNode(NColorPicker, {
375
- value: n,
388
+ email: () => (r) => createVNode("a", { href: `mailto:${r}` }, [r]),
389
+ url: () => (r) => createVNode("a", { href: r }, [r]),
390
+ color: () => (r) => createVNode(NColorPicker, {
391
+ value: r,
376
392
  disabled: !0,
377
393
  size: "small"
378
394
  }, null),
379
- image: () => (n, c, l, u) => {
380
- let f;
381
- return n ? createVNode(NFlex, {
395
+ image: () => (r, a, o, s) => {
396
+ let l;
397
+ return r ? createVNode(NFlex, {
382
398
  gap: "8",
383
399
  wrap: !0
384
- }, _isSlot(f = (Array.isArray(n) ? n : u?.multiple ? n.split(",") : [n]).map((n) => d(n)).map((n) => createVNode("img", {
385
- key: n,
386
- src: n,
400
+ }, _isSlot(l = (Array.isArray(r) ? r : s?.multiple ? r.split(",") : [r]).map((r) => c(r)).map((r) => createVNode("img", {
401
+ key: r,
402
+ src: r,
387
403
  style: "max-height: 32px; max-width: 100px; object-fit: contain"
388
- }, null))) ? f : { default: () => [f] }) : void 0;
404
+ }, null))) ? l : { default: () => [l] }) : void 0;
389
405
  },
390
406
  file: () => {
391
- let n = nanoid();
392
- return (c, l, d, f) => {
393
- let p;
394
- return c ? (l.__file_urls ??= {}, l.__file_urls[n] || u(Array.isArray(c) ? c : f?.multiple ? c.split(",") : [c]).then((c) => {
395
- l.__file_urls[n] = c;
407
+ let r = nanoid();
408
+ return (a, o, c, l) => {
409
+ let u;
410
+ return a ? (o.__file_urls ??= {}, o.__file_urls[r] || s(Array.isArray(a) ? a : l?.multiple ? a.split(",") : [a]).then((a) => {
411
+ o.__file_urls[r] = a;
396
412
  }), createVNode(NFlex, {
397
413
  gap: "8",
398
414
  wrap: !0
399
- }, _isSlot(p = (l.__file_urls[n] || []).map((n) => createVNode("a", {
400
- key: n.id,
401
- href: n.url,
415
+ }, _isSlot(u = (o.__file_urls[r] || []).map((r) => createVNode("a", {
416
+ key: r.id,
417
+ href: r.url,
402
418
  target: "_blank",
403
419
  rel: "noreferrer",
404
420
  style: "max-width: 100px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; display: inline-block"
405
- }, [n.name]))) ? p : { default: () => [p] })) : void 0;
421
+ }, [r.name]))) ? u : { default: () => [u] })) : void 0;
406
422
  };
407
423
  },
408
- dept: () => (c, l, u, d) => {
409
- if (c) return createVNode(DtDeptRender, {
410
- value: c,
411
- multiple: d?.multiple,
412
- getDeptsByCode: n
424
+ dept: () => (a, o, s, c) => {
425
+ if (a) return createVNode(DtDeptRender, {
426
+ value: a,
427
+ multiple: c?.multiple,
428
+ getDeptsByCode: r
413
429
  }, null);
414
430
  },
415
- user: () => (n, u, d, f) => {
416
- if (n) return createVNode(DtUserRender, {
417
- value: n,
418
- multiple: f?.multiple,
419
- getUsersByUsername: l
431
+ user: () => (r, s, c, l) => {
432
+ if (r) return createVNode(DtUserRender, {
433
+ value: r,
434
+ multiple: l?.multiple,
435
+ getUsersByUsername: o
420
436
  }, null);
421
437
  }
422
438
  };
423
439
  }
424
440
  function createFormHelper() {
425
- return () => ({ items: n, model: c, handleSubmit: l, reset: d, validation: f, readonly: p, inModal: m, showFeedback: g, showColon: _, labelWidth: v, labelAlign: y, labelPlacement: b, showRequireMark: x, requireMarkPlacement: C }) => createVNode(DataForm, {
426
- readonly: p,
427
- model: c,
428
- items: n,
429
- validation: f,
430
- showColon: unref(_) ?? !0,
431
- labelWidth: unref(v),
432
- labelAlign: unref(y),
433
- labelPlacement: unref(b),
434
- showRequireMark: unref(x),
435
- requireMarkPlacement: unref(C),
436
- showFeedback: unref(g) ?? !0,
441
+ return () => ({ items: r, model: a, handleSubmit: o, reset: c, validation: l, readonly: u, inModal: d, showFeedback: f, showColon: p, labelWidth: m, labelAlign: g, labelPlacement: _, showRequireMark: v, requireMarkPlacement: b }) => createVNode(DataForm, {
442
+ readonly: u,
443
+ model: a,
444
+ items: r,
445
+ validation: l,
446
+ showColon: unref(p) ?? !0,
447
+ labelWidth: unref(m),
448
+ labelAlign: unref(g),
449
+ labelPlacement: unref(_),
450
+ showRequireMark: unref(v),
451
+ requireMarkPlacement: unref(b),
452
+ showFeedback: unref(f) ?? !0,
437
453
  showAction: !1,
438
- onSubmit: l,
439
- onRest: d,
440
- style: m ? "padding-right: 2rem; padding-top: 1rem" : void 0
454
+ onSubmit: o,
455
+ onRest: c,
456
+ style: d ? "padding-right: 2rem; padding-top: 1rem" : void 0
441
457
  }, null);
442
458
  }
443
459
  function createModalHelper() {
444
- let n = (n) => typeof n == "number" ? `${n}px` : n, c = {
460
+ let r = (r) => typeof r == "number" ? `${r}px` : r, a = {
445
461
  maxHeight: "calc(100vh - 130px)",
446
462
  display: "flex",
447
463
  flexDirection: "column"
448
- }, l = { content: !0 };
449
- 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: T, height: E, style: D, onClose: O, onCancel: k, onConfirm: A, onAfterClose: j, onAfterOpen: M, confirmText: N, confirmDisabled: P, confirmLoading: F, cancelText: I, cancelDisabled: L, cancelLoading: R, nativeScrollbar: z, ...B }) => {
450
- let V = m ? () => m : m === null ? null : () => createVNode(NFlex, {
464
+ }, o = { content: !0 };
465
+ return () => ({ type: s = "dialog", visible: c, title: l, content: u, footer: d, placement: f, resizable: p, draggable: m, closeOnEsc: _, closable: v, showMask: y, maskClosable: b, width: S, height: C, style: w, onClose: O, onCancel: k, onConfirm: A, onAfterClose: j, onAfterOpen: M, confirmText: N, confirmDisabled: P, confirmLoading: F, cancelText: I, cancelDisabled: L, cancelLoading: R, nativeScrollbar: z, ...B }) => {
466
+ let V = d ? () => d : d === null ? null : () => createVNode(NFlex, {
451
467
  justify: "end",
452
468
  gap: "16"
453
469
  }, { default: () => [I === null ? void 0 : createVNode(NButton, {
@@ -462,58 +478,58 @@ function createModalHelper() {
462
478
  loading: F,
463
479
  style: "min-width: 60px"
464
480
  }, _isSlot(N) ? N : { default: () => [N] })] });
465
- if (u === "dialog") {
466
- let { style: u } = mergeProps({ style: {
467
- width: n(T ?? 520),
468
- height: n(E)
469
- } }, { style: D });
481
+ if (s === "dialog") {
482
+ let { style: s } = mergeProps({ style: {
483
+ width: r(S ?? 520),
484
+ height: r(C)
485
+ } }, { style: w });
470
486
  return createVNode(NModal, mergeProps({
471
- show: d,
487
+ show: c,
472
488
  preset: "card",
473
- title: () => f,
474
- maskClosable: C ?? !1,
475
- closeOnEsc: b,
476
- closable: x,
489
+ title: () => l,
490
+ maskClosable: b ?? !1,
491
+ closeOnEsc: _,
492
+ closable: v,
477
493
  onClose: O,
478
- segmented: l,
494
+ segmented: o,
479
495
  size: "small",
480
496
  onAfterEnter: M,
481
497
  onAfterLeave: j,
482
498
  onUpdateShow: O,
483
- draggable: v ?? !0,
484
- style: u,
485
- contentStyle: c
499
+ draggable: m ?? !0,
500
+ style: s,
501
+ contentStyle: a
486
502
  }, B), {
487
503
  default: () => createVNode(NScrollbar, {
488
504
  abstract: !0,
489
505
  style: "display: flex; flex-direction: column"
490
- }, _isSlot(p) ? p : { default: () => [p] }),
506
+ }, _isSlot(u) ? u : { default: () => [u] }),
491
507
  action: V
492
508
  });
493
509
  }
494
510
  let { bodyContentClass: H, bodyContentStyle: U, ...W } = B;
495
511
  return createVNode(NDrawer, mergeProps({
496
- show: d,
512
+ show: c,
497
513
  trapFocus: !1,
498
- closeOnEsc: b,
499
- showMask: S,
500
- maskClosable: C,
501
- resizable: _,
502
- placement: g,
503
- width: T ?? 440,
504
- height: E,
514
+ closeOnEsc: _,
515
+ showMask: y,
516
+ maskClosable: b,
517
+ resizable: p,
518
+ placement: f,
519
+ width: S ?? 440,
520
+ height: C,
505
521
  onUpdateShow: O,
506
522
  onAfterEnter: M,
507
523
  onAfterLeave: j,
508
- style: D
524
+ style: w
509
525
  }, W), { default: () => [createVNode(NDrawerContent, {
510
- closable: x,
526
+ closable: v,
511
527
  nativeScrollbar: z ?? !1,
512
528
  bodyContentClass: H,
513
529
  bodyContentStyle: U
514
530
  }, {
515
- default: () => p,
516
- header: () => f,
531
+ default: () => u,
532
+ header: () => l,
517
533
  footer: V
518
534
  })] });
519
535
  };
package/dist/use-style.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as flex, c as flexDirCol, d as flexJustifySB, f as fullHeight, g as useStyle, h as useMergedClsPrefix, i as cM, l as flexGap, m as fullWidth, n as cB, o as flexAlignCenter, p as fullWH, r as cE, s as flexCenter, t as c, u as flexJustifyCenter } from "./use-style-DcT-1dj4.js";
1
+ import { a as flex, c as flexDirCol, d as flexJustifySB, f as fullHeight, g as useStyle, h as useMergedClsPrefix, i as cM, l as flexGap, m as fullWidth, n as cB, o as flexAlignCenter, p as fullWH, r as cE, s as flexCenter, t as c, u as flexJustifyCenter } from "./use-style-mj2B1q0l.js";
2
2
  export { c, cB, cE, cM, useStyle as default, flex, flexAlignCenter, flexCenter, flexDirCol, flexGap, flexJustifyCenter, flexJustifySB, fullHeight, fullWH, fullWidth, useMergedClsPrefix as useClsPrefix };
package/esm/page.d.ts CHANGED
@@ -34,6 +34,7 @@ declare module '@ithinkdt/page' {
34
34
  & {
35
35
  dictType?: DictTypeKey | undefined
36
36
  options?: DictItem[] | (SelectOption | SelectGroupOption)[] | undefined
37
+ valueType?: 'string' | 'number' | undefined
37
38
  }>
38
39
  selectSlots?: SelectSlots
39
40
  }
@@ -52,6 +53,7 @@ declare module '@ithinkdt/page' {
52
53
  & {
53
54
  dictType?: DictTypeKey | undefined
54
55
  options?: DictItem[] | undefined
56
+ valueType?: 'string' | 'number' | undefined
55
57
  }>
56
58
  checkboxesSlots?: { }
57
59
  }
@@ -61,6 +63,7 @@ declare module '@ithinkdt/page' {
61
63
  & {
62
64
  dictType?: DictTypeKey | undefined
63
65
  options?: DictItem[] | undefined
66
+ valueType?: 'string' | 'number' | undefined
64
67
  }>
65
68
  radiosSlots?: { }
66
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ithinkdt/ui",
3
- "version": "4.0.0-403",
3
+ "version": "4.0.0-405",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "iThinkDT UI",
@@ -82,14 +82,14 @@
82
82
  }
83
83
  },
84
84
  "devDependencies": {
85
- "@vitejs/plugin-vue-jsx": "^5.1.1",
85
+ "@vitejs/plugin-vue-jsx": "^5.1.2",
86
86
  "ithinkdt-ui": "^1.8.1",
87
87
  "typescript": "~5.9.3",
88
- "unocss": ">=66.5.6",
89
- "vite": "npm:rolldown-vite@^7.2.5",
90
- "vue": "^3.5.24",
88
+ "unocss": ">=66.5.9",
89
+ "vite": "npm:rolldown-vite@^7.2.7",
90
+ "vue": "^3.5.25",
91
91
  "vue-router": "^4.6.3",
92
- "@ithinkdt/page": "^4.0.0-400"
92
+ "@ithinkdt/page": "^4.0.0-401"
93
93
  },
94
94
  "scripts": {
95
95
  "dev": "vite build --watch",