zhihao-ui 1.3.54 → 1.3.55
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-DQKOTeth.js → BaseItem-YGnpIugn.js} +1 -1
- package/dist/es/{CascaderLoadMore-CdndYSd1.js → CascaderLoadMore-BwYi7PBx.js} +84 -79
- package/dist/es/{DatePicker-BSdiMSHq.js → DatePicker-BkKUo2v1.js} +1 -1
- package/dist/es/{DetailHeader-BaVN1zZA.js → DetailHeader-lzEy7t5Y.js} +1 -1
- package/dist/es/{DetailSubTitle-BMIe2Qwe.js → DetailSubTitle-DfqGXyKI.js} +1 -1
- package/dist/es/DiyDataTable-Yp1HvbS1.js +367 -0
- package/dist/es/{EditInfoPair-Zed59i0Z.js → EditInfoPair-BXF1tV3S.js} +1 -1
- package/dist/es/{FileWrapper-DwYXt2R_.js → FileWrapper-CqbiXynu.js} +1 -1
- package/dist/es/{Grid-CCcxjfAs.js → Grid-CDS9IrCA.js} +1 -1
- package/dist/es/{InfoPair-DbQZtDZ4.js → InfoPair-jRjF91Ro.js} +1 -1
- package/dist/es/{Map-rM-FhwBq.js → Map-BoN5eeEB.js} +712 -705
- package/dist/es/{MoneyInput-Cildlxii.js → MoneyInput-oY4Jr4Du.js} +1 -1
- package/dist/es/Table-BU_pHf2Y.js +1180 -0
- package/dist/es/index.js +14 -14
- package/dist/index.css +1 -1
- package/dist/types/components/DiyDataTable/DiyDataTable.vue.d.ts +2 -1
- package/dist/types/components/DiyDataTable/index.d.ts +6 -3
- package/dist/types/components/DiyDataTable/type.d.ts +3 -1
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +31 -31
- package/package.json +1 -1
- package/dist/es/DiyDataTable-Bi4KyAh2.js +0 -366
- package/dist/es/Table-BcTA1mjZ.js +0 -1177
|
@@ -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-CxcudVpO.js";
|
|
3
|
-
import { Z as G } from "./Grid-
|
|
3
|
+
import { Z as G } from "./Grid-CDS9IrCA.js";
|
|
4
4
|
import { w as U } from "./utils-DRDkj6ga.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,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { e as
|
|
3
|
-
import { w as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as te, useModel as le, ref as n, watch as B, nextTick as h, resolveDirective as ae, openBlock as d, createElementBlock as k, withDirectives as oe, createBlock as w, unref as y, mergeProps as ne, withCtx as V, Fragment as se, renderList as re, createVNode as ie, toDisplayString as ce, createCommentVNode as ue, mergeModels as F } from "vue";
|
|
2
|
+
import { e as z, f as pe, g as de, h as ve, i as fe } from "./vendor-CxcudVpO.js";
|
|
3
|
+
import { w as me } from "./utils-DRDkj6ga.js";
|
|
4
|
+
const ge = { class: "w-100" }, he = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "cascader-select-empty"
|
|
7
|
-
},
|
|
7
|
+
}, ye = {
|
|
8
8
|
key: 2,
|
|
9
9
|
class: "loading"
|
|
10
|
-
},
|
|
10
|
+
}, Ce = /* @__PURE__ */ te({
|
|
11
11
|
name: "CascaderLoadMore",
|
|
12
12
|
__name: "CascaderLoadMore",
|
|
13
|
-
props: /* @__PURE__ */
|
|
13
|
+
props: /* @__PURE__ */ F({
|
|
14
14
|
onChange: {
|
|
15
15
|
type: Function,
|
|
16
16
|
required: !1
|
|
@@ -94,32 +94,32 @@ const me = { class: "w-100" }, ge = {
|
|
|
94
94
|
modelValue: {},
|
|
95
95
|
modelModifiers: {}
|
|
96
96
|
}),
|
|
97
|
-
emits: /* @__PURE__ */
|
|
98
|
-
setup(r, { expose:
|
|
99
|
-
const a = r, s =
|
|
97
|
+
emits: /* @__PURE__ */ F(["change", "removeTag"], ["update:modelValue"]),
|
|
98
|
+
setup(r, { expose: A, emit: H }) {
|
|
99
|
+
const a = r, s = le(r, "modelValue"), v = n(s.value || []), C = n(!1), i = n({
|
|
100
100
|
page: 1,
|
|
101
101
|
size: a.pageSize
|
|
102
|
-
}),
|
|
102
|
+
}), S = n(void 0), b = n(!1), p = n(a.initialOptions || []), c = n(a.initialOptions || []), f = n(void 0), E = n(!1), I = {
|
|
103
103
|
expandTrigger: "hover",
|
|
104
104
|
checkStrictly: !1,
|
|
105
105
|
multiple: a.multiple,
|
|
106
106
|
emitPath: !0,
|
|
107
107
|
...a.cascaderProps
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
}, N = () => {
|
|
111
|
-
y.value = !1;
|
|
108
|
+
}, x = n(), P = n(), N = () => {
|
|
109
|
+
C.value = !0;
|
|
112
110
|
}, W = () => {
|
|
111
|
+
C.value = !1;
|
|
112
|
+
}, $ = () => {
|
|
113
113
|
var e, l;
|
|
114
|
-
(l = (e =
|
|
115
|
-
},
|
|
114
|
+
(l = (e = y(P).popperRef) == null ? void 0 : e.delayHide) == null || l.call(e);
|
|
115
|
+
}, U = (e) => {
|
|
116
116
|
const l = /* @__PURE__ */ new Map();
|
|
117
117
|
return (e || []).forEach((o) => {
|
|
118
118
|
const t = `${o.value}`;
|
|
119
119
|
l.has(t) || l.set(t, o);
|
|
120
120
|
}), Array.from(l.values());
|
|
121
121
|
};
|
|
122
|
-
function
|
|
122
|
+
function M(e) {
|
|
123
123
|
const l = [];
|
|
124
124
|
function o(t, u = "") {
|
|
125
125
|
const g = u && (a.cascaderProps.emitPath ?? !0) ? `${u}/${t.label}` : t.label;
|
|
@@ -129,28 +129,28 @@ const me = { class: "w-100" }, ge = {
|
|
|
129
129
|
label: g
|
|
130
130
|
// 如果需要保留原始路径结构,可加上 fullPath 字段
|
|
131
131
|
// fullPath: currentPath
|
|
132
|
-
}), t.children && t.children.length > 0 && t.children.forEach((
|
|
132
|
+
}), t.children && t.children.length > 0 && t.children.forEach((ee) => o(ee, g));
|
|
133
133
|
}
|
|
134
134
|
return e.forEach((t) => o(t)), l;
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const T = async (e) => {
|
|
137
137
|
var u;
|
|
138
138
|
if (!a.forceSearch && !e) return;
|
|
139
139
|
const l = f.value === e || !f.value && !e;
|
|
140
|
-
if (l || (i.value.page = 1), l &&
|
|
141
|
-
|
|
140
|
+
if (l || (i.value.page = 1), l && S.value !== void 0 && i.value.page > S.value && !E.value) return;
|
|
141
|
+
E.value = !1, b.value = !0;
|
|
142
142
|
const t = await a.requestFunction(i.value.page, i.value.size, e);
|
|
143
143
|
if (t && Object.keys(t).length) {
|
|
144
|
-
|
|
144
|
+
S.value = t.totalPage;
|
|
145
145
|
const g = (u = t == null ? void 0 : t.list) == null ? void 0 : u.map(a.handleOptionsFunction);
|
|
146
|
-
l && i.value.page !== 1 ? c.value =
|
|
146
|
+
l && i.value.page !== 1 ? c.value = U([...c.value, ...g]) : c.value = g || [], v.value = z(s.value), p.value = M(c.value);
|
|
147
147
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}), f.value = e,
|
|
151
|
-
},
|
|
152
|
-
i.value.page = i.value.page + 1,
|
|
153
|
-
},
|
|
148
|
+
h(() => {
|
|
149
|
+
L();
|
|
150
|
+
}), f.value = e, b.value = !1;
|
|
151
|
+
}, j = () => {
|
|
152
|
+
i.value.page = i.value.page + 1, T(f.value);
|
|
153
|
+
}, Z = (e) => {
|
|
154
154
|
s.value = e, v.value = e;
|
|
155
155
|
const l = q(e), o = a.onChange;
|
|
156
156
|
o && o(e, l);
|
|
@@ -159,67 +159,71 @@ const me = { class: "w-100" }, ge = {
|
|
|
159
159
|
return a.multiple ? p.value.filter(
|
|
160
160
|
(o) => (l || []).includes(o.value)
|
|
161
161
|
) : p.value.find((o) => o.value === l);
|
|
162
|
-
},
|
|
163
|
-
s.value = a.initialValue, v.value = a.initialValue, i.value.page = 1, i.value.size = a.pageSize, p.value = a.initialOptions || [], c.value = a.initialOptions || [],
|
|
164
|
-
}, R =
|
|
165
|
-
|
|
162
|
+
}, _ = () => {
|
|
163
|
+
s.value = a.initialValue, v.value = a.initialValue, i.value.page = 1, i.value.size = a.pageSize, p.value = a.initialOptions || [], c.value = a.initialOptions || [], S.value = void 0, f.value = void 0;
|
|
164
|
+
}, R = H;
|
|
165
|
+
B(
|
|
166
166
|
() => a.initialOptions,
|
|
167
167
|
() => {
|
|
168
|
-
p.value =
|
|
168
|
+
p.value = M(a.initialOptions), console.log("options.value", p.value), c.value = a.initialOptions;
|
|
169
169
|
},
|
|
170
170
|
{ immediate: !0 }
|
|
171
171
|
);
|
|
172
|
-
const
|
|
172
|
+
const Q = (e) => {
|
|
173
173
|
R("removeTag", e);
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
},
|
|
177
|
-
if (!
|
|
178
|
-
const e =
|
|
179
|
-
l && (
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
},
|
|
174
|
+
}, G = (e) => {
|
|
175
|
+
E.value = e;
|
|
176
|
+
}, O = n(null), m = n(null), D = () => {
|
|
177
|
+
if (!C.value) return;
|
|
178
|
+
const e = P.value.popperRef.contentRef, l = e == null ? void 0 : e.querySelector(".el-cascader-panel .el-scrollbar__wrap");
|
|
179
|
+
l && (O.value = l, m.value = () => K(l), l.addEventListener("scroll", m.value));
|
|
180
|
+
}, J = () => {
|
|
181
|
+
O.value && m.value && (O.value.removeEventListener("scroll", m.value), O.value = null, m.value = null);
|
|
182
|
+
}, K = (e) => {
|
|
183
183
|
const { scrollTop: l, scrollHeight: o, clientHeight: t } = e;
|
|
184
184
|
let u = o - l;
|
|
185
|
-
t + 10 > u &&
|
|
185
|
+
t + 10 > u && j();
|
|
186
186
|
};
|
|
187
|
-
|
|
188
|
-
e ?
|
|
187
|
+
h(() => D()), B(C, (e) => {
|
|
188
|
+
e ? h(() => D()) : J();
|
|
189
189
|
});
|
|
190
|
-
const
|
|
191
|
-
(a.cascaderProps.emitPath ?? !0) && Array.isArray(e) ? a.multiple ? s.value = e.map((t) => t.at(-1)) : s.value = e.at(-1) : s.value =
|
|
190
|
+
const X = async (e) => {
|
|
191
|
+
(a.cascaderProps.emitPath ?? !0) && Array.isArray(e) ? a.multiple ? s.value = e.map((t) => t.at(-1)) : s.value = e.at(-1) : s.value = z(v.value), await h();
|
|
192
192
|
const l = q(s.value);
|
|
193
193
|
R("change", e, l);
|
|
194
194
|
const o = a.onChange;
|
|
195
195
|
o && o(e, l);
|
|
196
|
-
},
|
|
197
|
-
const l =
|
|
196
|
+
}, L = () => {
|
|
197
|
+
const l = P.value.popperRef.contentRef.querySelectorAll(".el-cascader-node__label");
|
|
198
198
|
console.log(l), l.forEach((o) => {
|
|
199
199
|
const t = document.createElement("span");
|
|
200
200
|
t.style.visibility = "hidden", t.style.position = "absolute", t.style.whiteSpace = "nowrap", t.style.font = window.getComputedStyle(o).font, t.textContent = o.textContent || "", document.body.appendChild(t);
|
|
201
201
|
const u = t.offsetWidth;
|
|
202
202
|
document.body.removeChild(t), o instanceof HTMLElement && (o.style.whiteSpace = u > 240 ? "break-spaces" : "nowrap");
|
|
203
203
|
});
|
|
204
|
+
}, Y = () => {
|
|
205
|
+
h(() => {
|
|
206
|
+
L();
|
|
207
|
+
});
|
|
204
208
|
};
|
|
205
|
-
return
|
|
206
|
-
reset:
|
|
209
|
+
return A({
|
|
210
|
+
reset: _,
|
|
207
211
|
getSelectedOption: q,
|
|
208
|
-
remoteMethod:
|
|
209
|
-
handleRequestParamsChanged:
|
|
212
|
+
remoteMethod: T,
|
|
213
|
+
handleRequestParamsChanged: G,
|
|
210
214
|
options: p,
|
|
211
215
|
cascderOptions: c
|
|
212
216
|
}), (e, l) => {
|
|
213
|
-
const o =
|
|
214
|
-
return d(), k("div",
|
|
215
|
-
|
|
217
|
+
const o = ae("click-outside");
|
|
218
|
+
return d(), k("div", ge, [
|
|
219
|
+
oe((d(), w(y(pe), ne({
|
|
216
220
|
ref_key: "remoteSelectRef",
|
|
217
|
-
ref:
|
|
221
|
+
ref: x,
|
|
218
222
|
modelValue: s.value,
|
|
219
223
|
"onUpdate:modelValue": l[0] || (l[0] = (t) => s.value = t),
|
|
220
224
|
multiple: r.multiple,
|
|
221
225
|
placeholder: r.placeholder,
|
|
222
|
-
"remote-method":
|
|
226
|
+
"remote-method": T,
|
|
223
227
|
teleported: !0,
|
|
224
228
|
clearable: r.clearable,
|
|
225
229
|
"collapse-tags": r.collapseTags,
|
|
@@ -232,11 +236,11 @@ const me = { class: "w-100" }, ge = {
|
|
|
232
236
|
"popper-class": "hidden-dropdown",
|
|
233
237
|
class: "cascader-select"
|
|
234
238
|
}, e.$attrs, {
|
|
235
|
-
onChange:
|
|
236
|
-
onRemoveTag:
|
|
239
|
+
onChange: Z,
|
|
240
|
+
onRemoveTag: Q
|
|
237
241
|
}), {
|
|
238
|
-
default:
|
|
239
|
-
(d(!0), k(
|
|
242
|
+
default: V(() => [
|
|
243
|
+
(d(!0), k(se, null, re(p.value, (t) => (d(), w(y(de), {
|
|
240
244
|
key: t.value,
|
|
241
245
|
label: t.label,
|
|
242
246
|
value: t.value
|
|
@@ -244,39 +248,40 @@ const me = { class: "w-100" }, ge = {
|
|
|
244
248
|
]),
|
|
245
249
|
_: 1
|
|
246
250
|
}, 16, ["modelValue", "multiple", "placeholder", "clearable", "collapse-tags", "collapse-tags-tooltip"])), [
|
|
247
|
-
[o,
|
|
251
|
+
[o, $]
|
|
248
252
|
]),
|
|
249
|
-
|
|
253
|
+
ie(y(ve), {
|
|
250
254
|
ref_key: "popoverRef",
|
|
251
|
-
ref:
|
|
255
|
+
ref: P,
|
|
252
256
|
teleported: r.teleported,
|
|
253
257
|
placement: a.placement,
|
|
254
258
|
trigger: a.trigger,
|
|
255
259
|
"popper-class": a.popperClass,
|
|
256
|
-
"virtual-ref":
|
|
257
|
-
onShow:
|
|
258
|
-
onHide:
|
|
260
|
+
"virtual-ref": x.value,
|
|
261
|
+
onShow: N,
|
|
262
|
+
onHide: W,
|
|
259
263
|
"virtual-triggering": ""
|
|
260
264
|
}, {
|
|
261
|
-
default:
|
|
262
|
-
!
|
|
265
|
+
default: V(() => [
|
|
266
|
+
!b.value && c.value.length > 0 ? (d(), w(y(fe), {
|
|
263
267
|
key: 0,
|
|
264
268
|
modelValue: v.value,
|
|
265
269
|
"onUpdate:modelValue": l[1] || (l[1] = (t) => v.value = t),
|
|
266
270
|
border: !1,
|
|
267
|
-
props:
|
|
271
|
+
props: I,
|
|
268
272
|
options: c.value,
|
|
269
273
|
class: "select-cascader-panel",
|
|
270
|
-
onChange:
|
|
271
|
-
|
|
272
|
-
|
|
274
|
+
onChange: X,
|
|
275
|
+
onExpandChange: Y
|
|
276
|
+
}, null, 8, ["modelValue", "options"])) : (d(), k("div", he, ce(r.noDataText), 1)),
|
|
277
|
+
b.value ? (d(), k("div", ye, "加载中...")) : ue("", !0)
|
|
273
278
|
]),
|
|
274
279
|
_: 1
|
|
275
280
|
}, 8, ["teleported", "placement", "trigger", "popper-class", "virtual-ref"])
|
|
276
281
|
]);
|
|
277
282
|
};
|
|
278
283
|
}
|
|
279
|
-
}),
|
|
284
|
+
}), Oe = me(Ce);
|
|
280
285
|
export {
|
|
281
|
-
|
|
286
|
+
Oe as Z
|
|
282
287
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as d, openBlock as u, createElementBlock as f, normalizeClass as h, createVNode as _, unref as g, mergeProps as A } from "vue";
|
|
2
2
|
import { j as D, k } from "./vendor-CxcudVpO.js";
|
|
3
|
-
import { D as p, a as E, L as m, b as M } from "./BaseItem-
|
|
3
|
+
import { D as p, a as E, L as m, b as M } from "./BaseItem-YGnpIugn.js";
|
|
4
4
|
import { w as y } from "./utils-DRDkj6ga.js";
|
|
5
5
|
const i = (e, l = E) => e ? D(e).format(l).replace("Invalid date", p) : p, O = (e) => typeof e == "number" ? !0 : typeof e == "string" ? !isNaN(parseFloat(e)) : !1;
|
|
6
6
|
function P(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-YGnpIugn.js";
|
|
3
3
|
import { _ as k } from "./Button-DSjKm2wO.js";
|
|
4
4
|
import { w as y } from "./utils-DRDkj6ga.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-YGnpIugn.js";
|
|
3
3
|
import { w as f } from "./utils-DRDkj6ga.js";
|
|
4
4
|
const _ = { class: "info-pair" }, v = { class: "info-pair--title" }, h = {
|
|
5
5
|
key: 0,
|