zhihao-ui 1.3.53 → 1.3.54
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-BZ34efZZ.js → BaseInfo-Bz9HbxrR.js} +1 -1
- package/dist/es/{BaseItem-DxfKmzHN.js → BaseItem-DQKOTeth.js} +3 -3
- package/dist/es/{Button-ByWikGvS.js → Button-DSjKm2wO.js} +4 -4
- package/dist/es/CascaderLoadMore-CdndYSd1.js +282 -0
- package/dist/es/{DatePicker-BS2zGuNF.js → DatePicker-BSdiMSHq.js} +3 -3
- package/dist/es/{DetailHeader-Bdjj2rT_.js → DetailHeader-BaVN1zZA.js} +3 -3
- package/dist/es/{DetailSubTitle-oDZVGEDj.js → DetailSubTitle-BMIe2Qwe.js} +2 -2
- package/dist/es/{Dialog-6oittA9s.js → Dialog-MVXB7s2S.js} +3 -3
- package/dist/es/{DiyDataTable-BzfRDF0J.js → DiyDataTable-Bi4KyAh2.js} +4 -4
- package/dist/es/{EditInfoPair-CZXKGl2-.js → EditInfoPair-Zed59i0Z.js} +3 -3
- package/dist/es/{FileWrapper-B4nZf2F1.js → FileWrapper-DwYXt2R_.js} +4 -4
- package/dist/es/{Grid-anvIeL2d.js → Grid-CCcxjfAs.js} +2 -2
- package/dist/es/{InfoPair-C6PjunKe.js → InfoPair-DbQZtDZ4.js} +3 -3
- package/dist/es/{Input-v0wMSltt.js → Input-CJadFglX.js} +3 -3
- package/dist/es/{Loading-C86LqgY4.js → Loading-C9Te67Gr.js} +2 -2
- package/dist/es/Map-rM-FhwBq.js +2319 -0
- package/dist/es/{MessageBox-Mt0l51rJ.js → MessageBox-BzwToZ0E.js} +2 -2
- package/dist/es/{MoneyInput-DU9wly48.js → MoneyInput-Cildlxii.js} +5 -5
- package/dist/es/{PageHeadPanel-CJNtdEZb.js → PageHeadPanel-oLoxYR29.js} +2 -2
- package/dist/es/{Table-BgW-kh7S.js → Table-BcTA1mjZ.js} +8 -8
- package/dist/es/{ToolTips-DtkJa3Ld.js → ToolTips-H93PrmYL.js} +3 -3
- package/dist/es/index.js +23 -23
- package/dist/es/{utils-BXhGHET2.js → utils-DRDkj6ga.js} +1 -1
- package/dist/es/{vendor-DIFwbdTH.js → vendor-CxcudVpO.js} +10946 -10410
- package/dist/index.css +1 -1
- package/dist/types/components/CascaderLoadMore/CascaderLoadMore.vue.d.ts +18 -0
- package/dist/types/components/CascaderLoadMore/index.d.ts +30 -0
- package/dist/types/components/Map/Map.vue.d.ts +1 -0
- package/dist/types/components/Map/function/position.d.ts +2 -1
- package/dist/types/components/Map/function/ship/index.d.ts +1 -0
- package/dist/types/components/Map/index.d.ts +3 -0
- package/dist/types/components/Map/interface/position.d.ts +2 -0
- package/dist/types/components/ToolTips/index.d.ts +6 -6
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +41 -41
- package/package.json +3 -5
- package/dist/es/CascaderLoadMore-CF_J-i8H.js +0 -261
- package/dist/es/Map-CGiEKZ7_.js +0 -2280
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zhihao-ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.54",
|
|
4
4
|
"description": "components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/umd/index.umd.cjs",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"sideEffects": [
|
|
24
24
|
"./dist/index.css"
|
|
25
25
|
],
|
|
26
|
-
|
|
27
26
|
"scripts": {
|
|
28
27
|
"build": "run-s build-only move-style",
|
|
29
28
|
"build-only": "run-p build-es build-umd",
|
|
@@ -38,12 +37,11 @@
|
|
|
38
37
|
"@fortawesome/fontawesome-svg-core": "^6.5.1",
|
|
39
38
|
"@fortawesome/free-solid-svg-icons": "^6.5.1",
|
|
40
39
|
"@fortawesome/vue-fontawesome": "^3.0.6",
|
|
41
|
-
"@popperjs/core": "^2.11.8",
|
|
42
40
|
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
|
43
41
|
"async-validator": "^4.2.5"
|
|
44
42
|
},
|
|
45
43
|
"devDependencies": {
|
|
46
|
-
"
|
|
47
|
-
"
|
|
44
|
+
"@zhihao-ui/components": "workspace:*",
|
|
45
|
+
"vite-plugin-dts": "^3.9.1"
|
|
48
46
|
}
|
|
49
47
|
}
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ee, useModel as le, ref as r, watch as L, nextTick as q, resolveDirective as ae, openBlock as d, createElementBlock as M, withDirectives as te, createBlock as E, unref as h, mergeProps as oe, withCtx as w, Fragment as re, renderList as se, createVNode as ne, createCommentVNode as D, mergeModels as x } from "vue";
|
|
2
|
-
import { e as z, f as ce, g as ue, h as ie, i as pe } from "./vendor-DIFwbdTH.js";
|
|
3
|
-
import { w as ve } from "./utils-BXhGHET2.js";
|
|
4
|
-
const de = { class: "w-100" }, fe = {
|
|
5
|
-
key: 1,
|
|
6
|
-
class: "loading"
|
|
7
|
-
}, ge = /* @__PURE__ */ ee({
|
|
8
|
-
name: "CascaderLoadMore",
|
|
9
|
-
__name: "CascaderLoadMore",
|
|
10
|
-
props: /* @__PURE__ */ x({
|
|
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__ */ x(["change", "removeTag"], ["update:modelValue"]),
|
|
87
|
-
setup(i, { expose: A, emit: H }) {
|
|
88
|
-
const t = i, s = le(i, "modelValue"), v = r(s.value || []), y = r(!1), n = r({
|
|
89
|
-
page: 1,
|
|
90
|
-
size: t.pageSize
|
|
91
|
-
}), C = r(void 0), S = r(!1), c = r(t.initialOptions || []), u = r(t.initialOptions || []), f = r(void 0), b = r(!1), I = {
|
|
92
|
-
expandTrigger: "hover",
|
|
93
|
-
checkStrictly: !1,
|
|
94
|
-
multiple: t.multiple,
|
|
95
|
-
emitPath: !0,
|
|
96
|
-
...t.cascaderProps
|
|
97
|
-
}, R = r(), O = r(), N = () => {
|
|
98
|
-
y.value = !0;
|
|
99
|
-
}, $ = () => {
|
|
100
|
-
y.value = !1;
|
|
101
|
-
}, U = () => {
|
|
102
|
-
var e, l;
|
|
103
|
-
(l = (e = h(O).popperRef) == null ? void 0 : e.delayHide) == null || l.call(e);
|
|
104
|
-
}, j = (e) => {
|
|
105
|
-
const l = /* @__PURE__ */ new Map();
|
|
106
|
-
return (e || []).forEach((o) => {
|
|
107
|
-
const a = `${o.value}`;
|
|
108
|
-
l.has(a) || l.set(a, o);
|
|
109
|
-
}), Array.from(l.values());
|
|
110
|
-
};
|
|
111
|
-
function V(e) {
|
|
112
|
-
const l = [];
|
|
113
|
-
function o(a, p = "") {
|
|
114
|
-
const m = p && (t.cascaderProps.emitPath ?? !0) ? `${p}/${a.label}` : a.label;
|
|
115
|
-
l.push({
|
|
116
|
-
...a,
|
|
117
|
-
value: a.value,
|
|
118
|
-
label: m
|
|
119
|
-
// 如果需要保留原始路径结构,可加上 fullPath 字段
|
|
120
|
-
// fullPath: currentPath
|
|
121
|
-
}), a.children && a.children.length > 0 && a.children.forEach((Y) => o(Y, m));
|
|
122
|
-
}
|
|
123
|
-
return e.forEach((a) => o(a)), l;
|
|
124
|
-
}
|
|
125
|
-
const k = async (e) => {
|
|
126
|
-
var p;
|
|
127
|
-
if (!t.forceSearch && !e) return;
|
|
128
|
-
const l = f.value === e || !f.value && !e;
|
|
129
|
-
if (l || (n.value.page = 1), l && C.value !== void 0 && n.value.page > C.value && !b.value) return;
|
|
130
|
-
b.value = !1, S.value = !0;
|
|
131
|
-
const a = await t.requestFunction(n.value.page, n.value.size, e);
|
|
132
|
-
if (a && Object.keys(a).length) {
|
|
133
|
-
C.value = a.totalPage;
|
|
134
|
-
const m = (p = a == null ? void 0 : a.list) == null ? void 0 : p.map(t.handleOptionsFunction);
|
|
135
|
-
l && n.value.page !== 1 ? u.value = j([...u.value, ...m]) : u.value = m || [], v.value = z(s.value), c.value = V(u.value);
|
|
136
|
-
}
|
|
137
|
-
f.value = e, S.value = !1;
|
|
138
|
-
}, Z = () => {
|
|
139
|
-
n.value.page = n.value.page + 1, k(f.value);
|
|
140
|
-
}, _ = (e) => {
|
|
141
|
-
s.value = e, v.value = e;
|
|
142
|
-
const l = T(e), o = t.onChange;
|
|
143
|
-
o && o(e, l);
|
|
144
|
-
}, T = (e) => {
|
|
145
|
-
const l = e || s.value;
|
|
146
|
-
return t.multiple ? c.value.filter(
|
|
147
|
-
(o) => (l || []).includes(o.value)
|
|
148
|
-
) : c.value.find((o) => o.value === l);
|
|
149
|
-
}, Q = () => {
|
|
150
|
-
s.value = t.initialValue, v.value = t.initialValue, n.value.page = 1, n.value.size = t.pageSize, c.value = [], C.value = void 0, f.value = void 0;
|
|
151
|
-
}, B = H;
|
|
152
|
-
L(
|
|
153
|
-
() => t.initialOptions,
|
|
154
|
-
() => {
|
|
155
|
-
c.value = V(t.initialOptions), console.log("options.value", c.value), u.value = t.initialOptions;
|
|
156
|
-
},
|
|
157
|
-
{ immediate: !0 }
|
|
158
|
-
);
|
|
159
|
-
const W = (e) => {
|
|
160
|
-
B("removeTag", e);
|
|
161
|
-
}, G = (e) => {
|
|
162
|
-
b.value = e;
|
|
163
|
-
}, P = r(null), g = r(null), F = () => {
|
|
164
|
-
if (!y.value) return;
|
|
165
|
-
const e = O.value.popperRef.contentRef, l = e == null ? void 0 : e.querySelector(".el-cascader-panel .el-scrollbar__wrap");
|
|
166
|
-
l && (P.value = l, g.value = () => K(l), l.addEventListener("scroll", g.value));
|
|
167
|
-
}, J = () => {
|
|
168
|
-
P.value && g.value && (P.value.removeEventListener("scroll", g.value), P.value = null, g.value = null);
|
|
169
|
-
}, K = (e) => {
|
|
170
|
-
const { scrollTop: l, scrollHeight: o, clientHeight: a } = e;
|
|
171
|
-
let p = o - l;
|
|
172
|
-
a + 10 > p && Z();
|
|
173
|
-
};
|
|
174
|
-
q(() => F()), L(y, (e) => {
|
|
175
|
-
e ? q(() => F()) : J();
|
|
176
|
-
});
|
|
177
|
-
const X = async (e) => {
|
|
178
|
-
(t.cascaderProps.emitPath ?? !0) && Array.isArray(e) ? t.multiple ? s.value = e.map((a) => a.at(-1)) : s.value = e.at(-1) : s.value = z(v.value), await q();
|
|
179
|
-
const l = T(s.value);
|
|
180
|
-
B("change", e, l);
|
|
181
|
-
const o = t.onChange;
|
|
182
|
-
o && o(e, l);
|
|
183
|
-
};
|
|
184
|
-
return A({
|
|
185
|
-
reset: Q,
|
|
186
|
-
getSelectedOption: T,
|
|
187
|
-
remoteMethod: k,
|
|
188
|
-
handleRequestParamsChanged: G,
|
|
189
|
-
options: c,
|
|
190
|
-
cascderOptions: u
|
|
191
|
-
}), (e, l) => {
|
|
192
|
-
const o = ae("click-outside");
|
|
193
|
-
return d(), M("div", de, [
|
|
194
|
-
te((d(), E(h(ce), oe({
|
|
195
|
-
ref_key: "remoteSelectRef",
|
|
196
|
-
ref: R,
|
|
197
|
-
modelValue: s.value,
|
|
198
|
-
"onUpdate:modelValue": l[0] || (l[0] = (a) => s.value = a),
|
|
199
|
-
multiple: i.multiple,
|
|
200
|
-
placeholder: i.placeholder,
|
|
201
|
-
"remote-method": k,
|
|
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: _,
|
|
215
|
-
onRemoveTag: W
|
|
216
|
-
}), {
|
|
217
|
-
default: w(() => [
|
|
218
|
-
(d(!0), M(re, null, se(c.value, (a) => (d(), E(h(ue), {
|
|
219
|
-
key: a.value,
|
|
220
|
-
label: a.label,
|
|
221
|
-
value: a.value
|
|
222
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
223
|
-
]),
|
|
224
|
-
_: 1
|
|
225
|
-
}, 16, ["modelValue", "multiple", "placeholder", "clearable", "collapse-tags", "collapse-tags-tooltip"])), [
|
|
226
|
-
[o, U]
|
|
227
|
-
]),
|
|
228
|
-
ne(h(ie), {
|
|
229
|
-
ref_key: "popoverRef",
|
|
230
|
-
ref: O,
|
|
231
|
-
teleported: !0,
|
|
232
|
-
placement: t.placement,
|
|
233
|
-
trigger: t.trigger,
|
|
234
|
-
"popper-class": t.popperClass,
|
|
235
|
-
"virtual-ref": R.value,
|
|
236
|
-
onShow: N,
|
|
237
|
-
onHide: $,
|
|
238
|
-
"virtual-triggering": ""
|
|
239
|
-
}, {
|
|
240
|
-
default: w(() => [
|
|
241
|
-
!S.value || u.value.length > 0 ? (d(), E(h(pe), {
|
|
242
|
-
key: 0,
|
|
243
|
-
modelValue: v.value,
|
|
244
|
-
"onUpdate:modelValue": l[1] || (l[1] = (a) => v.value = a),
|
|
245
|
-
border: !1,
|
|
246
|
-
props: I,
|
|
247
|
-
options: u.value,
|
|
248
|
-
class: "select-cascader-panel",
|
|
249
|
-
onChange: X
|
|
250
|
-
}, null, 8, ["modelValue", "options"])) : D("", !0),
|
|
251
|
-
S.value ? (d(), M("div", fe, "加载中...")) : D("", !0)
|
|
252
|
-
]),
|
|
253
|
-
_: 1
|
|
254
|
-
}, 8, ["placement", "trigger", "popper-class", "virtual-ref"])
|
|
255
|
-
]);
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
}), Ce = ve(ge);
|
|
259
|
-
export {
|
|
260
|
-
Ce as Z
|
|
261
|
-
};
|