zhihao-ui 1.3.56 → 1.3.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/{BaseItem-0fbDCeuh.js → BaseItem-6LMSv4Je.js} +1 -1
- package/dist/es/CascaderLoadMore-DKTvm00E.js +287 -0
- package/dist/es/{DatePicker-BH5X28Bl.js → DatePicker-CymT2gjS.js} +1 -1
- package/dist/es/{DetailHeader-kFn2FtqV.js → DetailHeader-DlAjiYhV.js} +1 -1
- package/dist/es/{DetailSubTitle-DjHsWNVa.js → DetailSubTitle-OH6TMyKI.js} +1 -1
- package/dist/es/{DiyDataTable-a-pFltM6.js → DiyDataTable-DRuRQedj.js} +30 -30
- package/dist/es/{EditInfoPair-ZvaiiVmj.js → EditInfoPair-B3TKNnnl.js} +1 -1
- package/dist/es/{FileWrapper-mQ4rJXJr.js → FileWrapper-bVyPV48o.js} +1 -1
- package/dist/es/{Grid-CCkuxPw9.js → Grid-CLU3cdzX.js} +1 -1
- package/dist/es/{InfoPair-R1-mr8Vf.js → InfoPair-nPqi45Ys.js} +1 -1
- package/dist/es/{MoneyInput-BlilgYic.js → MoneyInput-ZLGQmpLk.js} +1 -1
- package/dist/es/{Table-DNrZVI3t.js → Table-gFH87j_O.js} +2 -2
- package/dist/es/index.js +13 -13
- package/dist/index.css +1 -1
- package/dist/types/components/CascaderLoadMore/CascaderLoadMore.vue.d.ts +0 -3
- package/dist/types/components/CascaderLoadMore/index.d.ts +0 -6
- package/dist/types/components/DiyDataTable/DiyDataTable.vue.d.ts +1 -0
- package/dist/types/components/DiyDataTable/index.d.ts +3 -0
- package/dist/types/components/DiyDataTable/type.d.ts +2 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +21 -21
- package/package.json +1 -1
- package/dist/es/CascaderLoadMore-DFdDRygU.js +0 -283
|
@@ -1,6 +1,6 @@
|
|
|
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
2
|
import { E as D, a as Z, d as g } from "./vendor-DkGhDRdQ.js";
|
|
3
|
-
import { Z as G } from "./Grid-
|
|
3
|
+
import { Z as G } from "./Grid-CLU3cdzX.js";
|
|
4
4
|
import { w as U } from "./utils-B-n1yx0L.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,
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { defineComponent as ae, useModel as oe, ref as s, watch as R, nextTick as g, withDirectives as se, openBlock as h, createElementBlock as k, createVNode as A, unref as S, withCtx as B, createBlock as W, toDisplayString as ne, createCommentVNode as re, mergeProps as ce, Fragment as ie, renderList as ue, mergeModels as $ } from "vue";
|
|
2
|
+
import { e as H, f as pe, g as de, h as ve, i as fe, C as me } from "./vendor-DkGhDRdQ.js";
|
|
3
|
+
import { w as ge } from "./utils-B-n1yx0L.js";
|
|
4
|
+
const he = { class: "w-100" }, ye = {
|
|
5
|
+
key: 1,
|
|
6
|
+
class: "cascader-select-empty"
|
|
7
|
+
}, Ce = {
|
|
8
|
+
key: 2,
|
|
9
|
+
class: "loading"
|
|
10
|
+
}, Se = /* @__PURE__ */ ae({
|
|
11
|
+
name: "CascaderLoadMore",
|
|
12
|
+
__name: "CascaderLoadMore",
|
|
13
|
+
props: /* @__PURE__ */ $({
|
|
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__ */ $(["change", "removeTag"], ["update:modelValue"]),
|
|
97
|
+
setup(p, { expose: I, emit: N }) {
|
|
98
|
+
const o = p, c = oe(p, "modelValue"), f = s(c.value || []), m = s(!1), d = s({
|
|
99
|
+
page: 1,
|
|
100
|
+
size: o.pageSize
|
|
101
|
+
}), b = s(void 0), T = s(!1), E = s(!0), v = s(o.initialOptions || []), n = s(o.initialOptions || []), y = s(void 0), O = s(!1), U = {
|
|
102
|
+
expandTrigger: "hover",
|
|
103
|
+
checkStrictly: !1,
|
|
104
|
+
multiple: o.multiple,
|
|
105
|
+
emitPath: !0,
|
|
106
|
+
...o.cascaderProps
|
|
107
|
+
}, D = s(), q = s(), j = () => {
|
|
108
|
+
m.value = !0;
|
|
109
|
+
}, Z = () => {
|
|
110
|
+
m.value = !1;
|
|
111
|
+
}, Q = (e) => {
|
|
112
|
+
const l = /* @__PURE__ */ new Map();
|
|
113
|
+
return (e || []).forEach((t) => {
|
|
114
|
+
const a = `${t.value}`;
|
|
115
|
+
l.has(a) || l.set(a, t);
|
|
116
|
+
}), Array.from(l.values());
|
|
117
|
+
};
|
|
118
|
+
function V(e) {
|
|
119
|
+
const l = [];
|
|
120
|
+
function t(a, i = "") {
|
|
121
|
+
const r = i && (o.cascaderProps.emitPath ?? !0) ? `${i}/${a.label}` : a.label;
|
|
122
|
+
l.push({
|
|
123
|
+
...a,
|
|
124
|
+
value: a.value,
|
|
125
|
+
label: r
|
|
126
|
+
// 如果需要保留原始路径结构,可加上 fullPath 字段
|
|
127
|
+
// fullPath: currentPath
|
|
128
|
+
}), a.children && a.children.length > 0 && a.children.forEach((u) => t(u, r));
|
|
129
|
+
}
|
|
130
|
+
return e.forEach((a) => t(a)), l;
|
|
131
|
+
}
|
|
132
|
+
const x = async (e) => {
|
|
133
|
+
var i;
|
|
134
|
+
if (!o.forceSearch && !e) return;
|
|
135
|
+
const l = y.value === e || !y.value && !e;
|
|
136
|
+
if (l || (d.value.page = 1), l && b.value !== void 0 && d.value.page > b.value && !O.value) return;
|
|
137
|
+
O.value = !1, T.value = !0, n.value.length === 0 && (E.value = !0);
|
|
138
|
+
const a = await o.requestFunction(d.value.page, d.value.size, e);
|
|
139
|
+
if (a && Object.keys(a).length) {
|
|
140
|
+
b.value = a.totalPage;
|
|
141
|
+
const r = (i = a == null ? void 0 : a.list) == null ? void 0 : i.map(o.handleOptionsFunction);
|
|
142
|
+
l && d.value.page !== 1 ? n.value = Q([...n.value, ...r]) : n.value = r || [], f.value = H(c.value), v.value = V(n.value);
|
|
143
|
+
}
|
|
144
|
+
g(() => {
|
|
145
|
+
z();
|
|
146
|
+
}), y.value = e, T.value = !1, n.value.length !== 0 && (E.value = !1);
|
|
147
|
+
}, G = () => {
|
|
148
|
+
d.value.page = d.value.page + 1, x(y.value);
|
|
149
|
+
}, J = (e) => {
|
|
150
|
+
c.value = e, f.value = e;
|
|
151
|
+
const l = M(e), t = o.onChange;
|
|
152
|
+
t && t(e, l);
|
|
153
|
+
}, M = (e) => {
|
|
154
|
+
const l = e || c.value;
|
|
155
|
+
return o.multiple ? v.value.filter(
|
|
156
|
+
(t) => (l || []).includes(t.value)
|
|
157
|
+
) : v.value.find((t) => t.value === l);
|
|
158
|
+
}, K = () => {
|
|
159
|
+
c.value = o.initialValue, f.value = o.initialValue, d.value.page = 1, d.value.size = o.pageSize, v.value = o.initialOptions || [], n.value = o.initialOptions || [], b.value = void 0, y.value = void 0;
|
|
160
|
+
}, w = N;
|
|
161
|
+
R(
|
|
162
|
+
() => o.initialOptions,
|
|
163
|
+
() => {
|
|
164
|
+
v.value = V(o.initialOptions), console.log("options.value", v.value), n.value = o.initialOptions;
|
|
165
|
+
},
|
|
166
|
+
{ immediate: !0 }
|
|
167
|
+
);
|
|
168
|
+
const X = (e) => {
|
|
169
|
+
w("removeTag", e);
|
|
170
|
+
}, Y = (e) => {
|
|
171
|
+
O.value = e;
|
|
172
|
+
}, P = s(null), C = s(null), L = () => {
|
|
173
|
+
if (!m.value) return;
|
|
174
|
+
const e = q.value.popperRef.contentRef, l = e == null ? void 0 : e.querySelector(".el-cascader-panel .el-scrollbar__wrap");
|
|
175
|
+
l && (P.value = l, C.value = () => _(l), l.addEventListener("scroll", C.value));
|
|
176
|
+
}, F = () => {
|
|
177
|
+
P.value && C.value && (P.value.removeEventListener("scroll", C.value), P.value = null, C.value = null);
|
|
178
|
+
}, _ = (e) => {
|
|
179
|
+
const { scrollTop: l, scrollHeight: t, clientHeight: a } = e;
|
|
180
|
+
let i = t - l;
|
|
181
|
+
a + 10 > i && G();
|
|
182
|
+
};
|
|
183
|
+
g(() => L()), R(m, (e) => {
|
|
184
|
+
e ? (console.log("visible", e), g(() => L())) : F();
|
|
185
|
+
}), R(n, (e) => {
|
|
186
|
+
e != null && e.length && m.value ? g(() => L()) : F();
|
|
187
|
+
});
|
|
188
|
+
const ee = async (e) => {
|
|
189
|
+
(o.cascaderProps.emitPath ?? !0) && Array.isArray(e) ? o.multiple ? c.value = e.map((a) => a.at(-1)) : c.value = e.at(-1) : c.value = H(f.value), await g();
|
|
190
|
+
const l = M(c.value);
|
|
191
|
+
w("change", e, l);
|
|
192
|
+
const t = o.onChange;
|
|
193
|
+
t && t(e, l);
|
|
194
|
+
}, z = () => {
|
|
195
|
+
var i;
|
|
196
|
+
const e = q.value.popperRef.contentRef, l = e.querySelectorAll(".el-cascader-node__label"), t = (i = D.value) == null ? void 0 : i.$el, a = e == null ? void 0 : e.querySelector(".cascader-select-empty");
|
|
197
|
+
if (t && a) {
|
|
198
|
+
const r = t.offsetWidth;
|
|
199
|
+
a.style.width = `${r}px`;
|
|
200
|
+
}
|
|
201
|
+
l.forEach((r) => {
|
|
202
|
+
const u = document.createElement("span");
|
|
203
|
+
u.style.visibility = "hidden", u.style.position = "absolute", u.style.whiteSpace = "nowrap", u.style.font = window.getComputedStyle(r).font, u.textContent = r.textContent || "", document.body.appendChild(u);
|
|
204
|
+
const te = u.offsetWidth;
|
|
205
|
+
document.body.removeChild(u), r instanceof HTMLElement && (r.style.whiteSpace = te > 240 ? "break-spaces" : "nowrap");
|
|
206
|
+
});
|
|
207
|
+
}, le = () => {
|
|
208
|
+
g(() => {
|
|
209
|
+
z();
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
return I({
|
|
213
|
+
reset: K,
|
|
214
|
+
getSelectedOption: M,
|
|
215
|
+
remoteMethod: x,
|
|
216
|
+
handleRequestParamsChanged: Y,
|
|
217
|
+
options: v,
|
|
218
|
+
cascderOptions: n
|
|
219
|
+
}), (e, l) => se((h(), k("div", he, [
|
|
220
|
+
A(S(pe), {
|
|
221
|
+
ref_key: "popoverRef",
|
|
222
|
+
ref: q,
|
|
223
|
+
teleported: p.teleported,
|
|
224
|
+
placement: o.placement,
|
|
225
|
+
trigger: o.trigger,
|
|
226
|
+
"popper-class": "warp-cascade-panel " + o.popperClass,
|
|
227
|
+
visible: m.value
|
|
228
|
+
}, {
|
|
229
|
+
reference: B(() => [
|
|
230
|
+
A(S(ve), ce({
|
|
231
|
+
ref_key: "remoteSelectRef",
|
|
232
|
+
ref: D,
|
|
233
|
+
modelValue: c.value,
|
|
234
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => c.value = t),
|
|
235
|
+
multiple: p.multiple,
|
|
236
|
+
placeholder: p.placeholder,
|
|
237
|
+
"remote-method": x,
|
|
238
|
+
teleported: !0,
|
|
239
|
+
clearable: p.clearable,
|
|
240
|
+
"collapse-tags": p.collapseTags,
|
|
241
|
+
"collapse-tags-tooltip": p.collapseTagsTooltip,
|
|
242
|
+
filterable: "",
|
|
243
|
+
height: "300",
|
|
244
|
+
remote: "",
|
|
245
|
+
"remote-show-suffix": "",
|
|
246
|
+
"reserve-keyword": "",
|
|
247
|
+
"popper-class": "hidden-dropdown",
|
|
248
|
+
class: "cascader-select"
|
|
249
|
+
}, e.$attrs, {
|
|
250
|
+
onClick: j,
|
|
251
|
+
onChange: J,
|
|
252
|
+
onRemoveTag: X
|
|
253
|
+
}), {
|
|
254
|
+
default: B(() => [
|
|
255
|
+
(h(!0), k(ie, null, ue(v.value, (t) => (h(), W(S(fe), {
|
|
256
|
+
key: t.value,
|
|
257
|
+
label: t.label,
|
|
258
|
+
value: t.value
|
|
259
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
260
|
+
]),
|
|
261
|
+
_: 1
|
|
262
|
+
}, 16, ["modelValue", "multiple", "placeholder", "clearable", "collapse-tags", "collapse-tags-tooltip"])
|
|
263
|
+
]),
|
|
264
|
+
default: B(() => [
|
|
265
|
+
!E.value && n.value.length > 0 ? (h(), W(S(de), {
|
|
266
|
+
key: 0,
|
|
267
|
+
modelValue: f.value,
|
|
268
|
+
"onUpdate:modelValue": l[1] || (l[1] = (t) => f.value = t),
|
|
269
|
+
border: !1,
|
|
270
|
+
props: U,
|
|
271
|
+
options: n.value,
|
|
272
|
+
class: "select-cascader-panel",
|
|
273
|
+
onChange: ee,
|
|
274
|
+
onExpandChange: le
|
|
275
|
+
}, null, 8, ["modelValue", "options"])) : (h(), k("div", ye, ne(p.noDataText), 1)),
|
|
276
|
+
T.value ? (h(), k("div", Ce, "加载中...")) : re("", !0)
|
|
277
|
+
]),
|
|
278
|
+
_: 1
|
|
279
|
+
}, 8, ["teleported", "placement", "trigger", "popper-class", "visible"])
|
|
280
|
+
])), [
|
|
281
|
+
[S(me), Z]
|
|
282
|
+
]);
|
|
283
|
+
}
|
|
284
|
+
}), Te = ge(Se);
|
|
285
|
+
export {
|
|
286
|
+
Te as Z
|
|
287
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
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
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-
|
|
3
|
+
import { D as m, a as b, L as p, b as k } from "./BaseItem-6LMSv4Je.js";
|
|
4
4
|
import { w as E } from "./utils-B-n1yx0L.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) {
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
+
import { D as v } from "./BaseItem-6LMSv4Je.js";
|
|
3
3
|
import { _ as k } from "./Button-DlEYWX3X.js";
|
|
4
4
|
import { w as y } from "./utils-B-n1yx0L.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 = {
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
+
import { D as u } from "./BaseItem-6LMSv4Je.js";
|
|
3
3
|
import { w as f } from "./utils-B-n1yx0L.js";
|
|
4
4
|
const _ = { class: "info-pair" }, v = { class: "info-pair--title" }, h = {
|
|
5
5
|
key: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
2
|
-
import { D as
|
|
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-6LMSv4Je.js";
|
|
3
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
4
|
import { _ as oe } from "./Button-DlEYWX3X.js";
|
|
5
5
|
import { w as le } from "./utils-B-n1yx0L.js";
|
|
@@ -27,24 +27,24 @@ const re = { key: 0 }, de = {
|
|
|
27
27
|
rawDataModifiers: {}
|
|
28
28
|
}),
|
|
29
29
|
emits: ["update:rawData"],
|
|
30
|
-
setup(h, { expose:
|
|
31
|
-
const r = h, n = j(h, "rawData"), d = 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
|
-
}),
|
|
39
|
-
...
|
|
38
|
+
}), c = G(() => r.operationOption ? {
|
|
39
|
+
...g.value,
|
|
40
40
|
...r.operationOption || {}
|
|
41
41
|
} : {
|
|
42
|
-
...
|
|
42
|
+
...g.value,
|
|
43
43
|
// 兼容之前单个配置项
|
|
44
|
-
customAddRow: r.customAddRow !== void 0 ? r.customAddRow :
|
|
45
|
-
addRowText: r.addRowText !== void 0 ? r.addRowText :
|
|
46
|
-
customAddColumn: r.customAddColumn !== void 0 ? r.customAddColumn :
|
|
47
|
-
addColumnText: r.addColumnText !== void 0 ? r.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
|
-
},
|
|
77
|
+
}, B = (t, o) => {
|
|
78
78
|
d.value.splice(t, 1), n.value.forEach((e) => {
|
|
79
79
|
delete e[o.prop];
|
|
80
80
|
});
|
|
81
|
-
},
|
|
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
|
|
110
|
-
|
|
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] ||
|
|
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
|
|
126
|
+
return q({
|
|
127
127
|
/** 初始化数据 */
|
|
128
128
|
initData: (t, o) => {
|
|
129
129
|
const e = (o || []).find((l) => l.type === w.INDEX) || null;
|
|
@@ -253,11 +253,11 @@ const re = { key: 0 }, de = {
|
|
|
253
253
|
e.isAdd ? (s(), v("i", {
|
|
254
254
|
key: 0,
|
|
255
255
|
class: "iconfont icon-close",
|
|
256
|
-
onClick: (a) =>
|
|
256
|
+
onClick: (a) => B(l, e)
|
|
257
257
|
}, null, 8, ie)) : x("", !0)
|
|
258
258
|
])) : (s(), v("div", {
|
|
259
259
|
key: 2,
|
|
260
|
-
class:
|
|
260
|
+
class: S({ "is-required-label": e.required })
|
|
261
261
|
}, C(e.label), 3)) : (s(), v("div", re, C(e.label), 1))
|
|
262
262
|
]),
|
|
263
263
|
default: f((a) => [
|
|
@@ -265,7 +265,7 @@ const re = { key: 0 }, de = {
|
|
|
265
265
|
key: 0,
|
|
266
266
|
prop: `${a.$index}.${e.prop}`,
|
|
267
267
|
rules: z(e, a.row, a.$index),
|
|
268
|
-
class:
|
|
268
|
+
class: S(["col-edit-container", { "close-padding": e.isAdd }])
|
|
269
269
|
}, {
|
|
270
270
|
default: f(() => [
|
|
271
271
|
e.type === u(w).FORMAT && e.formatter ? (s(), v("div", se, C(e.showFormatter ? e.showFormatter(
|
|
@@ -303,14 +303,14 @@ const re = { key: 0 }, de = {
|
|
|
303
303
|
]),
|
|
304
304
|
_: 2
|
|
305
305
|
}, 1032, ["prop", "label", "width", "min-width", "fixed"]))), 128)),
|
|
306
|
-
r.isEdit &&
|
|
306
|
+
r.isEdit && c.value.isShow ? (s(), m(u(_), {
|
|
307
307
|
key: 1,
|
|
308
|
-
width:
|
|
308
|
+
width: c.value.width,
|
|
309
309
|
fixed: "right"
|
|
310
310
|
}, {
|
|
311
311
|
header: f(() => [
|
|
312
312
|
k("div", ne, [
|
|
313
|
-
|
|
313
|
+
c.value.customAddRow ? (s(), m(u(U), {
|
|
314
314
|
key: 0,
|
|
315
315
|
type: "primary",
|
|
316
316
|
link: "",
|
|
@@ -318,11 +318,11 @@ const re = { key: 0 }, de = {
|
|
|
318
318
|
}, {
|
|
319
319
|
default: f(() => [
|
|
320
320
|
o[0] || (o[0] = k("i", { class: "iconfont icon-Frame1" }, null, -1)),
|
|
321
|
-
D(C(
|
|
321
|
+
D(C(c.value.addRowText), 1)
|
|
322
322
|
]),
|
|
323
323
|
_: 1
|
|
324
324
|
})) : x("", !0),
|
|
325
|
-
|
|
325
|
+
c.value.customAddColumn ? (s(), m(u(U), {
|
|
326
326
|
key: 1,
|
|
327
327
|
type: "primary",
|
|
328
328
|
link: "",
|
|
@@ -330,7 +330,7 @@ const re = { key: 0 }, de = {
|
|
|
330
330
|
}, {
|
|
331
331
|
default: f(() => [
|
|
332
332
|
o[1] || (o[1] = k("i", { class: "iconfont icon-Frame-11" }, null, -1)),
|
|
333
|
-
D(C(
|
|
333
|
+
D(C(c.value.addColumnText), 1)
|
|
334
334
|
]),
|
|
335
335
|
_: 1
|
|
336
336
|
})) : x("", !0)
|
|
@@ -346,7 +346,7 @@ const re = { key: 0 }, de = {
|
|
|
346
346
|
n.value.length > 1 && !l.disabled ? (s(), v("i", {
|
|
347
347
|
key: 0,
|
|
348
348
|
class: "iconfont icon-close",
|
|
349
|
-
onClick: (a) =>
|
|
349
|
+
onClick: (a) => W(e)
|
|
350
350
|
}, null, 8, pe)) : x("", !0)
|
|
351
351
|
], 64))
|
|
352
352
|
])
|
|
@@ -360,8 +360,8 @@ const re = { key: 0 }, de = {
|
|
|
360
360
|
_: 3
|
|
361
361
|
}, 8, ["model"]));
|
|
362
362
|
}
|
|
363
|
-
}), he = /* @__PURE__ */ oe(fe, [["__scopeId", "data-v-
|
|
363
|
+
}), he = /* @__PURE__ */ oe(fe, [["__scopeId", "data-v-a8aadce4"]]), ce = le(he);
|
|
364
364
|
export {
|
|
365
365
|
w as D,
|
|
366
|
-
|
|
366
|
+
ce as Z
|
|
367
367
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
+
import { D as f } from "./BaseItem-6LMSv4Je.js";
|
|
3
3
|
import { _ } from "./Button-DlEYWX3X.js";
|
|
4
4
|
import { w as u } from "./utils-B-n1yx0L.js";
|
|
5
5
|
const v = { class: "info-pair" }, h = { class: "info-pair--title" }, E = {
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
+
import { D as w } from "./BaseItem-6LMSv4Je.js";
|
|
3
3
|
import { E as y } from "./vendor-DkGhDRdQ.js";
|
|
4
4
|
import { _ as h } from "./Button-DlEYWX3X.js";
|
|
5
5
|
import { w as v } from "./utils-B-n1yx0L.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
+
import { g as X } from "./Table-gFH87j_O.js";
|
|
3
3
|
import { w as A } from "./utils-B-n1yx0L.js";
|
|
4
4
|
const Y = /* @__PURE__ */ L({
|
|
5
5
|
name: "Grid",
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
+
import { D as d } from "./BaseItem-6LMSv4Je.js";
|
|
3
3
|
import { _ } from "./Button-DlEYWX3X.js";
|
|
4
4
|
import { w as u } from "./utils-B-n1yx0L.js";
|
|
5
5
|
const v = { class: "info-pair" }, h = { class: "info-pair--title" }, I = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, useModel as d, computed as i, ref as f, openBlock as v, createBlock as c, unref as y, withCtx as n, createVNode as V, mergeProps as b, createSlots as I, renderList as M, renderSlot as w, normalizeProps as B, guardReactiveProps as N, mergeModels as g } from "vue";
|
|
2
|
-
import { v as k, d as P } from "./DatePicker-
|
|
2
|
+
import { v as k, d as P } from "./DatePicker-CymT2gjS.js";
|
|
3
3
|
import { a5 as T } from "./vendor-DkGhDRdQ.js";
|
|
4
4
|
import { I as $ } from "./Input-DjQtffZg.js";
|
|
5
5
|
import { _ as z } from "./Button-DlEYWX3X.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { reactive as te, computed as O, toRefs as Ae, ref as z, defineComponent as le, useCssVars as dt, inject as Ue, openBlock as S, createElementBlock as I, createBlock as L, resolveDynamicComponent as fe, mergeProps as G, withKeys as pt, unref as u, createSlots as me, withCtx as w, Fragment as Y, renderList as ge, renderSlot as W, createElementVNode as B, toDisplayString as X, createCommentVNode as M, createVNode as k, withModifiers as ht, normalizeClass as Ze, createTextVNode as Q, useSlots as Ke, isVNode as ft, normalizeProps as We, guardReactiveProps as je, nextTick as ve, onMounted as mt, onActivated as gt, onDeactivated as vt, onUnmounted as Ct, watch as bt, provide as yt, resolveDirective as St, withDirectives as we, vShow as wt, toHandlers as kt } from "vue";
|
|
2
2
|
import { a6 as Ne, a7 as _t, a8 as Pt, a9 as qe, aa as Tt, n as Et, ab as $t, q as Bt, ac as zt, a5 as Ce, b as Te, a as be, ad as Mt, ae as It, p as re, af as Ft, ag as Lt, ah as Dt, ai as xe, aj as He, e as J, o as Je, ak as Le, al as Vt, am as Ye, an as Rt, ao as Ot, ap as At, aq as Ut, E as ke, ar as Zt, m as Kt, as as Wt, at as De, au as Ve } from "./vendor-DkGhDRdQ.js";
|
|
3
|
-
import { D as ae, C as jt } from "./BaseItem-
|
|
4
|
-
import { Z as Nt } from "./CascaderLoadMore-
|
|
3
|
+
import { D as ae, C as jt } from "./BaseItem-6LMSv4Je.js";
|
|
4
|
+
import { Z as Nt } from "./CascaderLoadMore-DKTvm00E.js";
|
|
5
5
|
import { _ as se, Z as _e } from "./Button-DlEYWX3X.js";
|
|
6
6
|
import { _ as qt } from "./Dialog-B_Psb_wh.js";
|
|
7
7
|
import { w as xt } from "./utils-B-n1yx0L.js";
|
package/dist/es/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { m as o } from "./utils-B-n1yx0L.js";
|
|
2
2
|
import { a as r, b as a } from "./Button-DlEYWX3X.js";
|
|
3
|
-
import { Z as m } from "./DatePicker-
|
|
4
|
-
import { Z as t } from "./DetailSubTitle-
|
|
3
|
+
import { Z as m } from "./DatePicker-CymT2gjS.js";
|
|
4
|
+
import { Z as t } from "./DetailSubTitle-OH6TMyKI.js";
|
|
5
5
|
import { Z } from "./Dialog-B_Psb_wh.js";
|
|
6
|
-
import { Z as s } from "./EditInfoPair-
|
|
7
|
-
import { Z as i } from "./FileWrapper-
|
|
8
|
-
import { a as p, Z as e, b as f } from "./Grid-
|
|
9
|
-
import { Z as h } from "./InfoPair-
|
|
6
|
+
import { Z as s } from "./EditInfoPair-B3TKNnnl.js";
|
|
7
|
+
import { Z as i } from "./FileWrapper-bVyPV48o.js";
|
|
8
|
+
import { a as p, Z as e, b as f } from "./Grid-CLU3cdzX.js";
|
|
9
|
+
import { Z as h } from "./InfoPair-nPqi45Ys.js";
|
|
10
10
|
import { Z as n, a as l } from "./Input-DjQtffZg.js";
|
|
11
11
|
import { Z as d } from "./Loading-CDxuHkdt.js";
|
|
12
12
|
import { Z as u, a as I, b as D, c as b } from "./MessageBox-kkpNeAii.js";
|
|
13
|
-
import { Z as P } from "./MoneyInput-
|
|
13
|
+
import { Z as P } from "./MoneyInput-ZLGQmpLk.js";
|
|
14
14
|
import { Z as T } from "./PageHeadPanel-DsEeXTgj.js";
|
|
15
15
|
import { Z as c } from "./ToolTips-BRjrysPf.js";
|
|
16
16
|
import { Z as B } from "./BaseInfo-ehtLJvVF.js";
|
|
17
|
-
import { Z as M } from "./DetailHeader-
|
|
18
|
-
import { Z as g } from "./DiyDataTable-
|
|
19
|
-
import { D as $ } from "./DiyDataTable-
|
|
17
|
+
import { Z as M } from "./DetailHeader-DlAjiYhV.js";
|
|
18
|
+
import { Z as g } from "./DiyDataTable-DRuRQedj.js";
|
|
19
|
+
import { D as $ } from "./DiyDataTable-DRuRQedj.js";
|
|
20
20
|
import { Z as x } from "./Map-CmcmvvxF.js";
|
|
21
|
-
import { Z as G } from "./Table-
|
|
22
|
-
import { Z as ro } from "./BaseItem-
|
|
23
|
-
import { Z as A } from "./CascaderLoadMore-
|
|
21
|
+
import { Z as G } from "./Table-gFH87j_O.js";
|
|
22
|
+
import { Z as ro } from "./BaseItem-6LMSv4Je.js";
|
|
23
|
+
import { Z as A } from "./CascaderLoadMore-DKTvm00E.js";
|
|
24
24
|
const k = [
|
|
25
25
|
B,
|
|
26
26
|
r,
|