zhihao-ui 1.3.54 → 1.3.56
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/{BaseInfo-Bz9HbxrR.js → BaseInfo-ehtLJvVF.js} +1 -1
- package/dist/es/{BaseItem-DQKOTeth.js → BaseItem-0fbDCeuh.js} +3 -3
- package/dist/es/{Button-DSjKm2wO.js → Button-DlEYWX3X.js} +2 -2
- package/dist/es/CascaderLoadMore-DFdDRygU.js +283 -0
- package/dist/es/DatePicker-BH5X28Bl.js +63 -0
- package/dist/es/{DetailHeader-BaVN1zZA.js → DetailHeader-kFn2FtqV.js} +3 -3
- package/dist/es/{DetailSubTitle-BMIe2Qwe.js → DetailSubTitle-DjHsWNVa.js} +2 -2
- package/dist/es/{Dialog-MVXB7s2S.js → Dialog-B_Psb_wh.js} +3 -3
- package/dist/es/DiyDataTable-a-pFltM6.js +367 -0
- package/dist/es/{EditInfoPair-Zed59i0Z.js → EditInfoPair-ZvaiiVmj.js} +3 -3
- package/dist/es/{FileWrapper-DwYXt2R_.js → FileWrapper-mQ4rJXJr.js} +4 -4
- package/dist/es/{Grid-CCcxjfAs.js → Grid-CCkuxPw9.js} +2 -2
- package/dist/es/{InfoPair-DbQZtDZ4.js → InfoPair-R1-mr8Vf.js} +3 -3
- package/dist/es/Input-DjQtffZg.js +91 -0
- package/dist/es/{Loading-C9Te67Gr.js → Loading-CDxuHkdt.js} +2 -2
- package/dist/es/Map-CmcmvvxF.js +2363 -0
- package/dist/es/{MessageBox-BzwToZ0E.js → MessageBox-kkpNeAii.js} +2 -2
- package/dist/es/{MoneyInput-Cildlxii.js → MoneyInput-BlilgYic.js} +5 -5
- package/dist/es/{PageHeadPanel-oLoxYR29.js → PageHeadPanel-DsEeXTgj.js} +2 -2
- package/dist/es/Table-DNrZVI3t.js +1180 -0
- package/dist/es/{ToolTips-H93PrmYL.js → ToolTips-BRjrysPf.js} +3 -3
- package/dist/es/index.js +23 -23
- package/dist/es/{utils-DRDkj6ga.js → utils-B-n1yx0L.js} +3 -3
- package/dist/es/{vendor-CxcudVpO.js → vendor-DkGhDRdQ.js} +51 -50
- package/dist/index.css +1 -1
- package/dist/types/components/DatePicker/DatePicker.vue.d.ts +2 -0
- package/dist/types/components/DatePicker/index.d.ts +9 -0
- 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/types/components/InputNumber/InputNumber.vue.d.ts +2 -0
- package/dist/types/components/InputNumber/index.d.ts +5 -0
- package/dist/types/components/Map/Map.vue.d.ts +2 -0
- package/dist/types/components/Map/function/position.d.ts +5 -0
- package/dist/types/components/Map/index.d.ts +6 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +32 -32
- package/package.json +1 -1
- package/dist/es/CascaderLoadMore-CdndYSd1.js +0 -282
- package/dist/es/DatePicker-BSdiMSHq.js +0 -57
- package/dist/es/DiyDataTable-Bi4KyAh2.js +0 -366
- package/dist/es/Input-CJadFglX.js +0 -88
- package/dist/es/Map-rM-FhwBq.js +0 -2319
- package/dist/es/Table-BcTA1mjZ.js +0 -1177
package/package.json
CHANGED
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ee, useModel as te, ref as n, watch as L, nextTick as O, resolveDirective as le, openBlock as d, createElementBlock as k, withDirectives as ae, createBlock as w, unref as h, mergeProps as oe, withCtx as B, Fragment as ne, renderList as se, createVNode as re, toDisplayString as ie, createCommentVNode as ce, mergeModels as V } from "vue";
|
|
2
|
-
import { e as F, f as ue, g as pe, h as de, i as ve } from "./vendor-CxcudVpO.js";
|
|
3
|
-
import { w as fe } from "./utils-DRDkj6ga.js";
|
|
4
|
-
const me = { class: "w-100" }, ge = {
|
|
5
|
-
key: 1,
|
|
6
|
-
class: "cascader-select-empty"
|
|
7
|
-
}, he = {
|
|
8
|
-
key: 2,
|
|
9
|
-
class: "loading"
|
|
10
|
-
}, ye = /* @__PURE__ */ ee({
|
|
11
|
-
name: "CascaderLoadMore",
|
|
12
|
-
__name: "CascaderLoadMore",
|
|
13
|
-
props: /* @__PURE__ */ V({
|
|
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
|
-
default: "warp-cascade-panel"
|
|
84
|
-
},
|
|
85
|
-
teleported: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: !1
|
|
88
|
-
},
|
|
89
|
-
noDataText: {
|
|
90
|
-
type: String,
|
|
91
|
-
default: "暂无数据"
|
|
92
|
-
}
|
|
93
|
-
}, {
|
|
94
|
-
modelValue: {},
|
|
95
|
-
modelModifiers: {}
|
|
96
|
-
}),
|
|
97
|
-
emits: /* @__PURE__ */ V(["change", "removeTag"], ["update:modelValue"]),
|
|
98
|
-
setup(r, { expose: z, emit: A }) {
|
|
99
|
-
const a = r, s = te(r, "modelValue"), v = n(s.value || []), y = n(!1), i = n({
|
|
100
|
-
page: 1,
|
|
101
|
-
size: a.pageSize
|
|
102
|
-
}), C = n(void 0), S = n(!1), p = n(a.initialOptions || []), c = n(a.initialOptions || []), f = n(void 0), T = n(!1), H = {
|
|
103
|
-
expandTrigger: "hover",
|
|
104
|
-
checkStrictly: !1,
|
|
105
|
-
multiple: a.multiple,
|
|
106
|
-
emitPath: !0,
|
|
107
|
-
...a.cascaderProps
|
|
108
|
-
}, M = n(), b = n(), I = () => {
|
|
109
|
-
y.value = !0;
|
|
110
|
-
}, N = () => {
|
|
111
|
-
y.value = !1;
|
|
112
|
-
}, W = () => {
|
|
113
|
-
var e, l;
|
|
114
|
-
(l = (e = h(b).popperRef) == null ? void 0 : e.delayHide) == null || l.call(e);
|
|
115
|
-
}, $ = (e) => {
|
|
116
|
-
const l = /* @__PURE__ */ new Map();
|
|
117
|
-
return (e || []).forEach((o) => {
|
|
118
|
-
const t = `${o.value}`;
|
|
119
|
-
l.has(t) || l.set(t, o);
|
|
120
|
-
}), Array.from(l.values());
|
|
121
|
-
};
|
|
122
|
-
function x(e) {
|
|
123
|
-
const l = [];
|
|
124
|
-
function o(t, u = "") {
|
|
125
|
-
const g = u && (a.cascaderProps.emitPath ?? !0) ? `${u}/${t.label}` : t.label;
|
|
126
|
-
l.push({
|
|
127
|
-
...t,
|
|
128
|
-
value: t.value,
|
|
129
|
-
label: g
|
|
130
|
-
// 如果需要保留原始路径结构,可加上 fullPath 字段
|
|
131
|
-
// fullPath: currentPath
|
|
132
|
-
}), t.children && t.children.length > 0 && t.children.forEach((Y) => o(Y, g));
|
|
133
|
-
}
|
|
134
|
-
return e.forEach((t) => o(t)), l;
|
|
135
|
-
}
|
|
136
|
-
const E = async (e) => {
|
|
137
|
-
var u;
|
|
138
|
-
if (!a.forceSearch && !e) return;
|
|
139
|
-
const l = f.value === e || !f.value && !e;
|
|
140
|
-
if (l || (i.value.page = 1), l && C.value !== void 0 && i.value.page > C.value && !T.value) return;
|
|
141
|
-
T.value = !1, S.value = !0;
|
|
142
|
-
const t = await a.requestFunction(i.value.page, i.value.size, e);
|
|
143
|
-
if (t && Object.keys(t).length) {
|
|
144
|
-
C.value = t.totalPage;
|
|
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 = $([...c.value, ...g]) : c.value = g || [], v.value = F(s.value), p.value = x(c.value);
|
|
147
|
-
}
|
|
148
|
-
O(() => {
|
|
149
|
-
X();
|
|
150
|
-
}), f.value = e, S.value = !1;
|
|
151
|
-
}, U = () => {
|
|
152
|
-
i.value.page = i.value.page + 1, E(f.value);
|
|
153
|
-
}, j = (e) => {
|
|
154
|
-
s.value = e, v.value = e;
|
|
155
|
-
const l = q(e), o = a.onChange;
|
|
156
|
-
o && o(e, l);
|
|
157
|
-
}, q = (e) => {
|
|
158
|
-
const l = e || s.value;
|
|
159
|
-
return a.multiple ? p.value.filter(
|
|
160
|
-
(o) => (l || []).includes(o.value)
|
|
161
|
-
) : p.value.find((o) => o.value === l);
|
|
162
|
-
}, Z = () => {
|
|
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 || [], C.value = void 0, f.value = void 0;
|
|
164
|
-
}, R = A;
|
|
165
|
-
L(
|
|
166
|
-
() => a.initialOptions,
|
|
167
|
-
() => {
|
|
168
|
-
p.value = x(a.initialOptions), console.log("options.value", p.value), c.value = a.initialOptions;
|
|
169
|
-
},
|
|
170
|
-
{ immediate: !0 }
|
|
171
|
-
);
|
|
172
|
-
const _ = (e) => {
|
|
173
|
-
R("removeTag", e);
|
|
174
|
-
}, Q = (e) => {
|
|
175
|
-
T.value = e;
|
|
176
|
-
}, P = n(null), m = n(null), D = () => {
|
|
177
|
-
if (!y.value) return;
|
|
178
|
-
const e = b.value.popperRef.contentRef, l = e == null ? void 0 : e.querySelector(".el-cascader-panel .el-scrollbar__wrap");
|
|
179
|
-
l && (P.value = l, m.value = () => J(l), l.addEventListener("scroll", m.value));
|
|
180
|
-
}, G = () => {
|
|
181
|
-
P.value && m.value && (P.value.removeEventListener("scroll", m.value), P.value = null, m.value = null);
|
|
182
|
-
}, J = (e) => {
|
|
183
|
-
const { scrollTop: l, scrollHeight: o, clientHeight: t } = e;
|
|
184
|
-
let u = o - l;
|
|
185
|
-
t + 10 > u && U();
|
|
186
|
-
};
|
|
187
|
-
O(() => D()), L(y, (e) => {
|
|
188
|
-
e ? O(() => D()) : G();
|
|
189
|
-
});
|
|
190
|
-
const K = 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 = F(v.value), await O();
|
|
192
|
-
const l = q(s.value);
|
|
193
|
-
R("change", e, l);
|
|
194
|
-
const o = a.onChange;
|
|
195
|
-
o && o(e, l);
|
|
196
|
-
}, X = () => {
|
|
197
|
-
const l = b.value.popperRef.contentRef.querySelectorAll(".el-cascader-node__label");
|
|
198
|
-
console.log(l), l.forEach((o) => {
|
|
199
|
-
const t = document.createElement("span");
|
|
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
|
-
const u = t.offsetWidth;
|
|
202
|
-
document.body.removeChild(t), o instanceof HTMLElement && (o.style.whiteSpace = u > 240 ? "break-spaces" : "nowrap");
|
|
203
|
-
});
|
|
204
|
-
};
|
|
205
|
-
return z({
|
|
206
|
-
reset: Z,
|
|
207
|
-
getSelectedOption: q,
|
|
208
|
-
remoteMethod: E,
|
|
209
|
-
handleRequestParamsChanged: Q,
|
|
210
|
-
options: p,
|
|
211
|
-
cascderOptions: c
|
|
212
|
-
}), (e, l) => {
|
|
213
|
-
const o = le("click-outside");
|
|
214
|
-
return d(), k("div", me, [
|
|
215
|
-
ae((d(), w(h(ue), oe({
|
|
216
|
-
ref_key: "remoteSelectRef",
|
|
217
|
-
ref: M,
|
|
218
|
-
modelValue: s.value,
|
|
219
|
-
"onUpdate:modelValue": l[0] || (l[0] = (t) => s.value = t),
|
|
220
|
-
multiple: r.multiple,
|
|
221
|
-
placeholder: r.placeholder,
|
|
222
|
-
"remote-method": E,
|
|
223
|
-
teleported: !0,
|
|
224
|
-
clearable: r.clearable,
|
|
225
|
-
"collapse-tags": r.collapseTags,
|
|
226
|
-
"collapse-tags-tooltip": r.collapseTagsTooltip,
|
|
227
|
-
filterable: "",
|
|
228
|
-
height: "300",
|
|
229
|
-
remote: "",
|
|
230
|
-
"remote-show-suffix": "",
|
|
231
|
-
"reserve-keyword": "",
|
|
232
|
-
"popper-class": "hidden-dropdown",
|
|
233
|
-
class: "cascader-select"
|
|
234
|
-
}, e.$attrs, {
|
|
235
|
-
onChange: j,
|
|
236
|
-
onRemoveTag: _
|
|
237
|
-
}), {
|
|
238
|
-
default: B(() => [
|
|
239
|
-
(d(!0), k(ne, null, se(p.value, (t) => (d(), w(h(pe), {
|
|
240
|
-
key: t.value,
|
|
241
|
-
label: t.label,
|
|
242
|
-
value: t.value
|
|
243
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
244
|
-
]),
|
|
245
|
-
_: 1
|
|
246
|
-
}, 16, ["modelValue", "multiple", "placeholder", "clearable", "collapse-tags", "collapse-tags-tooltip"])), [
|
|
247
|
-
[o, W]
|
|
248
|
-
]),
|
|
249
|
-
re(h(de), {
|
|
250
|
-
ref_key: "popoverRef",
|
|
251
|
-
ref: b,
|
|
252
|
-
teleported: r.teleported,
|
|
253
|
-
placement: a.placement,
|
|
254
|
-
trigger: a.trigger,
|
|
255
|
-
"popper-class": a.popperClass,
|
|
256
|
-
"virtual-ref": M.value,
|
|
257
|
-
onShow: I,
|
|
258
|
-
onHide: N,
|
|
259
|
-
"virtual-triggering": ""
|
|
260
|
-
}, {
|
|
261
|
-
default: B(() => [
|
|
262
|
-
!S.value && c.value.length > 0 ? (d(), w(h(ve), {
|
|
263
|
-
key: 0,
|
|
264
|
-
modelValue: v.value,
|
|
265
|
-
"onUpdate:modelValue": l[1] || (l[1] = (t) => v.value = t),
|
|
266
|
-
border: !1,
|
|
267
|
-
props: H,
|
|
268
|
-
options: c.value,
|
|
269
|
-
class: "select-cascader-panel",
|
|
270
|
-
onChange: K
|
|
271
|
-
}, null, 8, ["modelValue", "options"])) : (d(), k("div", ge, ie(r.noDataText), 1)),
|
|
272
|
-
S.value ? (d(), k("div", he, "加载中...")) : ce("", !0)
|
|
273
|
-
]),
|
|
274
|
-
_: 1
|
|
275
|
-
}, 8, ["teleported", "placement", "trigger", "popper-class", "virtual-ref"])
|
|
276
|
-
]);
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
}), Pe = fe(ye);
|
|
280
|
-
export {
|
|
281
|
-
Pe as Z
|
|
282
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
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
|
-
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-DQKOTeth.js";
|
|
4
|
-
import { w as y } from "./utils-DRDkj6ga.js";
|
|
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
|
-
function P(e) {
|
|
7
|
-
const l = ["角", "分"], c = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], s = [
|
|
8
|
-
["元", "万", "亿"],
|
|
9
|
-
["", "拾", "佰", "仟"]
|
|
10
|
-
], n = e < 0 ? "负" : "";
|
|
11
|
-
e = Math.abs(e);
|
|
12
|
-
let r = "";
|
|
13
|
-
for (let a = 0; a < l.length; a++)
|
|
14
|
-
r += (c[Math.floor(e * 10 * Math.pow(10, a)) % 10] + l[a]).replace(/零./, "");
|
|
15
|
-
r = r || "整", e = Math.floor(e);
|
|
16
|
-
for (let a = 0; a < s[0].length && e > 0; a++) {
|
|
17
|
-
let t = "";
|
|
18
|
-
for (let o = 0; o < s[1].length && e > 0; o++)
|
|
19
|
-
t = c[e % 10] + s[1][o] + t, e = Math.floor(e / 10);
|
|
20
|
-
r = t.replace(/(零.)*零$/, "").replace(/^$/, "零") + s[0][a] + r;
|
|
21
|
-
}
|
|
22
|
-
return n + r.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
|
|
23
|
-
}
|
|
24
|
-
const T = /* @__PURE__ */ d({
|
|
25
|
-
name: "zh-date-picker",
|
|
26
|
-
__name: "DatePicker",
|
|
27
|
-
props: {
|
|
28
|
-
style: {},
|
|
29
|
-
class: {},
|
|
30
|
-
modelValue: {}
|
|
31
|
-
},
|
|
32
|
-
emits: ["update:modelValue", "change"],
|
|
33
|
-
setup(e, { emit: l }) {
|
|
34
|
-
const c = e, s = l, n = (t) => Array.isArray(t) ? [i(t[0], m), i(t[1], M)] : t && i(t, m), r = (t) => {
|
|
35
|
-
const o = n(t);
|
|
36
|
-
s("update:modelValue", o);
|
|
37
|
-
}, a = (t) => {
|
|
38
|
-
const o = n(t);
|
|
39
|
-
s("change", o);
|
|
40
|
-
};
|
|
41
|
-
return (t, o) => (u(), f("div", {
|
|
42
|
-
class: h([c.class, "zh-date-picker"])
|
|
43
|
-
}, [
|
|
44
|
-
_(g(k), A(t.$attrs, {
|
|
45
|
-
style: c.style,
|
|
46
|
-
"model-value": c.modelValue,
|
|
47
|
-
"onUpdate:modelValue": r,
|
|
48
|
-
onChange: a
|
|
49
|
-
}), null, 16, ["style", "model-value"])
|
|
50
|
-
], 2));
|
|
51
|
-
}
|
|
52
|
-
}), U = y(T);
|
|
53
|
-
export {
|
|
54
|
-
U as Z,
|
|
55
|
-
P as d,
|
|
56
|
-
O as v
|
|
57
|
-
};
|