dlzn-ui 1.67.0 → 1.69.0

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,3 +1,5 @@
1
+ import { CheckboxGroupProps as CheckboxGroupProps$1 } from "../../checkbox-group/src/checkbox-group.js";
2
+ import "../../checkbox-group/index.js";
1
3
  import { CheckboxProps as CheckboxProps$1 } from "../../checkbox/src/checkbox.js";
2
4
  import "../../checkbox/index.js";
3
5
  import { InputProps as InputProps$1 } from "../../input/src/input.js";
@@ -24,12 +26,11 @@ import { TreeSelectProps as TreeSelectProps$1 } from "../../tree-select/src/tree
24
26
  import "../../tree-select/index.js";
25
27
  import { UploadProps as UploadProps$1 } from "../../upload/src/upload.js";
26
28
  import "../../upload/index.js";
27
- import { BusComponentPropsMap } from "../../../index.js";
28
- import { CheckboxGroupProps as CheckboxGroupProps$1 } from "../../checkbox-group/src/checkbox-group.js";
29
- import "../../checkbox-group/index.js";
30
29
  import { FormInstanceFunctions, FormItemProps as FormItemProps$1, FormProps as FormProps$1 } from "tdesign-vue-next";
31
30
  import { ClassValue, ComponentPublicInstance, Ref, StyleValue } from "vue";
31
+ import appParams from "virtual:dlzn-ui/app-params";
32
32
  //#region ../../packages/dlzn-ui/components/form/src/form.d.ts
33
+ type BusComponentPropsMapType = typeof appParams.busComponentPropsMap;
33
34
  export declare const formPropsInit: {
34
35
  readonly autoLabelWidth: true;
35
36
  readonly colon: true;
@@ -128,7 +129,7 @@ type ComponentItemWithOthers = { [K in keyof ComponentPropsMap]: AllowedComponen
128
129
  slot?: never;
129
130
  }; }[keyof ComponentPropsMap];
130
131
  type ComponentItemXOR = { [K in keyof ComponentPropsMap]: ComponentConfig<K>; }[keyof ComponentPropsMap];
131
- interface ComponentPropsMap extends BusComponentPropsMap {
132
+ interface ComponentPropsMap extends BusComponentPropsMapType {
132
133
  TCheckbox: Omit<CheckboxProps$1, 'modelValue'>;
133
134
  TCheckboxGroup: Omit<CheckboxGroupProps$1, 'modelValue'>;
134
135
  TInput: Omit<InputProps$1, 'modelValue'>;
@@ -3,9 +3,9 @@ import { FormInstance, FormProps, FormPropsData } from "./form.js";
3
3
  declare var __VLS_15: string, __VLS_16: {};
4
4
  type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_15>]?: (props: typeof __VLS_16) => any; };
5
5
  declare const __VLS_base: import("vue").DefineComponent<FormProps, FormInstance, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FormProps> & Readonly<{}>, {
6
- data: FormPropsData;
7
6
  disabled: boolean;
8
7
  readonly: boolean;
8
+ data: FormPropsData;
9
9
  labelAlign: "right" | "top";
10
10
  colon: boolean;
11
11
  layout: "vertical" | "inline";
@@ -1,31 +1,31 @@
1
- import { getAppParams as e } from "../../../entry/appParams.mjs";
2
- import t from "../../../plugins/autoImport/_msg.mjs";
3
- import n from "../../../plugins/autoImport/_notify.mjs";
4
- import { isFalsy as r } from "../../../utils/boolean.mjs";
5
- import i from "../../checkbox/src/checkbox2.mjs";
6
- import a from "../../checkbox-group/src/checkbox-group2.mjs";
7
- import { formPropsInit as o } from "./form.mjs";
8
- import s from "../../input-number/src/input-number2.mjs";
9
- import c from "../../input/src/input2.mjs";
10
- import l from "../../radio-group/src/radio-group2.mjs";
11
- import u from "../../range-input/src/range-input2.mjs";
12
- import d from "../../select/src/select2.mjs";
13
- import f from "../../slider/src/slider2.mjs";
14
- import p from "../../switch/src/switch2.mjs";
15
- import m from "../../tag-input/src/tag-input2.mjs";
16
- import h from "../../textarea/src/textarea2.mjs";
1
+ import e from "../../../plugins/autoImport/_msg.mjs";
2
+ import t from "../../../plugins/autoImport/_notify.mjs";
3
+ import { isFalsy as n } from "../../../utils/boolean.mjs";
4
+ import r from "../../checkbox/src/checkbox2.mjs";
5
+ import i from "../../checkbox-group/src/checkbox-group2.mjs";
6
+ import { formPropsInit as a } from "./form.mjs";
7
+ import o from "../../input-number/src/input-number2.mjs";
8
+ import s from "../../input/src/input2.mjs";
9
+ import c from "../../radio-group/src/radio-group2.mjs";
10
+ import l from "../../range-input/src/range-input2.mjs";
11
+ import u from "../../select/src/select2.mjs";
12
+ import d from "../../slider/src/slider2.mjs";
13
+ import f from "../../switch/src/switch2.mjs";
14
+ import p from "../../tag-input/src/tag-input2.mjs";
15
+ import m from "../../textarea/src/textarea2.mjs";
17
16
  import ee from "../../tree-select/src/tree-select2.mjs";
18
17
  import te from "../../tree/src/tree2.mjs";
19
18
  import ne from "../../upload/src/upload2.mjs";
20
- import { Fragment as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, defineAsyncComponent as x, defineComponent as S, getCurrentInstance as C, mergeDefaults as w, mergeProps as T, nextTick as E, onMounted as re, openBlock as D, provide as O, ref as k, renderList as A, renderSlot as j, resolveDynamicComponent as M, shallowRef as N, unref as P, watch as F, withCtx as I } from "vue";
21
- import { useMutationObserver as L, useResizeObserver as R } from "@vueuse/core";
22
- import { Form as z, FormItem as B } from "tdesign-vue-next";
19
+ import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, defineAsyncComponent as b, defineComponent as x, getCurrentInstance as S, mergeDefaults as C, mergeProps as w, nextTick as T, onMounted as re, openBlock as E, provide as D, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as j, shallowRef as M, unref as N, watch as P, withCtx as F } from "vue";
20
+ import { useMutationObserver as I, useResizeObserver as L } from "@vueuse/core";
21
+ import { Form as R, FormItem as z } from "tdesign-vue-next";
22
+ import B from "virtual:dlzn-ui/app-params";
23
23
  //#region ../../packages/dlzn-ui/components/form/src/form.vue?vue&type=script&setup=true&lang.ts
24
- var V = /*@__PURE__*/ S({
24
+ var V = /*@__PURE__*/ x({
25
25
  inheritAttrs: !1,
26
26
  name: "TForm",
27
27
  __name: "form",
28
- props: /*@__PURE__*/ w({
28
+ props: /*@__PURE__*/ C({
29
29
  autoLabelWidth: { type: Boolean },
30
30
  data: {},
31
31
  items: {},
@@ -49,15 +49,15 @@ var V = /*@__PURE__*/ S({
49
49
  onReset: { type: Function },
50
50
  onSubmit: { type: Function },
51
51
  onValidate: { type: Function }
52
- }, o),
53
- setup(o, { expose: S }) {
54
- let w = o, { busComponentInitialValueMap: V, busFormItems: H } = e(), U = C(), W = k(null), G = _(() => w.items.map((e) => {
52
+ }, a),
53
+ setup(a, { expose: x }) {
54
+ let C = a, { busComponentInitialValueMap: V, busFormItems: H } = B, U = S(), W = O(null), G = g(() => C.items.map((e) => {
55
55
  if (typeof e.__others == "function") {
56
56
  let t = {
57
57
  ...e,
58
58
  ...e.__others({
59
59
  exposed: W,
60
- formData: w.data
60
+ formData: C.data
61
61
  })
62
62
  };
63
63
  return delete t.__others, t;
@@ -66,10 +66,10 @@ var V = /*@__PURE__*/ S({
66
66
  }));
67
67
  function K() {
68
68
  G.value.forEach((e) => {
69
- if (e.model !== void 0 && !Object.hasOwn(w.data, e.model)) {
69
+ if (e.model !== void 0 && !Object.hasOwn(C.data, e.model)) {
70
70
  if (V.has(e.component)) {
71
71
  let t = V.get(e.component);
72
- w.data[e.model] = t(e);
72
+ C.data[e.model] = t(e);
73
73
  return;
74
74
  }
75
75
  let t = [
@@ -87,34 +87,34 @@ var V = /*@__PURE__*/ S({
87
87
  "yearrange",
88
88
  "years"
89
89
  ].includes(e.type) || e.component === "TSlider" && e.range === !0;
90
- w.data[e.model] = t ? [] : e.component === "TCheckbox" ? !1 : e.component === "TSwitch" ? Array.isArray(e.customValue) ? e.customValue[1] : !1 : "";
90
+ C.data[e.model] = t ? [] : e.component === "TCheckbox" ? !1 : e.component === "TSwitch" ? Array.isArray(e.customValue) ? e.customValue[1] : !1 : "";
91
91
  }
92
92
  });
93
93
  }
94
- F(G, K, {
94
+ P(G, K, {
95
95
  deep: 2,
96
96
  immediate: !0
97
- }), F(() => w.data, () => {
98
- n.error("TForm: data is changed");
97
+ }), P(() => C.data, () => {
98
+ t.error("TForm: data is changed");
99
99
  });
100
100
  let q = /* @__PURE__ */ new Map(), J = {
101
- TCheckbox: i,
102
- TCheckboxGroup: a,
103
- TInput: c,
104
- TInputNumber: s,
105
- TRadioGroup: l,
106
- TRangeInput: u,
107
- TSelect: d,
108
- TSlider: f,
109
- TSwitch: p,
110
- TTagInput: m,
111
- TTextarea: h,
101
+ TCheckbox: r,
102
+ TCheckboxGroup: i,
103
+ TInput: s,
104
+ TInputNumber: o,
105
+ TRadioGroup: c,
106
+ TRangeInput: l,
107
+ TSelect: u,
108
+ TSlider: d,
109
+ TSwitch: f,
110
+ TTagInput: p,
111
+ TTextarea: m,
112
112
  TTree: te,
113
113
  TTreeSelect: ee,
114
114
  TUpload: ne
115
115
  };
116
116
  function Y(e) {
117
- return typeof e == "string" ? H.has(e) ? (q.has(e) || q.set(e, x(H.get(e))), q.get(e)) : J[e] : c;
117
+ return typeof e == "string" ? H.has(e) ? (q.has(e) || q.set(e, b(H.get(e))), q.get(e)) : J[e] : s;
118
118
  }
119
119
  function ie(e) {
120
120
  let t = {};
@@ -133,7 +133,7 @@ var V = /*@__PURE__*/ S({
133
133
  "TCheckboxGroup",
134
134
  "TRadioGroup"
135
135
  ].includes(e.component), r = e.component === "TUpload" ? "请上传文件" : typeof t.label == "string" ? n ? `请选择${t.label}` : `请填写${t.label}` : "必填";
136
- return t.required === !0 && (t.rules === void 0 && (t.rules = []), !t.rules.some((e) => e.required === !0) && w.rules?.[e.model ?? ""] === void 0 && t.rules.unshift({
136
+ return t.required === !0 && (t.rules === void 0 && (t.rules = []), !t.rules.some((e) => e.required === !0) && C.rules?.[e.model ?? ""] === void 0 && t.rules.unshift({
137
137
  message: r,
138
138
  required: !0
139
139
  }, {
@@ -144,8 +144,8 @@ var V = /*@__PURE__*/ S({
144
144
  whitespace: !0
145
145
  }), t;
146
146
  }
147
- let ae = _(() => {
148
- let e = { ...w };
147
+ let ae = g(() => {
148
+ let e = { ...C };
149
149
  if (e.rules !== void 0) {
150
150
  let t = {};
151
151
  Object.keys(e.rules).forEach((n) => {
@@ -162,71 +162,71 @@ var V = /*@__PURE__*/ S({
162
162
  return delete e.items, delete e.msgErrorWhenValidate, delete e.autoLabelWidth, Object.keys(e).forEach((t) => {
163
163
  e[t] === void 0 && delete e[t];
164
164
  }), e;
165
- }), oe = z, Z = () => {
166
- let e = { ...w.data };
165
+ }), oe = R, Z = () => {
166
+ let e = { ...C.data };
167
167
  return G.value.forEach((t) => {
168
168
  t.show === !1 && delete e[t.model];
169
169
  }), e;
170
170
  };
171
- function se(e) {
172
- if (e !== null) {
173
- let n = e;
174
- if (!n.validate._alreadyReplace) {
175
- let e = n.validate;
176
- n.validate = (...n) => new Promise((r, i) => {
177
- e(...n).then((e) => {
178
- e === !0 ? r(Z()) : (w.msgErrorWhenValidate && Object.keys(e).forEach((n) => {
179
- e[n].forEach((e) => {
180
- e.result === !1 && t.error(e.message);
171
+ function se(t) {
172
+ if (t !== null) {
173
+ let r = t;
174
+ if (!r.validate._alreadyReplace) {
175
+ let t = r.validate;
176
+ r.validate = (...n) => new Promise((r, i) => {
177
+ t(...n).then((t) => {
178
+ t === !0 ? r(Z()) : (C.msgErrorWhenValidate && Object.keys(t).forEach((n) => {
179
+ t[n].forEach((t) => {
180
+ t.result === !1 && e.error(t.message);
181
181
  });
182
- }), i(e));
182
+ }), i(t));
183
183
  });
184
- }), n.validate._alreadyReplace = !0;
184
+ }), r.validate._alreadyReplace = !0;
185
185
  }
186
- if (!n.validate._alreadyReplace) {
187
- let e = n.validateOnly;
188
- n.validateOnly = (...t) => new Promise((n, r) => {
186
+ if (!r.validate._alreadyReplace) {
187
+ let e = r.validateOnly;
188
+ r.validateOnly = (...t) => new Promise((n, r) => {
189
189
  e(...t).then((e) => {
190
190
  e === !0 ? n(Z()) : r(e);
191
191
  });
192
- }), n.validateOnly._alreadyReplace = !0;
192
+ }), r.validateOnly._alreadyReplace = !0;
193
193
  }
194
- if (!n.clearValidate._alreadyReplace) {
195
- let e = n.clearValidate;
196
- n.clearValidate = (...t) => {
197
- E(() => {
198
- E(() => {
199
- E(() => {
200
- E(() => {
201
- E(() => {
194
+ if (!r.clearValidate._alreadyReplace) {
195
+ let e = r.clearValidate;
196
+ r.clearValidate = (...t) => {
197
+ T(() => {
198
+ T(() => {
199
+ T(() => {
200
+ T(() => {
201
+ T(() => {
202
202
  e(...t);
203
203
  });
204
204
  });
205
205
  });
206
206
  });
207
207
  });
208
- }, n.clearValidate._alreadyReplace = !0;
208
+ }, r.clearValidate._alreadyReplace = !0;
209
209
  }
210
- n.getFormData = Z, n.setFormData = (e, t) => {
211
- let { ignoreKeys: n = [], isNotFalsy: i = !0, numberToStringKeys: a = [], override: o = {}, splitToArrKeys: s = [] } = t ?? {};
212
- Object.keys(w.data).forEach((t) => {
213
- n.includes(t) || (s.includes(t) ? w.data[t] = typeof e[t] == "string" ? e[t].split(",").filter(Boolean) : [] : i && r(e[t]) || (w.data[t] = e[t]), a.includes(t) && typeof w.data[t] == "number" && (w.data[t] = String(w.data[t])));
214
- }), Object.assign(w.data, o);
210
+ r.getFormData = Z, r.setFormData = (e, t) => {
211
+ let { ignoreKeys: r = [], isNotFalsy: i = !0, numberToStringKeys: a = [], override: o = {}, splitToArrKeys: s = [] } = t ?? {};
212
+ Object.keys(C.data).forEach((t) => {
213
+ r.includes(t) || (s.includes(t) ? C.data[t] = typeof e[t] == "string" ? e[t].split(",").filter(Boolean) : [] : i && n(e[t]) || (C.data[t] = e[t]), a.includes(t) && typeof C.data[t] == "number" && (C.data[t] = String(C.data[t])));
214
+ }), Object.assign(C.data, o);
215
215
  };
216
216
  }
217
- let n = e ?? {};
218
- W.value = n, U.exposed = n;
217
+ let r = t ?? {};
218
+ W.value = r, U.exposed = r;
219
219
  }
220
- let Q = N();
220
+ let Q = M();
221
221
  re(() => {
222
- Q.value = U.exposed.$el.getElementsByClassName("t-form__label"), $(), L(U.exposed.$el, () => {
222
+ Q.value = U.exposed.$el.getElementsByClassName("t-form__label"), $(), I(U.exposed.$el, () => {
223
223
  $();
224
224
  }, {
225
225
  attributeFilter: ["class"],
226
226
  characterData: !0,
227
227
  childList: !0,
228
228
  subtree: !0
229
- }), R(U.exposed.$el, () => {
229
+ }), L(U.exposed.$el, () => {
230
230
  $();
231
231
  });
232
232
  });
@@ -234,7 +234,7 @@ var V = /*@__PURE__*/ S({
234
234
  let e = [...Q.value];
235
235
  if (e.forEach((e) => {
236
236
  e.style.minWidth = "auto";
237
- }), w.labelAlign === "top" || !w.autoLabelWidth) return;
237
+ }), C.labelAlign === "top" || !C.autoLabelWidth) return;
238
238
  let t = 0;
239
239
  e.forEach((e) => {
240
240
  t = Math.max(t, e.offsetWidth);
@@ -242,15 +242,15 @@ var V = /*@__PURE__*/ S({
242
242
  e.style.minWidth = `${t}px`;
243
243
  });
244
244
  }
245
- return O("formData", w.data), O("formExposed", W), O("isFormDisabled", _(() => w.disabled)), O("isFormReadonly", _(() => w.readonly)), S({}), (e, t) => (D(), b(g, null, [y(" eslint-disable vue/no-mutating-props "), (D(), v(M(P(oe)), T(T(e.$attrs, {
245
+ return D("formData", C.data), D("formExposed", W), D("isFormDisabled", g(() => C.disabled)), D("isFormReadonly", g(() => C.readonly)), x({}), (e, t) => (E(), y(h, null, [v(" eslint-disable vue/no-mutating-props "), (E(), _(j(N(oe)), w(w(e.$attrs, {
246
246
  ...ae.value,
247
247
  ref: se
248
248
  }), { "label-width": "fit-content" }), {
249
- default: I(() => [(D(!0), b(g, null, A(G.value.filter((e) => e.show !== !1), (t) => (D(), v(P(B), T({ key: t.model ?? t.slot }, { ref_for: !0 }, T({ ...X(t) }, { class: { no_label_item: P(r)(t._label) } }), { name: t.model }), {
250
- default: I(() => [t.slot ? j(e.$slots, t.slot, {}, void 0, !0, 0) : (D(), v(M(Y(t.component)), T({
249
+ default: F(() => [(E(!0), y(h, null, k(G.value.filter((e) => e.show !== !1), (t) => (E(), _(N(z), w({ key: t.model ?? t.slot }, { ref_for: !0 }, w({ ...X(t) }, { class: { no_label_item: N(n)(t._label) } }), { name: t.model }), {
250
+ default: F(() => [t.slot ? A(e.$slots, t.slot, {}, void 0, !0, 0) : (E(), _(j(Y(t.component)), w({
251
251
  key: 1,
252
- modelValue: o.data[t.model],
253
- "onUpdate:modelValue": (e) => o.data[t.model] = e
252
+ modelValue: a.data[t.model],
253
+ "onUpdate:modelValue": (e) => a.data[t.model] = e
254
254
  }, { ref_for: !0 }, ie(t)), null, 16, ["modelValue", "onUpdate:modelValue"]))]),
255
255
  _: 2
256
256
  }, 1040, ["name"]))), 128))]),
@@ -0,0 +1,2 @@
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
+ [data-v-178687e3] .t-form__label{padding-right:var(--td-size-1)}[data-v-178687e3] .t-form__label--top{min-height:auto;line-height:inherit}[data-v-178687e3] .t-form__item{margin-bottom:var(--td-comp-margin-xxl)!important}[data-v-178687e3] .t-form__item.no_label_item .t-form__label{display:none}[data-v-178687e3] .t-form__item .t-input-adornment{flex:auto}.t-form[data-v-178687e3]{--td-comp-margin-xxl:var(--td-comp-margin-xl)}.t-form[data-v-178687e3]:has(.t-form__item:not(.no_label_item)) .no_label_item .t-form__label{opacity:0;height:1px;padding-right:0;display:block}.t-form.no_item_mb .t-form__item[data-v-178687e3]{margin-bottom:0!important}.t-form-inline[data-v-178687e3]{--repeat-min-width:220px;--repeat-gap:24px;grid-template-columns:repeat(auto-fill, minmax(var(--repeat-min-width), 1fr));gap:0 var(--repeat-gap);display:grid}.t-form-inline[data-v-178687e3] .no_label_item{align-self:flex-end}.t-form-inline[data-v-178687e3] .t-form__item{min-width:auto;margin-right:0;display:block}.t-form-inline[data-v-178687e3] .t-form__item.grid_item .t-form__controls-content{grid-template-columns:repeat(auto-fill, minmax(var(--repeat-min-width), 1fr));gap:0 var(--repeat-gap);display:grid}
@@ -1,7 +1,7 @@
1
1
  import e from "../../../_virtual/_plugin-vue_export-helper.mjs";
2
2
  import t from "./form.vue_vue_type_script_setup_true_lang.mjs";
3
- import './form.vue_vue_type_style_index_0_scoped_4f6efe42_lang.css';/* empty css */
3
+ import './form.vue_vue_type_style_index_0_scoped_178687e3_lang.css';/* empty css */
4
4
  //#region ../../packages/dlzn-ui/components/form/src/form.vue
5
- var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-4f6efe42"]]);
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-178687e3"]]);
6
6
  //#endregion
7
7
  export { n as default };
@@ -1,11 +1,11 @@
1
1
  import { ImageViewerProps } from "./image-viewer.js";
2
2
  //#region ../../packages/dlzn-ui/components/image-viewer/src/image-viewer.vue.d.ts
3
3
  declare const __VLS_export: import("vue").DefineComponent<ImageViewerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageViewerProps> & Readonly<{}>, {
4
- visible: boolean;
5
4
  closeBtn: boolean | import("tdesign-vue-next").TNode;
6
5
  closeOnEscKeydown: boolean;
7
6
  draggable: boolean;
8
7
  showOverlay: boolean;
8
+ visible: boolean;
9
9
  closeOnOverlay: boolean;
10
10
  navigationArrow: boolean | import("tdesign-vue-next").TNode;
11
11
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -7,6 +7,9 @@ import "./button/index.js";
7
7
  import { CardProps, cardPropsInit } from "./card/src/card.js";
8
8
  import _default$1 from "./card/src/card.vue.js";
9
9
  import "./card/index.js";
10
+ import { CheckboxGroupProps } from "./checkbox-group/src/checkbox-group.js";
11
+ import _default$3 from "./checkbox-group/src/checkbox-group.vue.js";
12
+ import "./checkbox-group/index.js";
10
13
  import { CheckboxProps } from "./checkbox/src/checkbox.js";
11
14
  import _default$2 from "./checkbox/src/checkbox.vue.js";
12
15
  import "./checkbox/index.js";
@@ -51,12 +54,12 @@ import _default$4 from "./form/src/form.vue.js";
51
54
  import "./form/index.js";
52
55
  import { IconProps } from "./icon/src/icon.js";
53
56
  import _default$5 from "./icon/src/icon.vue.js";
54
- import { ImageProps, imagePropsInit } from "./image/src/image.js";
55
- import _default$6 from "./image/src/image.vue.js";
56
- import "./image/index.js";
57
57
  import { ImageViewerProps, imageViewerPropsInit } from "./image-viewer/src/image-viewer.js";
58
58
  import _default$7 from "./image-viewer/src/image-viewer.vue.js";
59
59
  import "./image-viewer/index.js";
60
+ import { ImageProps, imagePropsInit } from "./image/src/image.js";
61
+ import _default$6 from "./image/src/image.vue.js";
62
+ import "./image/index.js";
60
63
  import { LinkProps, linkPropsInit } from "./link/src/link.js";
61
64
  import _default$10 from "./link/src/link.vue.js";
62
65
  import "./link/index.js";
@@ -72,7 +75,4 @@ import "./tab-panel/index.js";
72
75
  import { TagProps, tagPropsInit } from "./tag/src/tag.js";
73
76
  import _default$20 from "./tag/src/tag.vue.js";
74
77
  import "./tag/index.js";
75
- import { CheckboxGroupProps } from "./checkbox-group/src/checkbox-group.js";
76
- import _default$3 from "./checkbox-group/src/checkbox-group.vue.js";
77
- import "./checkbox-group/index.js";
78
78
  export { AllowedComponentProps, ButtonProps, CardProps, CheckboxGroupProps, CheckboxProps, DEFAULT_ACCEPT, FormExposed, FormInstance, FormItem, FormItemComponentPropsUnderlyingWithMeta, FormItemProps, FormProps, FormPropsData, GetFormData, IconProps, ImageProps, ImageViewerProps, InputNumberProps, InputProps, LinkProps, PaginationProps, PopconfirmProps, PopupProps, RadioGroupProps, RangeInputProps, ResolvedFormItem, SelectProps, SetFormData, SliderProps, SlotItem, SwitchProps, _default as TButton, _default$1 as TCard, _default$2 as TCheckbox, _default$3 as TCheckboxGroup, _default$4 as TForm, _default$5 as TIcon, _default$6 as TImage, _default$7 as TImageViewer, _default$8 as TInput, _default$9 as TInputNumber, _default$10 as TLink, _default$11 as TPagination, _default$12 as TPopconfirm, _default$13 as TPopup, _default$14 as TRadioGroup, _default$15 as TRangeInput, _default$16 as TSelect, _default$17 as TSlider, _default$18 as TSwitch, _default$19 as TTabPanel, _default$20 as TTag, _default$21 as TTagInput, _default$22 as TTextarea, _default$23 as TTree, _default$24 as TTreeSelect, _default$25 as TUpload, type TabPanelProps, TagInputProps, TagProps, TextareaProps, TreeProps, TreeSelectProps, UploadFile, UploadInstanceFunctions, UploadProps, buttonPropsInit, cardPropsInit, formPropsInit, imagePropsInit, imageViewerPropsInit, inputNumberPropsInit, inputPropsInit, linkPropsInit, selectPropsInit, sliderPropsInit, switchPropsInit, tagInputPropsInit, tagPropsInit, treePropsInit };
@@ -2,9 +2,9 @@ import { PopconfirmProps } from "./popconfirm.js";
2
2
  //#region ../../packages/dlzn-ui/components/popconfirm/src/popconfirm.vue.d.ts
3
3
  declare const __VLS_export: import("vue").DefineComponent<PopconfirmProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PopconfirmProps> & Readonly<{}>, {
4
4
  destroyOnClose: boolean;
5
- showArrow: boolean;
6
5
  theme: "default" | "warning" | "danger";
7
6
  visible: boolean;
7
+ showArrow: boolean;
8
8
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
9
  declare const _default: typeof __VLS_export;
10
10
  //#endregion
@@ -1,9 +1,9 @@
1
1
  import { PopupProps } from "./popup.js";
2
2
  //#region ../../packages/dlzn-ui/components/popup/src/popup.vue.d.ts
3
3
  declare const __VLS_export: import("vue").DefineComponent<PopupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PopupProps> & Readonly<{}>, {
4
- showArrow: boolean;
5
4
  visible: boolean;
6
5
  delay: number | Array<number>;
6
+ showArrow: boolean;
7
7
  hideEmptyPopup: boolean;
8
8
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
9
  declare const _default: typeof __VLS_export;
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
12
12
  "onUpdate:modelValue"?: ((value: RangeInputValue) => any) | undefined;
13
13
  }>, {
14
14
  disabled: boolean | Array<boolean>;
15
- readonly: boolean;
16
15
  max: number;
16
+ readonly: boolean;
17
17
  min: number;
18
18
  decimalPlaces: number;
19
19
  isNumberRange: boolean;
@@ -1,12 +1,12 @@
1
1
  import { SelectProps } from "./select.js";
2
2
  //#region ../../packages/dlzn-ui/components/select/src/select.vue.d.ts
3
3
  declare const __VLS_export: import("vue").DefineComponent<SelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SelectProps> & Readonly<{}>, {
4
- showArrow: boolean;
5
4
  keys: import("tdesign-vue-next").KeysType;
6
5
  disabled: boolean;
7
- scroll: import("tdesign-vue-next").InfinityScroll;
8
6
  readonly: boolean;
9
7
  showCheckAll: boolean;
8
+ showArrow: boolean;
9
+ scroll: import("tdesign-vue-next").InfinityScroll;
10
10
  placeholder: string;
11
11
  clearable: boolean;
12
12
  filterable: boolean;
@@ -2,9 +2,9 @@ import { TreeProps as TreeProps$1 } from "./tree.js";
2
2
  import { TreeInstanceFunctions } from "tdesign-vue-next";
3
3
  //#region ../../packages/dlzn-ui/components/tree/src/tree.vue.d.ts
4
4
  declare const __VLS_export: import("vue").DefineComponent<TreeProps$1, TreeInstanceFunctions<import("tdesign-vue-next").TreeOptionData>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TreeProps$1> & Readonly<{}>, {
5
- icon: boolean | ((h: typeof import("vue").h, props: import("tdesign-vue-next").TreeNodeModel<import("tdesign-vue-next/es/tree/utils/adapt").TypeTreeOptionData>) => import("tdesign-vue-next").TNodeReturnValue);
6
5
  lazy: boolean;
7
6
  disabled: boolean;
7
+ icon: boolean | ((h: typeof import("vue").h, props: import("tdesign-vue-next").TreeNodeModel<import("tdesign-vue-next/es/tree/utils/adapt").TypeTreeOptionData>) => import("tdesign-vue-next").TNodeReturnValue);
8
8
  label: string | boolean | ((h: typeof import("vue").h, props: import("tdesign-vue-next").TreeNodeModel<import("tdesign-vue-next/es/tree/utils/adapt").TypeTreeOptionData>) => import("tdesign-vue-next").TNodeReturnValue);
9
9
  hover: boolean;
10
10
  checkable: boolean;
@@ -1,4 +1,3 @@
1
- import { UseListPromiseMap } from "../index.js";
2
1
  import { ComputedRef, Ref } from "vue";
3
2
  //#region ../../packages/dlzn-ui/hooks/useList.d.ts
4
3
  export interface ListItem {
@@ -10,7 +9,7 @@ export type UseListAllKey = keyof typeof promiseMap;
10
9
  export type UseListKey = Exclude<UseListAllKey, UseListTreeKey>;
11
10
  export type UseListTreeKey = TreeKeys<typeof promiseMap>;
12
11
  type TreeKeys<T> = { [K in keyof T]: K extends `${string}Tree` ? K : never; }[keyof T];
13
- declare const promiseMap: UseListPromiseMap;
12
+ declare const promiseMap: Record<string, () => Promise<ListItem[]>>;
14
13
  export declare function useClearList(): void;
15
14
  export declare function useList(key: UseListAllKey): Ref<ListItem[], ListItem[]>;
16
15
  export declare function useListLabel(key: UseListKey): ComputedRef<string[]>;
package/hooks/useList.mjs CHANGED
@@ -1,30 +1,30 @@
1
- import { getAppParams as e } from "../entry/appParams.mjs";
2
- import { stringDisplay as t } from "../utils/string.mjs";
3
- import { computed as n, ref as r } from "vue";
1
+ import { stringDisplay as e } from "../utils/string.mjs";
2
+ import { computed as t, ref as n } from "vue";
3
+ import r from "virtual:dlzn-ui/app-params";
4
4
  //#region ../../packages/dlzn-ui/hooks/useList.ts
5
- var i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = e().useListPromiseMap;
5
+ var i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = r.useListPromiseMap;
6
6
  function s() {
7
7
  i.clear(), a.clear();
8
8
  }
9
9
  function c(e) {
10
- let t = i.has(e) ? i.get(e) : r([]);
10
+ let t = i.has(e) ? i.get(e) : n([]);
11
11
  return i.has(e) || i.set(e, t), t.value.length === 0 && (!a.has(e) || a.get(e) === !1) && (a.set(e, !0), o[e]().then((e) => {
12
12
  t.value = e;
13
13
  }).finally(() => {
14
14
  a.set(e, !1);
15
15
  })), t;
16
16
  }
17
- function l(e, r) {
18
- let i = c(e);
19
- return n(() => {
17
+ function l(n, r) {
18
+ let i = c(n);
19
+ return t(() => {
20
20
  if (r === void 0) return i.value.map((e) => e.label);
21
- if (Array.isArray(r)) return i.value.length === 0 ? [] : r.map((e) => i.value.find((t) => String(t.value) === String(e))?.label ?? t(e));
21
+ if (Array.isArray(r)) return i.value.length === 0 ? [] : r.map((t) => i.value.find((e) => String(e.value) === String(t))?.label ?? e(t));
22
22
  if (i.value.length === 0) return "";
23
23
  if (typeof r == "string") {
24
24
  let e = r.split(",").filter(Boolean);
25
25
  if (e.length > 0) return e.map((e) => i.value.find((t) => String(t.value) === e)?.label ?? e).join(",");
26
26
  }
27
- return i.value.find((e) => String(e.value) === String(r))?.label ?? t(r);
27
+ return i.value.find((e) => String(e.value) === String(r))?.label ?? e(r);
28
28
  });
29
29
  }
30
30
  function u(e) {
package/index.d.ts CHANGED
@@ -4,7 +4,9 @@ import { ButtonProps, buttonPropsInit } from "./components/button/src/button.js"
4
4
  import _default from "./components/button/src/button.vue.js";
5
5
  import { CardProps, cardPropsInit } from "./components/card/src/card.js";
6
6
  import _default$1 from "./components/card/src/card.vue.js";
7
- import setAppParams from "./entry/appParams.js";
7
+ import { ListItem } from "./hooks/useList.js";
8
+ import { CheckboxGroupProps } from "./components/checkbox-group/src/checkbox-group.js";
9
+ import _default$3 from "./components/checkbox-group/src/checkbox-group.vue.js";
8
10
  import { CheckboxProps } from "./components/checkbox/src/checkbox.js";
9
11
  import _default$2 from "./components/checkbox/src/checkbox.vue.js";
10
12
  import { InputProps, inputPropsInit } from "./components/input/src/input.js";
@@ -35,10 +37,10 @@ import { AllowedComponentProps, FormExposed, FormInstance, FormItem, FormItemCom
35
37
  import _default$4 from "./components/form/src/form.vue.js";
36
38
  import { IconProps } from "./components/icon/src/icon.js";
37
39
  import _default$5 from "./components/icon/src/icon.vue.js";
38
- import { ImageProps, imagePropsInit } from "./components/image/src/image.js";
39
- import _default$6 from "./components/image/src/image.vue.js";
40
40
  import { ImageViewerProps, imageViewerPropsInit } from "./components/image-viewer/src/image-viewer.js";
41
41
  import _default$7 from "./components/image-viewer/src/image-viewer.vue.js";
42
+ import { ImageProps, imagePropsInit } from "./components/image/src/image.js";
43
+ import _default$6 from "./components/image/src/image.vue.js";
42
44
  import { LinkProps, linkPropsInit } from "./components/link/src/link.js";
43
45
  import _default$10 from "./components/link/src/link.vue.js";
44
46
  import { PaginationProps } from "./components/pagination/src/pagination.js";
@@ -50,17 +52,14 @@ import _default$19 from "./components/tab-panel/src/tab-panel.vue.js";
50
52
  import { TagProps, tagPropsInit } from "./components/tag/src/tag.js";
51
53
  import _default$20 from "./components/tag/src/tag.vue.js";
52
54
  import "./components/index.js";
53
- import { ListItem } from "./hooks/useList.js";
54
- import { CheckboxGroupProps } from "./components/checkbox-group/src/checkbox-group.js";
55
- import _default$3 from "./components/checkbox-group/src/checkbox-group.vue.js";
56
- import { AsyncComponentLoader, Component } from "vue";
55
+ import { AsyncComponentLoader } from "vue";
57
56
  //#region ../../packages/dlzn-ui/index.d.ts
58
- export type BusComponentInitialValueMap = Map<string, any>;
59
- export type BusComponentPropsMap = Record<string, any>;
60
- export type BusFormItems = Map<string, AsyncComponentLoader>;
61
- export type LazyRouterImport = () => Promise<{
62
- default: Component;
63
- }>;
64
- export type UseListPromiseMap = Record<string, () => Promise<ListItem[]>>;
57
+ export interface AppParams {
58
+ busComponentInitialValueMap: Map<string, (itemConfig: Record<string, any>) => any>;
59
+ busComponentPropsMap: Record<string, any>;
60
+ busFormItems: Map<string, AsyncComponentLoader>;
61
+ useListPromiseMap: Record<string, () => Promise<ListItem[]>>;
62
+ viewsEntryLazyImport: Record<string, AsyncVueComponentLoaderDefault>;
63
+ }
65
64
  //#endregion
66
- export { AllowedComponentProps, ButtonProps, CardProps, CheckboxGroupProps, CheckboxProps, DEFAULT_ACCEPT, FormExposed, FormInstance, FormItem, FormItemComponentPropsUnderlyingWithMeta, FormItemProps, FormProps, FormPropsData, GetFormData, IconProps, ImageProps, ImageViewerProps, InputNumberProps, InputProps, LinkProps, PaginationProps, PopconfirmProps, PopupProps, RadioGroupProps, RangeInputProps, ResolvedFormItem, SelectProps, SetFormData, SliderProps, SlotItem, SwitchProps, _default as TButton, _default$1 as TCard, _default$2 as TCheckbox, _default$3 as TCheckboxGroup, _default$4 as TForm, _default$5 as TIcon, _default$6 as TImage, _default$7 as TImageViewer, _default$8 as TInput, _default$9 as TInputNumber, _default$10 as TLink, _default$11 as TPagination, _default$12 as TPopconfirm, _default$13 as TPopup, _default$14 as TRadioGroup, _default$15 as TRangeInput, _default$16 as TSelect, _default$17 as TSlider, _default$18 as TSwitch, _default$19 as TTabPanel, _default$20 as TTag, _default$21 as TTagInput, _default$22 as TTextarea, _default$23 as TTree, _default$24 as TTreeSelect, _default$25 as TUpload, type TabPanelProps, TagInputProps, TagProps, TextareaProps, TreeProps, TreeSelectProps, UploadFile, UploadInstanceFunctions, UploadProps, buttonPropsInit, cardPropsInit, formPropsInit, imagePropsInit, imageViewerPropsInit, inputNumberPropsInit, inputPropsInit, linkPropsInit, selectPropsInit, setAppParams, sliderPropsInit, switchPropsInit, tagInputPropsInit, tagPropsInit, treePropsInit };
65
+ export { AllowedComponentProps, ButtonProps, CardProps, CheckboxGroupProps, CheckboxProps, DEFAULT_ACCEPT, FormExposed, FormInstance, FormItem, FormItemComponentPropsUnderlyingWithMeta, FormItemProps, FormProps, FormPropsData, GetFormData, IconProps, ImageProps, ImageViewerProps, InputNumberProps, InputProps, LinkProps, PaginationProps, PopconfirmProps, PopupProps, RadioGroupProps, RangeInputProps, ResolvedFormItem, SelectProps, SetFormData, SliderProps, SlotItem, SwitchProps, _default as TButton, _default$1 as TCard, _default$2 as TCheckbox, _default$3 as TCheckboxGroup, _default$4 as TForm, _default$5 as TIcon, _default$6 as TImage, _default$7 as TImageViewer, _default$8 as TInput, _default$9 as TInputNumber, _default$10 as TLink, _default$11 as TPagination, _default$12 as TPopconfirm, _default$13 as TPopup, _default$14 as TRadioGroup, _default$15 as TRangeInput, _default$16 as TSelect, _default$17 as TSlider, _default$18 as TSwitch, _default$19 as TTabPanel, _default$20 as TTag, _default$21 as TTagInput, _default$22 as TTextarea, _default$23 as TTree, _default$24 as TTreeSelect, _default$25 as TUpload, type TabPanelProps, TagInputProps, TagProps, TextareaProps, TreeProps, TreeSelectProps, UploadFile, UploadInstanceFunctions, UploadProps, buttonPropsInit, cardPropsInit, formPropsInit, imagePropsInit, imageViewerPropsInit, inputNumberPropsInit, inputPropsInit, linkPropsInit, selectPropsInit, sliderPropsInit, switchPropsInit, tagInputPropsInit, tagPropsInit, treePropsInit };
package/index.mjs CHANGED
@@ -1,43 +1,42 @@
1
- import e from "./entry/appParams.mjs";
2
- import { buttonPropsInit as t } from "./components/button/src/button.mjs";
3
- import n from "./components/icon/src/icon2.mjs";
4
- import r from "./components/popconfirm/src/popconfirm2.mjs";
5
- import i from "./components/button/src/button2.mjs";
6
- import { cardPropsInit as a } from "./components/card/src/card.mjs";
7
- import o from "./components/card/src/card2.mjs";
8
- import s from "./components/checkbox/src/checkbox2.mjs";
9
- import c from "./components/checkbox-group/src/checkbox-group2.mjs";
10
- import { formPropsInit as l } from "./components/form/src/form.mjs";
11
- import { inputNumberPropsInit as u } from "./components/input-number/src/input-number.mjs";
12
- import d from "./components/input-number/src/input-number2.mjs";
13
- import { inputPropsInit as f } from "./components/input/src/input.mjs";
14
- import p from "./components/input/src/input2.mjs";
15
- import m from "./components/radio-group/src/radio-group2.mjs";
16
- import h from "./components/range-input/src/range-input2.mjs";
17
- import { selectPropsInit as g } from "./components/select/src/select.mjs";
18
- import _ from "./components/select/src/select2.mjs";
19
- import { sliderPropsInit as v } from "./components/slider/src/slider.mjs";
20
- import y from "./components/slider/src/slider2.mjs";
21
- import { switchPropsInit as b } from "./components/switch/src/switch.mjs";
22
- import x from "./components/switch/src/switch2.mjs";
23
- import { tagInputPropsInit as S } from "./components/tag-input/src/tag-input.mjs";
24
- import C from "./components/tag-input/src/tag-input2.mjs";
25
- import w from "./components/textarea/src/textarea2.mjs";
26
- import { treePropsInit as T } from "./components/tree/src/tree.mjs";
27
- import E from "./components/tree-select/src/tree-select2.mjs";
28
- import D from "./components/tree/src/tree2.mjs";
29
- import { DEFAULT_ACCEPT as O } from "./components/upload/src/upload.mjs";
30
- import k from "./components/upload/src/upload2.mjs";
31
- import A from "./components/form/src/form2.mjs";
32
- import { imagePropsInit as j } from "./components/image/src/image.mjs";
33
- import M from "./components/image/src/image2.mjs";
34
- import { imageViewerPropsInit as N } from "./components/image-viewer/src/image-viewer.mjs";
35
- import P from "./components/image-viewer/src/image-viewer2.mjs";
36
- import { linkPropsInit as F } from "./components/link/src/link.mjs";
37
- import I from "./components/link/src/link2.mjs";
38
- import L from "./components/pagination/src/pagination2.mjs";
39
- import R from "./components/popup/src/popup2.mjs";
40
- import z from "./components/tab-panel/src/tab-panel2.mjs";
41
- import { tagPropsInit as B } from "./components/tag/src/tag.mjs";
42
- import V from "./components/tag/src/tag2.mjs";
43
- export { O as DEFAULT_ACCEPT, i as TButton, o as TCard, s as TCheckbox, c as TCheckboxGroup, A as TForm, n as TIcon, M as TImage, P as TImageViewer, p as TInput, d as TInputNumber, I as TLink, L as TPagination, r as TPopconfirm, R as TPopup, m as TRadioGroup, h as TRangeInput, _ as TSelect, y as TSlider, x as TSwitch, z as TTabPanel, V as TTag, C as TTagInput, w as TTextarea, D as TTree, E as TTreeSelect, k as TUpload, t as buttonPropsInit, a as cardPropsInit, l as formPropsInit, j as imagePropsInit, N as imageViewerPropsInit, u as inputNumberPropsInit, f as inputPropsInit, F as linkPropsInit, g as selectPropsInit, e as setAppParams, v as sliderPropsInit, b as switchPropsInit, S as tagInputPropsInit, B as tagPropsInit, T as treePropsInit };
1
+ import { buttonPropsInit as e } from "./components/button/src/button.mjs";
2
+ import t from "./components/icon/src/icon2.mjs";
3
+ import n from "./components/popconfirm/src/popconfirm2.mjs";
4
+ import r from "./components/button/src/button2.mjs";
5
+ import { cardPropsInit as i } from "./components/card/src/card.mjs";
6
+ import a from "./components/card/src/card2.mjs";
7
+ import o from "./components/checkbox/src/checkbox2.mjs";
8
+ import s from "./components/checkbox-group/src/checkbox-group2.mjs";
9
+ import { formPropsInit as c } from "./components/form/src/form.mjs";
10
+ import { inputNumberPropsInit as l } from "./components/input-number/src/input-number.mjs";
11
+ import u from "./components/input-number/src/input-number2.mjs";
12
+ import { inputPropsInit as d } from "./components/input/src/input.mjs";
13
+ import f from "./components/input/src/input2.mjs";
14
+ import p from "./components/radio-group/src/radio-group2.mjs";
15
+ import m from "./components/range-input/src/range-input2.mjs";
16
+ import { selectPropsInit as h } from "./components/select/src/select.mjs";
17
+ import g from "./components/select/src/select2.mjs";
18
+ import { sliderPropsInit as _ } from "./components/slider/src/slider.mjs";
19
+ import v from "./components/slider/src/slider2.mjs";
20
+ import { switchPropsInit as y } from "./components/switch/src/switch.mjs";
21
+ import b from "./components/switch/src/switch2.mjs";
22
+ import { tagInputPropsInit as x } from "./components/tag-input/src/tag-input.mjs";
23
+ import S from "./components/tag-input/src/tag-input2.mjs";
24
+ import C from "./components/textarea/src/textarea2.mjs";
25
+ import { treePropsInit as w } from "./components/tree/src/tree.mjs";
26
+ import T from "./components/tree-select/src/tree-select2.mjs";
27
+ import E from "./components/tree/src/tree2.mjs";
28
+ import { DEFAULT_ACCEPT as D } from "./components/upload/src/upload.mjs";
29
+ import O from "./components/upload/src/upload2.mjs";
30
+ import k from "./components/form/src/form2.mjs";
31
+ import { imagePropsInit as A } from "./components/image/src/image.mjs";
32
+ import j from "./components/image/src/image2.mjs";
33
+ import { imageViewerPropsInit as M } from "./components/image-viewer/src/image-viewer.mjs";
34
+ import N from "./components/image-viewer/src/image-viewer2.mjs";
35
+ import { linkPropsInit as P } from "./components/link/src/link.mjs";
36
+ import F from "./components/link/src/link2.mjs";
37
+ import I from "./components/pagination/src/pagination2.mjs";
38
+ import L from "./components/popup/src/popup2.mjs";
39
+ import R from "./components/tab-panel/src/tab-panel2.mjs";
40
+ import { tagPropsInit as z } from "./components/tag/src/tag.mjs";
41
+ import B from "./components/tag/src/tag2.mjs";
42
+ export { D as DEFAULT_ACCEPT, r as TButton, a as TCard, o as TCheckbox, s as TCheckboxGroup, k as TForm, t as TIcon, j as TImage, N as TImageViewer, f as TInput, u as TInputNumber, F as TLink, I as TPagination, n as TPopconfirm, L as TPopup, p as TRadioGroup, m as TRangeInput, g as TSelect, v as TSlider, b as TSwitch, R as TTabPanel, B as TTag, S as TTagInput, C as TTextarea, E as TTree, T as TTreeSelect, O as TUpload, e as buttonPropsInit, i as cardPropsInit, c as formPropsInit, A as imagePropsInit, M as imageViewerPropsInit, l as inputNumberPropsInit, d as inputPropsInit, P as linkPropsInit, h as selectPropsInit, _ as sliderPropsInit, y as switchPropsInit, x as tagInputPropsInit, z as tagPropsInit, w as treePropsInit };
package/package.json CHANGED
@@ -66,5 +66,5 @@
66
66
  "> 1%",
67
67
  "not dead"
68
68
  ],
69
- "version": "1.67.0"
69
+ "version": "1.69.0"
70
70
  }
@@ -1,9 +1,8 @@
1
- import { LazyRouterImport } from "../../index.js";
2
1
  import { Component, Ref } from "vue";
3
2
  //#region ../../packages/dlzn-ui/store/modules/router.d.ts
4
3
  export interface RouteRecordRaw {
5
4
  children?: RouteRecordRaw[];
6
- component?: Component | LazyRouterImport;
5
+ component?: AsyncVueComponentLoaderDefault | Component;
7
6
  meta: {
8
7
  fullScreen: boolean;
9
8
  hidden: boolean;
@@ -20,7 +19,7 @@ export interface RouteRecordRaw {
20
19
  }
21
20
  interface ResRouterItem extends Omit<RouteRecordRaw, 'children' | 'component' | 'meta' | 'redirect'> {
22
21
  children?: ResRouterItem[];
23
- component?: Component | LazyRouterImport | string;
22
+ component?: AsyncVueComponentLoaderDefault | Component | string;
24
23
  hidden?: boolean;
25
24
  meta?: {
26
25
  fullScreen?: boolean;
@@ -1,14 +1,14 @@
1
- import { getAppParams as e } from "../../entry/appParams.mjs";
2
- import { getTopRoute as t } from "../../router/index.mjs";
3
- import n from "./recentRouters.mjs";
4
- import r from "../../plugins/alova/index.mjs";
5
- import i from "./user.mjs";
6
- import { markRaw as a, ref as o } from "vue";
7
- import { defineStore as s } from "pinia";
8
- import { useRouter as c } from "vue-router";
1
+ import { getTopRoute as e } from "../../router/index.mjs";
2
+ import t from "./recentRouters.mjs";
3
+ import n from "../../plugins/alova/index.mjs";
4
+ import r from "./user.mjs";
5
+ import { markRaw as i, ref as a } from "vue";
6
+ import { defineStore as o } from "pinia";
7
+ import { useRouter as s } from "vue-router";
8
+ import c from "virtual:dlzn-ui/app-params";
9
9
  //#region ../../packages/dlzn-ui/store/modules/router.ts
10
10
  function l() {
11
- return r.Get("getRouters", { meta: {
11
+ return n.Get("getRouters", { meta: {
12
12
  useFailMsg: "获取用户路由失败",
13
13
  useLoading: "正在获取用户路由..."
14
14
  } });
@@ -25,7 +25,7 @@ function d(e) {
25
25
  }) : t.push(e);
26
26
  }), t;
27
27
  }
28
- function f(e) {
28
+ function f(t) {
29
29
  let n = (e, t) => {
30
30
  let r = [];
31
31
  return e.forEach((e) => {
@@ -51,8 +51,8 @@ function f(e) {
51
51
  }
52
52
  e.component !== void 0 && !["Layout", "ParentView"].includes(e.component) && (i.component = _(e)), u(i) && r.push(i);
53
53
  }), r;
54
- }, r = t();
55
- return r.children.push(...e), n([r], null);
54
+ }, r = e();
55
+ return r.children.push(...t), n([r], null);
56
56
  }
57
57
  function p(e) {
58
58
  let t = (e) => {
@@ -67,7 +67,7 @@ function p(e) {
67
67
  };
68
68
  return t(e);
69
69
  }
70
- var m = e().viewsEntryLazyImport, h = [];
70
+ var m = c.viewsEntryLazyImport, h = [];
71
71
  function g(e) {
72
72
  return `/src/views/${e.split("___")[0]}.vue`;
73
73
  }
@@ -86,27 +86,27 @@ function _(e) {
86
86
  }
87
87
  return e.component;
88
88
  }
89
- var v = s("router", () => {
90
- let e = o([]), t = c(), r = i();
91
- async function s() {
92
- let i = await l();
93
- h.length = 0, e.value = a(p(f(d(i)))), r.isAdmin && Object.keys(m).forEach((e) => {
89
+ var v = o("router", () => {
90
+ let e = a([]), n = s(), o = r();
91
+ async function c() {
92
+ let r = await l();
93
+ h.length = 0, e.value = i(p(f(d(r)))), o.isAdmin && Object.keys(m).forEach((e) => {
94
94
  if (!h.includes(e)) {
95
95
  let t = `${e} 页面对应的路由不存在`;
96
96
  console.error(t);
97
97
  }
98
- }), t.hasRoute("Index") && t.removeRoute("Index"), e.value.forEach((e) => {
99
- t.addRoute(e);
100
- }), n().init();
98
+ }), n.hasRoute("Index") && n.removeRoute("Index"), e.value.forEach((e) => {
99
+ n.addRoute(e);
100
+ }), t().init();
101
101
  }
102
102
  function u() {
103
103
  e.value.forEach((e) => {
104
- t.removeRoute(e.name);
104
+ n.removeRoute(e.name);
105
105
  }), e.value = [];
106
106
  }
107
107
  return {
108
108
  clear: u,
109
- getRouters: s,
109
+ getRouters: c,
110
110
  routersRaw: e
111
111
  };
112
112
  });
package/types/globle.d.ts CHANGED
@@ -1,6 +1,12 @@
1
+ import type { Component } from 'vue'
2
+
1
3
  export {} // 为了让这个声明文件变成模块声明文件,而不是一个全局声明文件
2
4
 
3
5
  declare global {
6
+ export type AsyncVueComponentLoaderDefault = () => Promise<{
7
+ default: Component
8
+ }>
9
+
4
10
  type PettyPrimitive = null | number | string | undefined
5
11
  interface Window {
6
12
  pluginWebUpdateNotice_?: {
File without changes
@@ -0,0 +1,6 @@
1
+ //#region ../../packages/dlzn-ui/virtual-app-params.d.ts
2
+ declare module 'virtual:dlzn-ui/app-params' {
3
+ import type { AppParams } from '@/index';
4
+ const params: AppParams;
5
+ export default params;
6
+ }
@@ -1,2 +0,0 @@
1
- /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
- [data-v-4f6efe42] .t-form__label{padding-right:var(--td-size-1)}[data-v-4f6efe42] .t-form__label--top{min-height:auto;line-height:inherit}[data-v-4f6efe42] .t-form__item{margin-bottom:var(--td-comp-margin-xxl)!important}[data-v-4f6efe42] .t-form__item.no_label_item .t-form__label{display:none}[data-v-4f6efe42] .t-form__item .t-input-adornment{flex:auto}.t-form[data-v-4f6efe42]{--td-comp-margin-xxl:var(--td-comp-margin-xl)}.t-form[data-v-4f6efe42]:has(.t-form__item:not(.no_label_item)) .no_label_item .t-form__label{opacity:0;height:1px;padding-right:0;display:block}.t-form.no_item_mb .t-form__item[data-v-4f6efe42]{margin-bottom:0!important}.t-form-inline[data-v-4f6efe42]{--repeat-min-width:220px;--repeat-gap:24px;grid-template-columns:repeat(auto-fill, minmax(var(--repeat-min-width), 1fr));gap:0 var(--repeat-gap);display:grid}.t-form-inline[data-v-4f6efe42] .no_label_item{align-self:flex-end}.t-form-inline[data-v-4f6efe42] .t-form__item{min-width:auto;margin-right:0;display:block}.t-form-inline[data-v-4f6efe42] .t-form__item.grid_item .t-form__controls-content{grid-template-columns:repeat(auto-fill, minmax(var(--repeat-min-width), 1fr));gap:0 var(--repeat-gap);display:grid}
@@ -1,11 +0,0 @@
1
- import { BusComponentInitialValueMap, BusFormItems, LazyRouterImport, UseListPromiseMap } from "../index.js";
2
- //#region ../../packages/dlzn-ui/entry/appParams.d.ts
3
- interface AppParams {
4
- busComponentInitialValueMap: BusComponentInitialValueMap;
5
- busFormItems: BusFormItems;
6
- useListPromiseMap: UseListPromiseMap;
7
- viewsEntryLazyImport: Record<string, LazyRouterImport>;
8
- }
9
- export declare function getAppParams(): AppParams;
10
- export default function setAppParams(params: AppParams): void;
11
- //#endregion
@@ -1,11 +0,0 @@
1
- //#region ../../packages/dlzn-ui/entry/appParams.ts
2
- var e = null;
3
- function t() {
4
- if (e === null) throw Error("App params not initialized");
5
- return e;
6
- }
7
- function n(t) {
8
- e = t;
9
- }
10
- //#endregion
11
- export { n as default, t as getAppParams };