zhihao-ui 1.3.56 → 1.3.58-alpha.1

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.
Files changed (42) hide show
  1. package/dist/es/{BaseInfo-ehtLJvVF.js → BaseInfo-C2j6mJJE.js} +1 -1
  2. package/dist/es/{BaseItem-0fbDCeuh.js → BaseItem-zscYu8eV.js} +3 -3
  3. package/dist/es/{Button-DlEYWX3X.js → Button-B2Z_WKdq.js} +2 -2
  4. package/dist/es/CascaderLoadMore-Bt031LmH.js +277 -0
  5. package/dist/es/{DatePicker-BH5X28Bl.js → DatePicker-C1DDRvC8.js} +3 -3
  6. package/dist/es/{DetailHeader-kFn2FtqV.js → DetailHeader-vuClNac7.js} +3 -3
  7. package/dist/es/{DetailSubTitle-DjHsWNVa.js → DetailSubTitle-Cu4OuVMN.js} +2 -2
  8. package/dist/es/{Dialog-B_Psb_wh.js → Dialog-BynyEy56.js} +3 -3
  9. package/dist/es/{DiyDataTable-a-pFltM6.js → DiyDataTable-Dxj2T0df.js} +37 -35
  10. package/dist/es/{EditInfoPair-ZvaiiVmj.js → EditInfoPair-m7xcpK-8.js} +3 -3
  11. package/dist/es/{FileWrapper-mQ4rJXJr.js → FileWrapper-C7ZFwtsF.js} +4 -4
  12. package/dist/es/{Grid-CCkuxPw9.js → Grid-CK82axOD.js} +2 -2
  13. package/dist/es/{InfoPair-R1-mr8Vf.js → InfoPair-CdkSVoN0.js} +3 -3
  14. package/dist/es/{Input-DjQtffZg.js → Input-EcnKRK5Q.js} +3 -3
  15. package/dist/es/{Loading-CDxuHkdt.js → Loading-Mq3IiaFA.js} +2 -2
  16. package/dist/es/Map-cM2ZsC86.js +2466 -0
  17. package/dist/es/{MessageBox-kkpNeAii.js → MessageBox-wQY1ft63.js} +2 -2
  18. package/dist/es/{MoneyInput-BlilgYic.js → MoneyInput-Cn4BH3R9.js} +5 -5
  19. package/dist/es/{PageHeadPanel-DsEeXTgj.js → PageHeadPanel-B2Uqf3zz.js} +2 -2
  20. package/dist/es/{Table-DNrZVI3t.js → Table-BcofWMU9.js} +7 -7
  21. package/dist/es/{ToolTips-BRjrysPf.js → ToolTips-CVkx0nFU.js} +3 -3
  22. package/dist/es/index.js +60 -60
  23. package/dist/es/{utils-B-n1yx0L.js → utils-vqG84sMo.js} +1 -1
  24. package/dist/es/{vendor-DkGhDRdQ.js → vendor-MMWA2y7U.js} +29 -28
  25. package/dist/index.css +1 -1
  26. package/dist/types/components/CascaderLoadMore/CascaderLoadMore.vue.d.ts +0 -3
  27. package/dist/types/components/CascaderLoadMore/index.d.ts +0 -6
  28. package/dist/types/components/DetailSubTitle/index.d.ts +1 -0
  29. package/dist/types/components/DiyDataTable/DiyDataTable.vue.d.ts +27 -0
  30. package/dist/types/components/DiyDataTable/index.d.ts +81 -0
  31. package/dist/types/components/DiyDataTable/type.d.ts +3 -1
  32. package/dist/types/components/Map/Map.vue.d.ts +4 -1
  33. package/dist/types/components/Map/function/drawPolygon.d.ts +1 -1
  34. package/dist/types/components/Map/function/renderPolygon.d.ts +20 -0
  35. package/dist/types/components/Map/function/ship/index.d.ts +1 -1
  36. package/dist/types/components/Map/function/ship/style.d.ts +5 -3
  37. package/dist/types/components/Map/index.d.ts +12 -3
  38. package/dist/umd/index.css +1 -1
  39. package/dist/umd/index.umd.cjs +64 -65
  40. package/package.json +2 -2
  41. package/dist/es/CascaderLoadMore-DFdDRygU.js +0 -283
  42. package/dist/es/Map-CmcmvvxF.js +0 -2363
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as h, ref as o, provide as n, watch as i, resolveComponent as p, openBlock as m, createBlock as W, withCtx as v, renderSlot as b } from "vue";
2
- import { w as g } from "./utils-B-n1yx0L.js";
2
+ import { w as g } from "./utils-vqG84sMo.js";
3
3
  const C = /* @__PURE__ */ h({
4
4
  name: "ZhBaseInfo",
5
5
  __name: "BaseInfo",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as z, useSlots as R, inject as T, computed as n, ref as M, watchEffect as A, openBlock as t, createBlock as u, unref as s, withCtx as d, createElementVNode as h, normalizeClass as m, normalizeStyle as W, resolveDynamicComponent as k, createElementBlock as i, toDisplayString as o, renderSlot as S, Fragment as v, withModifiers as V, createTextVNode as f, createVNode as p, createCommentVNode as O } from "vue";
2
- import { E as D, a as Z, d as g } from "./vendor-DkGhDRdQ.js";
3
- import { Z as G } from "./Grid-CCkuxPw9.js";
4
- import { w as U } from "./utils-B-n1yx0L.js";
2
+ import { E as D, a as Z, d as g } from "./vendor-MMWA2y7U.js";
3
+ import { Z as G } from "./Grid-CK82axOD.js";
4
+ import { w as U } from "./utils-vqG84sMo.js";
5
5
  const b = "--", X = "YYYY-MM-DDTHH:mm:ss", x = "YYYY-MM-DDT23:59:59", ee = "YYYY-MM-DD", le = "https://static.zhihaoscm.cn/", _ = { key: 1 }, H = {
6
6
  key: 1,
7
7
  class: "zh-base-item--value--file"
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as r, openBlock as a, createBlock as p, unref as u, mergeProps as c, withCtx as l, renderSlot as i } from "vue";
2
- import { b as m, c as d } from "./vendor-DkGhDRdQ.js";
3
- import { w as _ } from "./utils-B-n1yx0L.js";
2
+ import { b as m, c as d } from "./vendor-MMWA2y7U.js";
3
+ import { w as _ } from "./utils-vqG84sMo.js";
4
4
  const h = /* @__PURE__ */ r({
5
5
  name: "ZhButton",
6
6
  inheritAttrs: !1,
@@ -0,0 +1,277 @@
1
+ import { defineComponent as le, useModel as ae, ref as s, watch as L, nextTick as y, withDirectives as te, openBlock as f, createElementBlock as P, createVNode as z, unref as C, withCtx as R, createBlock as $, toDisplayString as oe, createCommentVNode as se, mergeProps as ne, Fragment as re, renderList as ce, mergeModels as A } from "vue";
2
+ import { e as I, f as ie, g as ue, h as pe, i as de, C as ve } from "./vendor-MMWA2y7U.js";
3
+ import { w as fe } from "./utils-vqG84sMo.js";
4
+ const ge = { class: "w-100" }, me = {
5
+ key: 1,
6
+ class: "cascader-select-empty"
7
+ }, he = {
8
+ key: 2,
9
+ class: "loading"
10
+ }, ye = /* @__PURE__ */ le({
11
+ name: "CascaderLoadMore",
12
+ __name: "CascaderLoadMore",
13
+ props: /* @__PURE__ */ A({
14
+ onChange: {
15
+ type: Function,
16
+ required: !1
17
+ },
18
+ // 默认选中项
19
+ initialValue: {
20
+ type: [String, Number, Array],
21
+ required: !1
22
+ },
23
+ pageSize: {
24
+ type: Number,
25
+ default: 10
26
+ },
27
+ // 数据请求函数
28
+ requestFunction: {
29
+ type: Function,
30
+ required: !0
31
+ },
32
+ // 选项处理函数
33
+ handleOptionsFunction: {
34
+ type: Function,
35
+ required: !0
36
+ },
37
+ placeholder: {
38
+ type: String,
39
+ default: "输入关键字搜索名称"
40
+ },
41
+ // 强制搜索:不输入内容也进行搜索,即点击下拉默认展示数据
42
+ forceSearch: {
43
+ type: Boolean,
44
+ default: !0
45
+ },
46
+ // 初始下拉项用于回显数据
47
+ initialOptions: {
48
+ type: Array,
49
+ required: !1,
50
+ default: () => []
51
+ },
52
+ // 多选,默认false
53
+ multiple: {
54
+ type: Boolean,
55
+ default: !1
56
+ },
57
+ collapseTags: {
58
+ type: Boolean,
59
+ default: !1
60
+ },
61
+ collapseTagsTooltip: {
62
+ type: Boolean,
63
+ default: !1
64
+ },
65
+ clearable: {
66
+ type: Boolean,
67
+ default: !0
68
+ },
69
+ cascaderProps: {
70
+ type: Object,
71
+ default: () => ({})
72
+ },
73
+ placement: {
74
+ type: String,
75
+ default: "bottom-start"
76
+ },
77
+ trigger: {
78
+ type: String,
79
+ default: "click"
80
+ },
81
+ popperClass: {
82
+ type: String
83
+ },
84
+ teleported: {
85
+ type: Boolean,
86
+ default: !1
87
+ },
88
+ noDataText: {
89
+ type: String,
90
+ default: "暂无数据"
91
+ }
92
+ }, {
93
+ modelValue: {},
94
+ modelModifiers: {}
95
+ }),
96
+ emits: /* @__PURE__ */ A(["change", "removeTag"], ["update:modelValue"]),
97
+ setup(c, { expose: N, emit: W }) {
98
+ const o = c, r = ae(c, "modelValue"), d = s(r.value || []), v = s(!1), i = s({
99
+ page: 1,
100
+ size: o.pageSize
101
+ }), S = s(void 0), k = s(!1), O = s(!0), p = s(o.initialOptions || []), n = s(o.initialOptions || []), g = s(void 0), T = s(!1), H = {
102
+ expandTrigger: "hover",
103
+ checkStrictly: !1,
104
+ multiple: o.multiple,
105
+ emitPath: !0,
106
+ ...o.cascaderProps
107
+ }, B = s(), q = s(), U = () => {
108
+ v.value = !0;
109
+ }, j = () => {
110
+ v.value = !1;
111
+ }, w = (e) => {
112
+ const l = /* @__PURE__ */ new Map();
113
+ return (e || []).forEach((a) => {
114
+ const t = `${a.value}`;
115
+ l.has(t) || l.set(t, a);
116
+ }), Array.from(l.values());
117
+ };
118
+ function D(e) {
119
+ const l = [];
120
+ function a(t, u = "") {
121
+ const h = u && (o.cascaderProps.emitPath ?? !0) ? `${u}/${t.label}` : t.label;
122
+ l.push({
123
+ ...t,
124
+ value: t.value,
125
+ label: h
126
+ // 如果需要保留原始路径结构,可加上 fullPath 字段
127
+ // fullPath: currentPath
128
+ }), t.children && t.children.length > 0 && t.children.forEach((ee) => a(ee, h));
129
+ }
130
+ return e.forEach((t) => a(t)), l;
131
+ }
132
+ const E = async (e) => {
133
+ var u;
134
+ if (!o.forceSearch && !e) return;
135
+ const l = g.value === e || !g.value && !e;
136
+ if (l || (i.value.page = 1), l && S.value !== void 0 && i.value.page > S.value && !T.value) return;
137
+ T.value = !1, k.value = !0, n.value.length === 0 && (O.value = !0);
138
+ const t = await o.requestFunction(i.value.page, i.value.size, e);
139
+ if (t && Object.keys(t).length) {
140
+ S.value = t.totalPage;
141
+ const h = (u = t == null ? void 0 : t.list) == null ? void 0 : u.map(o.handleOptionsFunction);
142
+ l && i.value.page !== 1 ? n.value = w([...n.value, ...h]) : n.value = h || [], d.value = I(r.value), p.value = D(n.value);
143
+ }
144
+ y(() => {
145
+ _();
146
+ }), g.value = e, k.value = !1, n.value.length !== 0 && (O.value = !1);
147
+ }, Z = () => {
148
+ i.value.page = i.value.page + 1, E(g.value);
149
+ }, Q = (e) => {
150
+ r.value = e, d.value = e;
151
+ const l = M(e), a = o.onChange;
152
+ a && a(e, l);
153
+ }, M = (e) => {
154
+ const l = e || r.value;
155
+ return o.multiple ? p.value.filter(
156
+ (a) => (l || []).includes(a.value)
157
+ ) : p.value.find((a) => a.value === l);
158
+ }, G = () => {
159
+ r.value = o.initialValue, d.value = o.initialValue, i.value.page = 1, i.value.size = o.pageSize, p.value = o.initialOptions || [], n.value = o.initialOptions || [], S.value = void 0, g.value = void 0;
160
+ }, V = W;
161
+ L(
162
+ () => o.initialOptions,
163
+ () => {
164
+ p.value = D(o.initialOptions), console.log("options.value", p.value), n.value = o.initialOptions;
165
+ },
166
+ { immediate: !0 }
167
+ );
168
+ const J = (e) => {
169
+ V("removeTag", e);
170
+ }, K = (e) => {
171
+ T.value = e;
172
+ }, b = s(null), m = s(null), x = () => {
173
+ if (!v.value) return;
174
+ const e = q.value.popperRef.contentRef, l = e == null ? void 0 : e.querySelector(".el-cascader-panel .el-scrollbar__wrap");
175
+ l && (b.value = l, m.value = () => X(l), l.addEventListener("scroll", m.value));
176
+ }, F = () => {
177
+ b.value && m.value && (b.value.removeEventListener("scroll", m.value), b.value = null, m.value = null);
178
+ }, X = (e) => {
179
+ const { scrollTop: l, scrollHeight: a, clientHeight: t } = e;
180
+ let u = a - l;
181
+ t + 10 > u && Z();
182
+ };
183
+ y(() => x()), L(v, (e) => {
184
+ e ? (console.log("visible", e), y(() => x())) : F();
185
+ }), L(n, (e) => {
186
+ e != null && e.length && v.value ? y(() => x()) : F();
187
+ });
188
+ const Y = async (e) => {
189
+ (o.cascaderProps.emitPath ?? !0) && Array.isArray(e) ? o.multiple ? r.value = e.map((t) => t.at(-1)) : r.value = e.at(-1) : r.value = I(d.value), await y();
190
+ const l = M(r.value);
191
+ V("change", e, l);
192
+ const a = o.onChange;
193
+ a && a(e, l);
194
+ }, _ = () => {
195
+ var t;
196
+ const e = q.value.popperRef.contentRef, l = (t = B.value) == null ? void 0 : t.$el, a = e == null ? void 0 : e.querySelector(".cascader-select-empty");
197
+ if (l && a) {
198
+ const u = l.offsetWidth;
199
+ a.style.width = `${u}px`;
200
+ }
201
+ };
202
+ return N({
203
+ reset: G,
204
+ getSelectedOption: M,
205
+ remoteMethod: E,
206
+ handleRequestParamsChanged: K,
207
+ options: p,
208
+ cascderOptions: n
209
+ }), (e, l) => te((f(), P("div", ge, [
210
+ z(C(ie), {
211
+ ref_key: "popoverRef",
212
+ ref: q,
213
+ teleported: c.teleported,
214
+ placement: o.placement,
215
+ trigger: o.trigger,
216
+ "popper-class": "warp-cascade-panel " + o.popperClass,
217
+ visible: v.value
218
+ }, {
219
+ reference: R(() => [
220
+ z(C(pe), ne({
221
+ ref_key: "remoteSelectRef",
222
+ ref: B,
223
+ modelValue: r.value,
224
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => r.value = a),
225
+ multiple: c.multiple,
226
+ placeholder: c.placeholder,
227
+ "remote-method": E,
228
+ teleported: !0,
229
+ clearable: c.clearable,
230
+ "collapse-tags": c.collapseTags,
231
+ "collapse-tags-tooltip": c.collapseTagsTooltip,
232
+ filterable: "",
233
+ height: "300",
234
+ remote: "",
235
+ "remote-show-suffix": "",
236
+ "reserve-keyword": "",
237
+ "popper-class": "hidden-dropdown",
238
+ class: "cascader-select"
239
+ }, e.$attrs, {
240
+ onClick: U,
241
+ onChange: Q,
242
+ onRemoveTag: J
243
+ }), {
244
+ default: R(() => [
245
+ (f(!0), P(re, null, ce(p.value, (a) => (f(), $(C(de), {
246
+ key: a.value,
247
+ label: a.label,
248
+ value: a.value
249
+ }, null, 8, ["label", "value"]))), 128))
250
+ ]),
251
+ _: 1
252
+ }, 16, ["modelValue", "multiple", "placeholder", "clearable", "collapse-tags", "collapse-tags-tooltip"])
253
+ ]),
254
+ default: R(() => [
255
+ !O.value && n.value.length > 0 ? (f(), $(C(ue), {
256
+ key: 0,
257
+ modelValue: d.value,
258
+ "onUpdate:modelValue": l[1] || (l[1] = (a) => d.value = a),
259
+ border: !1,
260
+ props: H,
261
+ options: n.value,
262
+ class: "select-cascader-panel",
263
+ onChange: Y,
264
+ onExpandChange: e.expandHandle
265
+ }, null, 8, ["modelValue", "options", "onExpandChange"])) : (f(), P("div", me, oe(c.noDataText), 1)),
266
+ k.value ? (f(), P("div", he, "加载中...")) : se("", !0)
267
+ ]),
268
+ _: 1
269
+ }, 8, ["teleported", "placement", "trigger", "popper-class", "visible"])
270
+ ])), [
271
+ [C(ve), j]
272
+ ]);
273
+ }
274
+ }), Pe = fe(ye);
275
+ export {
276
+ Pe as Z
277
+ };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as u, openBlock as f, createElementBlock as h, normalizeClass as D, createVNode as g, unref as _, mergeProps as A } from "vue";
2
- import { j as T, k as y } from "./vendor-DkGhDRdQ.js";
3
- import { D as m, a as b, L as p, b as k } from "./BaseItem-0fbDCeuh.js";
4
- import { w as E } from "./utils-B-n1yx0L.js";
2
+ import { j as T, k as y } from "./vendor-MMWA2y7U.js";
3
+ import { D as m, a as b, L as p, b as k } from "./BaseItem-zscYu8eV.js";
4
+ import { w as E } from "./utils-vqG84sMo.js";
5
5
  const d = (e, l = b) => e ? T(e).format(l).replace("Invalid date", m) : m, P = (e) => typeof e == "number" ? !0 : typeof e == "string" ? !isNaN(parseFloat(e)) : !1;
6
6
  function U(e) {
7
7
  const l = ["角", "分"], r = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], s = [
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as p, useSlots as _, openBlock as a, createElementBlock as o, createElementVNode as t, renderSlot as l, toDisplayString as i, Fragment as m, renderList as u, unref as n, normalizeClass as D, createCommentVNode as g } from "vue";
2
- import { D as v } from "./BaseItem-0fbDCeuh.js";
3
- import { _ as k } from "./Button-DlEYWX3X.js";
4
- import { w as y } from "./utils-B-n1yx0L.js";
2
+ import { D as v } from "./BaseItem-zscYu8eV.js";
3
+ import { _ as k } from "./Button-B2Z_WKdq.js";
4
+ import { w as y } from "./utils-vqG84sMo.js";
5
5
  const I = { class: "common-card" }, b = { class: "detail-header" }, E = { class: "detail-header--left" }, H = { class: "title common-title" }, M = { class: "info-pair--label" }, $ = { class: "info-pair--value" }, C = {
6
6
  key: 1,
7
7
  class: "detail-header--right"
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as r, openBlock as o, createElementBlock as s, createElementVNode as l, createTextVNode as a, toDisplayString as t, createCommentVNode as p, normalizeClass as c, renderSlot as m, unref as d } from "vue";
2
- import { D as u } from "./BaseItem-0fbDCeuh.js";
3
- import { w as f } from "./utils-B-n1yx0L.js";
2
+ import { D as u } from "./BaseItem-zscYu8eV.js";
3
+ import { w as f } from "./utils-vqG84sMo.js";
4
4
  const _ = { class: "info-pair" }, v = { class: "info-pair--title" }, h = {
5
5
  key: 0,
6
6
  class: "info-pair--title--tip"
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as k, useModel as w, computed as T, openBlock as r, createBlock as v, unref as D, mergeProps as M, withCtx as o, renderSlot as s, createElementVNode as c, createVNode as u, createTextVNode as m, toDisplayString as l, createElementBlock as Z, createCommentVNode as z, mergeModels as p } from "vue";
2
- import { Z as f } from "./Button-DlEYWX3X.js";
3
- import { l as E } from "./vendor-DkGhDRdQ.js";
4
- import { w as I } from "./utils-B-n1yx0L.js";
2
+ import { Z as f } from "./Button-B2Z_WKdq.js";
3
+ import { l as E } from "./vendor-MMWA2y7U.js";
4
+ import { w as I } from "./utils-vqG84sMo.js";
5
5
  const N = { class: "title" }, O = {
6
6
  key: 0,
7
7
  class: "sub-title"
@@ -1,8 +1,8 @@
1
- import { defineComponent as K, useModel as j, ref as E, computed as G, openBlock as s, createBlock as m, unref as u, withCtx as f, createVNode as R, mergeProps as J, createCommentVNode as x, createElementBlock as v, Fragment as A, renderList as Q, normalizeClass as F, toDisplayString as C, renderSlot as T, createTextVNode as D, createElementVNode as k, mergeModels as Y } from "vue";
2
- import { D as M } from "./BaseItem-0fbDCeuh.js";
3
- import { m as V, e as N, n as ee, o as te, p as _, q as L, r as ae, s as I, b as U } from "./vendor-DkGhDRdQ.js";
4
- import { _ as oe } from "./Button-DlEYWX3X.js";
5
- import { w as le } from "./utils-B-n1yx0L.js";
1
+ import { defineComponent as K, useModel as j, ref as E, computed as G, openBlock as s, createBlock as m, unref as u, withCtx as f, createVNode as R, mergeProps as J, createCommentVNode as x, createElementBlock as v, Fragment as A, renderList as Q, normalizeClass as S, toDisplayString as C, renderSlot as T, createTextVNode as D, createElementVNode as k, mergeModels as Y } from "vue";
2
+ import { D as F } from "./BaseItem-zscYu8eV.js";
3
+ import { m as V, e as N, n as ee, o as te, p as _, q as L, r as ae, s as I, b as U } from "./vendor-MMWA2y7U.js";
4
+ import { _ as oe } from "./Button-B2Z_WKdq.js";
5
+ import { w as le } from "./utils-vqG84sMo.js";
6
6
  var w = /* @__PURE__ */ ((h) => (h.AUTOCOMPLETE = "autocomplete", h.FORMAT = "format", h.TEXT = "text", h.INDEX = "index", h))(w || {});
7
7
  const re = { key: 0 }, de = {
8
8
  key: 1,
@@ -27,24 +27,24 @@ const re = { key: 0 }, de = {
27
27
  rawDataModifiers: {}
28
28
  }),
29
29
  emits: ["update:rawData"],
30
- setup(h, { expose: B }) {
31
- const r = h, n = j(h, "rawData"), d = E([]), c = E({
30
+ setup(h, { expose: q }) {
31
+ const r = h, n = j(h, "rawData"), d = E([]), g = E({
32
32
  isShow: !0,
33
33
  width: 150,
34
34
  customAddRow: !0,
35
35
  addRowText: "增行",
36
36
  customAddColumn: !0,
37
37
  addColumnText: "增列"
38
- }), g = G(() => r.operationOption ? {
39
- ...c.value,
38
+ }), c = G(() => r.operationOption ? {
39
+ ...g.value,
40
40
  ...r.operationOption || {}
41
41
  } : {
42
- ...c.value,
42
+ ...g.value,
43
43
  // 兼容之前单个配置项
44
- customAddRow: r.customAddRow !== void 0 ? r.customAddRow : c.value.customAddRow,
45
- addRowText: r.addRowText !== void 0 ? r.addRowText : c.value.addRowText,
46
- customAddColumn: r.customAddColumn !== void 0 ? r.customAddColumn : c.value.customAddColumn,
47
- addColumnText: r.addColumnText !== void 0 ? r.addColumnText : c.value.addColumnText
44
+ customAddRow: r.customAddRow !== void 0 ? r.customAddRow : g.value.customAddRow,
45
+ addRowText: r.addRowText !== void 0 ? r.addRowText : g.value.addRowText,
46
+ customAddColumn: r.customAddColumn !== void 0 ? r.customAddColumn : g.value.customAddColumn,
47
+ addColumnText: r.addColumnText !== void 0 ? r.addColumnText : g.value.addColumnText
48
48
  }), $ = () => {
49
49
  if (n.value.length === r.maxRowLength) {
50
50
  V({
@@ -74,11 +74,11 @@ const re = { key: 0 }, de = {
74
74
  headerMaxlength: 15,
75
75
  isNewlyColumn: !0
76
76
  });
77
- }, W = (t, o) => {
77
+ }, B = (t, o) => {
78
78
  d.value.splice(t, 1), n.value.forEach((e) => {
79
79
  delete e[o.prop];
80
80
  });
81
- }, q = (t) => {
81
+ }, W = (t) => {
82
82
  t === 0 && d.value.forEach((o) => {
83
83
  o.isSameData && (n.value[1][o.prop] = n.value[0][o.prop]);
84
84
  }), n.value.splice(t, 1);
@@ -102,18 +102,18 @@ const re = { key: 0 }, de = {
102
102
  const l = [];
103
103
  return t.required && l.push({
104
104
  required: !0,
105
- message: t.label + "不能为空",
105
+ message: t.requiredMessage || t.label + "不能为空",
106
106
  trigger: t.slot ? void 0 : "blur"
107
107
  }), t.varidate && l.push({
108
108
  validator: (a, i, p) => {
109
- const S = t.varidate(i, o, e);
110
- S !== !0 ? p(new Error(S)) : p();
109
+ const M = t.varidate(i, o, e);
110
+ M !== !0 ? p(new Error(M)) : p();
111
111
  }
112
112
  // trigger: column.slot ? undefined : "blur",
113
113
  }), l;
114
114
  }, P = (t, o) => {
115
115
  let e = t;
116
- return o.isSameData && (e = n.value[0] || M), o.formatter ? o.showFormatter ? o.type === w.FORMAT ? o.showFormatter(o.formatter(e)) : o.showFormatter(e[o.prop]) : o.formatter(e[o.prop]) : e[o.prop] || M;
116
+ return o.isSameData && (e = n.value[0] || F), o.formatter ? o.showFormatter ? o.type === w.FORMAT ? o.showFormatter(o.formatter(e)) : o.showFormatter(e[o.prop]) : o.formatter(e[o.prop]) : e[o.prop] || F;
117
117
  }, b = E(), y = E({
118
118
  width: 132,
119
119
  type: w.INDEX,
@@ -123,7 +123,7 @@ const re = { key: 0 }, de = {
123
123
  isShow: !0
124
124
  // 默认显示序号列
125
125
  });
126
- return B({
126
+ return q({
127
127
  /** 初始化数据 */
128
128
  initData: (t, o) => {
129
129
  const e = (o || []).find((l) => l.type === w.INDEX) || null;
@@ -182,7 +182,7 @@ const re = { key: 0 }, de = {
182
182
  a.formatter && a.type === w.FORMAT && (e[a.prop] = a.formatter(e));
183
183
  }
184
184
  }
185
- return console.log("DiyDataTable 获取数据", t, d.value), {
185
+ return {
186
186
  data: t,
187
187
  columns: d.value
188
188
  };
@@ -208,7 +208,9 @@ const re = { key: 0 }, de = {
208
208
  onAddRow: $,
209
209
  onAddColumn: O,
210
210
  // 导出formRef
211
- formRef: b
211
+ formRef: b,
212
+ // 导出columns
213
+ getColumns: () => d.value
212
214
  }), (t, o) => (s(), m(u(ee), {
213
215
  class: "diy-data-table",
214
216
  model: h.rawData,
@@ -253,11 +255,11 @@ const re = { key: 0 }, de = {
253
255
  e.isAdd ? (s(), v("i", {
254
256
  key: 0,
255
257
  class: "iconfont icon-close",
256
- onClick: (a) => W(l, e)
258
+ onClick: (a) => B(l, e)
257
259
  }, null, 8, ie)) : x("", !0)
258
260
  ])) : (s(), v("div", {
259
261
  key: 2,
260
- class: F({ "is-required-label": e.required })
262
+ class: S({ "is-required-label": e.required })
261
263
  }, C(e.label), 3)) : (s(), v("div", re, C(e.label), 1))
262
264
  ]),
263
265
  default: f((a) => [
@@ -265,7 +267,7 @@ const re = { key: 0 }, de = {
265
267
  key: 0,
266
268
  prop: `${a.$index}.${e.prop}`,
267
269
  rules: z(e, a.row, a.$index),
268
- class: F(["col-edit-container", { "close-padding": e.isAdd }])
270
+ class: S(["col-edit-container", { "close-padding": e.isAdd }])
269
271
  }, {
270
272
  default: f(() => [
271
273
  e.type === u(w).FORMAT && e.formatter ? (s(), v("div", se, C(e.showFormatter ? e.showFormatter(
@@ -303,14 +305,14 @@ const re = { key: 0 }, de = {
303
305
  ]),
304
306
  _: 2
305
307
  }, 1032, ["prop", "label", "width", "min-width", "fixed"]))), 128)),
306
- r.isEdit && g.value.isShow ? (s(), m(u(_), {
308
+ r.isEdit && c.value.isShow ? (s(), m(u(_), {
307
309
  key: 1,
308
- width: g.value.width,
310
+ width: c.value.width,
309
311
  fixed: "right"
310
312
  }, {
311
313
  header: f(() => [
312
314
  k("div", ne, [
313
- g.value.customAddRow ? (s(), m(u(U), {
315
+ c.value.customAddRow ? (s(), m(u(U), {
314
316
  key: 0,
315
317
  type: "primary",
316
318
  link: "",
@@ -318,11 +320,11 @@ const re = { key: 0 }, de = {
318
320
  }, {
319
321
  default: f(() => [
320
322
  o[0] || (o[0] = k("i", { class: "iconfont icon-Frame1" }, null, -1)),
321
- D(C(g.value.addRowText), 1)
323
+ D(C(c.value.addRowText), 1)
322
324
  ]),
323
325
  _: 1
324
326
  })) : x("", !0),
325
- g.value.customAddColumn ? (s(), m(u(U), {
327
+ c.value.customAddColumn ? (s(), m(u(U), {
326
328
  key: 1,
327
329
  type: "primary",
328
330
  link: "",
@@ -330,7 +332,7 @@ const re = { key: 0 }, de = {
330
332
  }, {
331
333
  default: f(() => [
332
334
  o[1] || (o[1] = k("i", { class: "iconfont icon-Frame-11" }, null, -1)),
333
- D(C(g.value.addColumnText), 1)
335
+ D(C(c.value.addColumnText), 1)
334
336
  ]),
335
337
  _: 1
336
338
  })) : x("", !0)
@@ -346,7 +348,7 @@ const re = { key: 0 }, de = {
346
348
  n.value.length > 1 && !l.disabled ? (s(), v("i", {
347
349
  key: 0,
348
350
  class: "iconfont icon-close",
349
- onClick: (a) => q(e)
351
+ onClick: (a) => W(e)
350
352
  }, null, 8, pe)) : x("", !0)
351
353
  ], 64))
352
354
  ])
@@ -360,8 +362,8 @@ const re = { key: 0 }, de = {
360
362
  _: 3
361
363
  }, 8, ["model"]));
362
364
  }
363
- }), he = /* @__PURE__ */ oe(fe, [["__scopeId", "data-v-71cc1e5a"]]), ge = le(he);
365
+ }), he = /* @__PURE__ */ oe(fe, [["__scopeId", "data-v-de69ead8"]]), ce = le(he);
364
366
  export {
365
367
  w as D,
366
- ge as Z
368
+ ce as Z
367
369
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as l, openBlock as o, createElementBlock as s, createElementVNode as a, createTextVNode as r, toDisplayString as t, createCommentVNode as p, normalizeClass as c, renderSlot as d, unref as m } from "vue";
2
- import { D as f } from "./BaseItem-0fbDCeuh.js";
3
- import { _ } from "./Button-DlEYWX3X.js";
4
- import { w as u } from "./utils-B-n1yx0L.js";
2
+ import { D as f } from "./BaseItem-zscYu8eV.js";
3
+ import { _ } from "./Button-B2Z_WKdq.js";
4
+ import { w as u } from "./utils-vqG84sMo.js";
5
5
  const v = { class: "info-pair" }, h = { class: "info-pair--title" }, E = {
6
6
  key: 0,
7
7
  class: "info-pair--title--tip"
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as f, openBlock as i, createElementBlock as o, toDisplayString as n, createCommentVNode as s, createElementVNode as t, createVNode as p, unref as m, withCtx as _, createTextVNode as u } from "vue";
2
- import { D as w } from "./BaseItem-0fbDCeuh.js";
3
- import { E as y } from "./vendor-DkGhDRdQ.js";
4
- import { _ as h } from "./Button-DlEYWX3X.js";
5
- import { w as v } from "./utils-B-n1yx0L.js";
2
+ import { D as w } from "./BaseItem-zscYu8eV.js";
3
+ import { E as y } from "./vendor-MMWA2y7U.js";
4
+ import { _ as h } from "./Button-B2Z_WKdq.js";
5
+ import { w as v } from "./utils-vqG84sMo.js";
6
6
  const k = { class: "file_wrapper" }, x = {
7
7
  key: 0,
8
8
  class: "header"
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as L, onBeforeMount as H, useSlots as U, ref as d, computed as D, onMounted as P, onActivated as N, onUnmounted as T, onDeactivated as O, provide as p, watch as C, inject as m, onBeforeUpdate as q, onUpdated as F, openBlock as k, createElementBlock as M, normalizeStyle as Z, renderSlot as E, useAttrs as J, reactive as W, watchEffect as K, withDirectives as Q, vShow as V } from "vue";
2
- import { g as X } from "./Table-DNrZVI3t.js";
3
- import { w as A } from "./utils-B-n1yx0L.js";
2
+ import { g as X } from "./Table-BcofWMU9.js";
3
+ import { w as A } from "./utils-vqG84sMo.js";
4
4
  const Y = /* @__PURE__ */ L({
5
5
  name: "Grid",
6
6
  __name: "Grid",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as l, openBlock as i, createElementBlock as s, createElementVNode as a, createTextVNode as r, toDisplayString as t, createCommentVNode as p, normalizeClass as c, renderSlot as m, unref as f } from "vue";
2
- import { D as d } from "./BaseItem-0fbDCeuh.js";
3
- import { _ } from "./Button-DlEYWX3X.js";
4
- import { w as u } from "./utils-B-n1yx0L.js";
2
+ import { D as d } from "./BaseItem-zscYu8eV.js";
3
+ import { _ } from "./Button-B2Z_WKdq.js";
4
+ import { w as u } from "./utils-vqG84sMo.js";
5
5
  const v = { class: "info-pair" }, h = { class: "info-pair--title" }, I = {
6
6
  key: 0,
7
7
  class: "info-pair--title--tip"
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as V, useAttrs as v, useModel as E, openBlock as I, createElementBlock as z, normalizeClass as S, createVNode as $, unref as N, mergeProps as x, createSlots as _, renderList as y, withCtx as B, renderSlot as C, normalizeProps as M, guardReactiveProps as P, mergeModels as j, normalizeStyle as A } from "vue";
2
- import { s as U } from "./vendor-DkGhDRdQ.js";
3
- import { _ as Z } from "./Button-DlEYWX3X.js";
4
- import { w as k } from "./utils-B-n1yx0L.js";
2
+ import { s as U } from "./vendor-MMWA2y7U.js";
3
+ import { _ as Z } from "./Button-B2Z_WKdq.js";
4
+ import { w as k } from "./utils-vqG84sMo.js";
5
5
  const H = /* @__PURE__ */ V({
6
6
  name: "zh-input",
7
7
  __name: "Input",
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as t, openBlock as s, createElementBlock as a, createElementVNode as o } from "vue";
2
- import { _ as e } from "./Button-DlEYWX3X.js";
3
- import { w as i } from "./utils-B-n1yx0L.js";
2
+ import { _ as e } from "./Button-B2Z_WKdq.js";
3
+ import { w as i } from "./utils-vqG84sMo.js";
4
4
  const d = { class: "loading-box" }, r = /* @__PURE__ */ t({
5
5
  name: "zh-loading",
6
6
  __name: "Loading",