zhihao-ui 1.3.47 → 1.3.51

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 (51) hide show
  1. package/dist/es/{BaseInfo-BQ9mgGZQ.js → BaseInfo-Cu3ME-K_.js} +1 -1
  2. package/dist/es/{BaseItem-CEFYU-vZ.js → BaseItem-Co7KlYD6.js} +3 -3
  3. package/dist/es/{Button-BdGo3Kfv.js → Button-Dp3Eoz3O.js} +2 -2
  4. package/dist/es/DatePicker-BilQVlgi.js +57 -0
  5. package/dist/es/{DetailHeader-70m7dEou.js → DetailHeader-DTHE-pQa.js} +3 -3
  6. package/dist/es/{DetailSubTitle-CqcoW7Qc.js → DetailSubTitle-BG-q2NNN.js} +2 -2
  7. package/dist/es/{Dialog-Cib_m5sM.js → Dialog-B0N_UsO3.js} +3 -3
  8. package/dist/es/DiyDataTable-BQaaClFf.js +331 -0
  9. package/dist/es/{EditInfoPair-CIN0LGcX.js → EditInfoPair-DwrwCanm.js} +3 -3
  10. package/dist/es/{FileWrapper-kRc7s3wS.js → FileWrapper-BDK8YvRB.js} +4 -4
  11. package/dist/es/{Grid-YHrIHuuu.js → Grid-pVjqXcmJ.js} +2 -2
  12. package/dist/es/{InfoPair-Dg0qbY3Z.js → InfoPair-lu2zDhpQ.js} +3 -3
  13. package/dist/es/{Input-uOt745UZ.js → Input-Du4ztfNG.js} +14 -14
  14. package/dist/es/{Loading-C_6ERpeb.js → Loading-Dc9138dn.js} +2 -2
  15. package/dist/es/Map-B129Uv_v.js +2280 -0
  16. package/dist/es/{MessageBox-h_sFrr4D.js → MessageBox-CJMqwEqr.js} +2 -2
  17. package/dist/es/{MoneyInput-n52E-q_5.js → MoneyInput-CJxSKPIk.js} +5 -5
  18. package/dist/es/{PageHeadPanel-DLs1xYME.js → PageHeadPanel-BChW8Tal.js} +2 -2
  19. package/dist/es/Table-CzNjEPnP.js +1155 -0
  20. package/dist/es/{ToolTips-CSVL9wbb.js → ToolTips-Y6yG2q7L.js} +3 -3
  21. package/dist/es/index.js +60 -77
  22. package/dist/es/{utils-UjENBVnX.js → utils-Co2iJhr8.js} +1 -1
  23. package/dist/es/{vendor-9390iK3y.js → vendor-Crdostgq.js} +26119 -30625
  24. package/dist/index.css +1 -1
  25. package/dist/types/components/BaseItem/BaseItem.vue.d.ts +1 -1
  26. package/dist/types/components/BaseItem/index.d.ts +10 -10
  27. package/dist/types/components/BaseItem/types.d.ts +1 -1
  28. package/dist/types/components/DetailHeader/index.d.ts +3 -3
  29. package/dist/types/components/DetailHeader/types.d.ts +1 -1
  30. package/dist/types/components/Dialog/Dialog.vue.d.ts +16 -16
  31. package/dist/types/components/Dialog/index.d.ts +24 -24
  32. package/dist/types/components/DiyDataTable/DiyDataTable.vue.d.ts +1 -386
  33. package/dist/types/components/DiyDataTable/index.d.ts +0 -1131
  34. package/dist/types/components/DiyDataTable/type.d.ts +1 -17
  35. package/dist/types/components/Map/Map.vue.d.ts +101 -138
  36. package/dist/types/components/Map/components/scaleLine.vue.d.ts +2 -1
  37. package/dist/types/components/Map/components/zoomControl.vue.d.ts +7 -3
  38. package/dist/types/components/Map/index.d.ts +324 -390
  39. package/dist/types/components/Map/interface/index.d.ts +6 -13
  40. package/dist/types/components/Map/types.d.ts +1 -13
  41. package/dist/types/components/Table/types.d.ts +0 -1
  42. package/dist/types/components/ToolTips/index.d.ts +12 -12
  43. package/dist/types/components/index.d.ts +0 -1
  44. package/dist/umd/index.css +1 -1
  45. package/dist/umd/index.umd.cjs +118 -604
  46. package/package.json +1 -1
  47. package/dist/es/CascaderLoadMore-1ENwzKY8.js +0 -261
  48. package/dist/es/DatePicker-DvSoaSq9.js +0 -73
  49. package/dist/es/DiyDataTable-bO--1zPQ.js +0 -366
  50. package/dist/es/Map-BURr7_36.js +0 -2528
  51. package/dist/es/Table-Cr4k_o89.js +0 -1167
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zhihao-ui",
3
- "version": "1.3.47",
3
+ "version": "1.3.51",
4
4
  "description": "components",
5
5
  "type": "module",
6
6
  "main": "./dist/umd/index.umd.cjs",
@@ -1,261 +0,0 @@
1
- import { defineComponent as ee, useModel as le, ref as s, watch as B, nextTick as D, resolveDirective as ae, openBlock as v, createElementBlock as T, withDirectives as te, createBlock as q, unref as h, mergeProps as oe, withCtx as F, Fragment as se, renderList as re, createVNode as ne, createCommentVNode as L, mergeModels as R } from "vue";
2
- import { e as x, f as ce, g as ue, h as ie, i as pe } from "./vendor-9390iK3y.js";
3
- import { w as de } from "./utils-UjENBVnX.js";
4
- const ve = { class: "w-100" }, fe = {
5
- key: 1,
6
- class: "loading"
7
- }, ge = /* @__PURE__ */ ee({
8
- name: "CascaderLoadMore",
9
- __name: "CascaderLoadMore",
10
- props: /* @__PURE__ */ R({
11
- onChange: {
12
- type: Function,
13
- required: !1
14
- },
15
- // 默认选中项
16
- initialValue: {
17
- type: [String, Number, Array],
18
- required: !1
19
- },
20
- pageSize: {
21
- type: Number,
22
- default: 10
23
- },
24
- // 数据请求函数
25
- requestFunction: {
26
- type: Function,
27
- required: !0
28
- },
29
- // 选项处理函数
30
- handleOptionsFunction: {
31
- type: Function,
32
- required: !0
33
- },
34
- placeholder: {
35
- type: String,
36
- default: "输入关键字搜索名称"
37
- },
38
- // 强制搜索:不输入内容也进行搜索,即点击下拉默认展示数据
39
- forceSearch: {
40
- type: Boolean,
41
- default: !0
42
- },
43
- // 初始下拉项用于回显数据
44
- initialOptions: {
45
- type: Array,
46
- required: !1,
47
- default: () => []
48
- },
49
- // 多选,默认false
50
- multiple: {
51
- type: Boolean,
52
- default: !1
53
- },
54
- collapseTags: {
55
- type: Boolean,
56
- default: !1
57
- },
58
- collapseTagsTooltip: {
59
- type: Boolean,
60
- default: !1
61
- },
62
- clearable: {
63
- type: Boolean,
64
- default: !0
65
- },
66
- cascaderProps: {
67
- type: Object,
68
- default: () => ({})
69
- },
70
- placement: {
71
- type: String,
72
- default: "bottom-start"
73
- },
74
- trigger: {
75
- type: String,
76
- default: "click"
77
- },
78
- popperClass: {
79
- type: String,
80
- default: "warp-cascade-panel"
81
- }
82
- }, {
83
- modelValue: {},
84
- modelModifiers: {}
85
- }),
86
- emits: /* @__PURE__ */ R(["removeTag"], ["update:modelValue"]),
87
- setup(i, { expose: z, emit: H }) {
88
- const t = i, r = le(i, "modelValue"), d = s(r.value || []), y = s(!1), n = s({
89
- page: 1,
90
- size: t.pageSize
91
- }), C = s(void 0), P = s(!1), c = s(t.initialOptions || []), u = s(t.initialOptions || []), f = s(void 0), b = s(!1);
92
- console.log(t.cascaderProps, "props.cascaderProps");
93
- const I = {
94
- expandTrigger: "hover",
95
- checkStrictly: !1,
96
- multiple: t.multiple,
97
- emitPath: !0,
98
- ...t.cascaderProps
99
- }, M = s(), E = s(), N = () => {
100
- y.value = !0;
101
- }, $ = () => {
102
- y.value = !1;
103
- }, A = () => {
104
- var e, a;
105
- (a = (e = h(E).popperRef) == null ? void 0 : e.delayHide) == null || a.call(e);
106
- }, U = (e) => {
107
- const a = /* @__PURE__ */ new Map();
108
- return (e || []).forEach((o) => {
109
- const l = `${o.value}`;
110
- a.has(l) || a.set(l, o);
111
- }), Array.from(a.values());
112
- };
113
- function V(e) {
114
- const a = [];
115
- function o(l, p = "") {
116
- const m = p && (t.cascaderProps.emitPath ?? !0) ? `${p}/${l.label}` : l.label;
117
- a.push({
118
- ...l,
119
- value: l.value,
120
- label: m
121
- // 如果需要保留原始路径结构,可加上 fullPath 字段
122
- // fullPath: currentPath
123
- }), l.children && l.children.length > 0 && l.children.forEach((Y) => o(Y, m));
124
- }
125
- return e.forEach((l) => o(l)), a;
126
- }
127
- const O = async (e) => {
128
- var p;
129
- if (!t.forceSearch && !e) return;
130
- const a = f.value === e || !f.value && !e;
131
- if (a || (n.value.page = 1), a && C.value !== void 0 && n.value.page > C.value && !b.value) return;
132
- b.value = !1, P.value = !0;
133
- const l = await t.requestFunction(n.value.page, n.value.size, e);
134
- if (l && Object.keys(l).length) {
135
- C.value = l.totalPage;
136
- const m = (p = l == null ? void 0 : l.list) == null ? void 0 : p.map(t.handleOptionsFunction);
137
- a && n.value.page !== 1 ? u.value = U([...u.value, ...m]) : u.value = m || [], d.value = x(r.value), c.value = V(u.value);
138
- }
139
- f.value = e, P.value = !1;
140
- }, j = () => {
141
- n.value.page = n.value.page + 1, O(f.value);
142
- }, Z = (e) => {
143
- r.value = e, d.value = e;
144
- const a = k(e), o = t.onChange;
145
- o && o(e, a);
146
- }, k = (e) => {
147
- const a = e || r.value;
148
- return t.multiple ? c.value.filter(
149
- (o) => (a || []).includes(o.value)
150
- ) : c.value.find((o) => o.value === a);
151
- }, _ = () => {
152
- r.value = t.initialValue, d.value = t.initialValue, n.value.page = 1, n.value.size = t.pageSize, c.value = [], C.value = void 0, f.value = void 0;
153
- }, Q = H;
154
- B(
155
- () => t.initialOptions,
156
- () => {
157
- c.value = V(t.initialOptions), console.log("options.value", c.value), u.value = t.initialOptions;
158
- },
159
- { immediate: !0 }
160
- );
161
- const W = (e) => {
162
- Q("removeTag", e);
163
- }, G = (e) => {
164
- b.value = e;
165
- }, S = s(null), g = s(null), w = () => {
166
- if (!y.value) return;
167
- const e = document == null ? void 0 : document.querySelector(".el-cascader-panel .el-scrollbar__wrap");
168
- console.log("selectDom", e), e && (S.value = e, g.value = () => K(e), e.addEventListener("scroll", g.value));
169
- }, J = () => {
170
- S.value && g.value && (S.value.removeEventListener("scroll", g.value), S.value = null, g.value = null);
171
- }, K = (e) => {
172
- const { scrollTop: a, scrollHeight: o, clientHeight: l } = e;
173
- let p = o - a;
174
- l + 10 > p && (j(), console.log("handleScroll", "触底了"));
175
- };
176
- D(() => w()), B(y, (e) => {
177
- e ? D(() => w()) : J();
178
- });
179
- const X = (e) => {
180
- t.cascaderProps.emitPath ?? !0 ? t.multiple ? r.value = e.map((l) => l.at(-1)) : r.value = e.at(-1) : r.value = x(d.value);
181
- const a = k(r.value), o = t.onChange;
182
- o && o(e, a);
183
- };
184
- return z({
185
- reset: _,
186
- getSelectedOption: k,
187
- remoteMethod: O,
188
- handleRequestParamsChanged: G,
189
- options: c,
190
- cascderOptions: u
191
- }), (e, a) => {
192
- const o = ae("click-outside");
193
- return v(), T("div", ve, [
194
- te((v(), q(h(ce), oe({
195
- ref_key: "remoteSelectRef",
196
- ref: M,
197
- modelValue: r.value,
198
- "onUpdate:modelValue": a[0] || (a[0] = (l) => r.value = l),
199
- multiple: i.multiple,
200
- placeholder: i.placeholder,
201
- "remote-method": O,
202
- teleported: !0,
203
- clearable: i.clearable,
204
- "collapse-tags": i.collapseTags,
205
- "collapse-tags-tooltip": i.collapseTagsTooltip,
206
- filterable: "",
207
- height: "300",
208
- remote: "",
209
- "remote-show-suffix": "",
210
- "reserve-keyword": "",
211
- "popper-class": "hidden-dropdown",
212
- class: "cascader-select"
213
- }, e.$attrs, {
214
- onChange: Z,
215
- onRemoveTag: W
216
- }), {
217
- default: F(() => [
218
- (v(!0), T(se, null, re(c.value, (l) => (v(), q(h(ue), {
219
- key: l.value,
220
- label: l.label,
221
- value: l.value
222
- }, null, 8, ["label", "value"]))), 128))
223
- ]),
224
- _: 1
225
- }, 16, ["modelValue", "multiple", "placeholder", "clearable", "collapse-tags", "collapse-tags-tooltip"])), [
226
- [o, A]
227
- ]),
228
- ne(h(ie), {
229
- ref_key: "popoverRef",
230
- ref: E,
231
- teleported: !0,
232
- placement: t.placement,
233
- trigger: t.trigger,
234
- "popper-class": t.popperClass,
235
- "virtual-ref": M.value,
236
- onShow: N,
237
- onHide: $,
238
- "virtual-triggering": ""
239
- }, {
240
- default: F(() => [
241
- !P.value || u.value.length > 0 ? (v(), q(h(pe), {
242
- key: 0,
243
- modelValue: d.value,
244
- "onUpdate:modelValue": a[1] || (a[1] = (l) => d.value = l),
245
- border: !1,
246
- props: I,
247
- options: u.value,
248
- class: "select-cascader-panel",
249
- onChange: X
250
- }, null, 8, ["modelValue", "options"])) : L("", !0),
251
- P.value ? (v(), T("div", fe, "加载中...")) : L("", !0)
252
- ]),
253
- _: 1
254
- }, 8, ["placement", "trigger", "popper-class", "virtual-ref"])
255
- ]);
256
- };
257
- }
258
- }), Ce = de(ge);
259
- export {
260
- Ce as Z
261
- };
@@ -1,73 +0,0 @@
1
- import { defineComponent as m, openBlock as u, createElementBlock as h, normalizeClass as d, createVNode as g, unref as _, mergeProps as A } from "vue";
2
- import { j as D, k as E } from "./vendor-9390iK3y.js";
3
- import { D as p, a as M, L as f, b as T } from "./BaseItem-CEFYU-vZ.js";
4
- import { w as b } from "./utils-UjENBVnX.js";
5
- const i = (e, t = M) => e ? D(e).format(t).replace("Invalid date", p) : p, O = (e) => typeof e == "number" ? !0 : typeof e == "string" ? !isNaN(parseFloat(e)) : !1;
6
- function P(e) {
7
- const t = ["角", "分"], a = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], s = [
8
- ["元", "万", "亿"],
9
- ["", "拾", "佰", "仟"]
10
- ], n = e < 0 ? "负" : "";
11
- e = Math.abs(e);
12
- let l = "";
13
- for (let o = 0; o < t.length; o++)
14
- l += (a[Math.floor(e * 10 * Math.pow(10, o)) % 10] + t[o]).replace(/零./, "");
15
- l = l || "整", e = Math.floor(e);
16
- for (let o = 0; o < s[0].length && e > 0; o++) {
17
- let r = "";
18
- for (let c = 0; c < s[1].length && e > 0; c++)
19
- r = a[e % 10] + s[1][c] + r, e = Math.floor(e / 10);
20
- l = r.replace(/(零.)*零$/, "").replace(/^$/, "零") + s[0][o] + l;
21
- }
22
- return n + l.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
23
- }
24
- function y(e) {
25
- let t = e.replace(/^#/, "");
26
- t.length === 3 && (t = t[0] + t[0] + t[1] + t[1] + t[2] + t[2]);
27
- const a = parseInt(t.slice(0, 2), 16), s = parseInt(t.slice(2, 4), 16), n = parseInt(t.slice(4, 6), 16);
28
- return [a, s, n];
29
- }
30
- function F(e) {
31
- const [t, a, s] = e;
32
- return 0.299 * t + 0.587 * a + 0.114 * s;
33
- }
34
- function R(e, t = 128) {
35
- e === "white" && (e = "#fff"), e === "black" && (e = "#000");
36
- const a = y(e);
37
- return F(a) > t ? "black" : "white";
38
- }
39
- const k = /* @__PURE__ */ m({
40
- name: "zh-date-picker",
41
- __name: "DatePicker",
42
- props: {
43
- style: {},
44
- class: {},
45
- modelValue: {}
46
- },
47
- emits: ["update:modelValue", "change"],
48
- setup(e, { emit: t }) {
49
- const a = e, s = t, n = (r) => Array.isArray(r) ? [i(r[0], f), i(r[1], T)] : r && i(r, f), l = (r) => {
50
- const c = n(r);
51
- s("update:modelValue", c);
52
- }, o = (r) => {
53
- const c = n(r);
54
- s("change", c);
55
- };
56
- return (r, c) => (u(), h("div", {
57
- class: d([a.class, "zh-date-picker"])
58
- }, [
59
- g(_(E), A(r.$attrs, {
60
- style: a.style,
61
- "model-value": a.modelValue,
62
- "onUpdate:modelValue": l,
63
- onChange: o
64
- }), null, 16, ["style", "model-value"])
65
- ], 2));
66
- }
67
- }), U = b(k);
68
- export {
69
- U as Z,
70
- P as d,
71
- R as g,
72
- O as v
73
- };