zhihao-ui 1.2.20 → 1.2.22

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 (59) hide show
  1. package/dist/es/{BaseInfo-Dr298ctb.js → BaseInfo-DCB7xgRw.js} +1 -1
  2. package/dist/es/{Button-CYr52jII.js → Button-Va8xfPJd.js} +2 -2
  3. package/dist/es/{DatePicker-vGQGWrmB.js → DatePicker-BrD1XS6-.js} +2 -2
  4. package/dist/es/DetailHeader-B9ttfBlv.js +59 -0
  5. package/dist/es/{DetailSubTitle-Cgs5HrKC.js → DetailSubTitle-BgbefcLD.js} +2 -2
  6. package/dist/es/{Dialog-stUaKQ4m.js → Dialog-CnqJMaPI.js} +31 -34
  7. package/dist/es/DiyDataTable-DHGMMFO9.js +315 -0
  8. package/dist/es/{EditInfoPair-DwwAGFc6.js → EditInfoPair-XiseN2F2.js} +3 -3
  9. package/dist/es/{FileWrapper-brjp8Thj.js → FileWrapper-CAwHicjK.js} +4 -4
  10. package/dist/es/{Grid-CIMCXeIw.js → Grid-CshEwvAH.js} +1 -1
  11. package/dist/es/{InfoPair-DZL6Vegw.js → InfoPair-DhVT8u-f.js} +3 -3
  12. package/dist/es/{Input-C4aIqSby.js → Input-CeiPnMtt.js} +3 -3
  13. package/dist/es/{Loading-DhEOgvVz.js → Loading-bv2DpqBO.js} +2 -2
  14. package/dist/es/Map-DhceUygQ.js +2020 -0
  15. package/dist/es/{MessageBox-d6upGeyX.js → MessageBox-2Vpy3Mva.js} +2 -2
  16. package/dist/es/{MoneyInput-DLMJRug1.js → MoneyInput-Deg1aj66.js} +7 -7
  17. package/dist/es/{PageHeadPanel-CldjeRYl.js → PageHeadPanel-BWjWkx8n.js} +2 -2
  18. package/dist/es/{Table-DwDzhuHY.js → Table-KSl_JT2q.js} +94 -94
  19. package/dist/es/{ToolTips-CLcRoFO4.js → ToolTips-Bw2lHQxC.js} +3 -3
  20. package/dist/es/index.js +21 -21
  21. package/dist/es/{utils-CbI5IWJJ.js → utils-D-zYpBSZ.js} +3 -3
  22. package/dist/es/{vendor-AIl6iHcE.js → vendor-gTOtiVzA.js} +6895 -6495
  23. package/dist/index.css +1 -1
  24. package/dist/types/components/DetailHeader/index.d.ts +9 -0
  25. package/dist/types/components/DetailHeader/types.d.ts +1 -0
  26. package/dist/types/components/Dialog/Dialog.vue.d.ts +2 -4
  27. package/dist/types/components/Dialog/index.d.ts +5 -10
  28. package/dist/types/components/DiyDataTable/DiyDataTable.vue.d.ts +8 -1
  29. package/dist/types/components/DiyDataTable/index.d.ts +12 -0
  30. package/dist/types/components/DiyDataTable/type.d.ts +3 -1
  31. package/dist/types/components/Map/Map.vue.d.ts +60 -5
  32. package/dist/types/components/Map/components/scaleLine.vue.d.ts +3 -1
  33. package/dist/types/components/Map/components/toolPanel.vue.d.ts +4 -0
  34. package/dist/types/components/Map/config.d.ts +2 -0
  35. package/dist/types/components/Map/index.d.ts +174 -9
  36. package/dist/types/components/Map/interface/entity/render.d.ts +12 -0
  37. package/dist/types/components/Map/interface/entity/shipInfoVo.d.ts +21 -3
  38. package/dist/types/components/Map/interface/entity/shipMapData.d.ts +2 -1
  39. package/dist/types/components/Map/render/canvasRender/canvasRender.d.ts +2 -1
  40. package/dist/types/components/Map/render/canvasRender/geometry.d.ts +3 -0
  41. package/dist/types/components/Map/render/canvasRender/renderCustomOverlay.d.ts +3 -1
  42. package/dist/types/components/Map/render/canvasRender/renderShipStyle.d.ts +3 -1
  43. package/dist/types/components/Map/render/canvasRender/renderTrackStyle.d.ts +5 -1
  44. package/dist/types/components/Map/render/drawPolygon.d.ts +4 -0
  45. package/dist/types/components/Map/render/renderDashboard.d.ts +3 -0
  46. package/dist/types/components/Map/render/renderMarker.d.ts +4 -3
  47. package/dist/types/components/Map/render/renderShip.d.ts +5 -2
  48. package/dist/types/components/Map/render/renderTrack.d.ts +3 -4
  49. package/dist/types/components/Map/render/renderTruck.d.ts +3 -1
  50. package/dist/types/components/Map/utils/common.d.ts +4 -8
  51. package/dist/types/components/Map/utils/format.d.ts +6 -14
  52. package/dist/types/components/Map/utils/store.d.ts +7 -1
  53. package/dist/types/components/Map/utils/transform.d.ts +13 -5
  54. package/dist/umd/index.css +1 -1
  55. package/dist/umd/index.umd.cjs +23 -23
  56. package/package.json +1 -1
  57. package/dist/es/DetailHeader-oqCdup4q.js +0 -58
  58. package/dist/es/DiyDataTable-A1P5k0Eh.js +0 -304
  59. package/dist/es/Map-DGFoAMyH.js +0 -1803
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zhihao-ui",
3
- "version": "1.2.20",
3
+ "version": "1.2.22",
4
4
  "description": "components",
5
5
  "type": "module",
6
6
  "main": "./dist/umd/index.umd.cjs",
@@ -1,58 +0,0 @@
1
- import { defineComponent as h, useSlots as p, openBlock as a, createElementBlock as o, createElementVNode as e, renderSlot as l, toDisplayString as i, Fragment as m, renderList as u, unref as n, normalizeClass as g, createCommentVNode as k } from "vue";
2
- import { D as v } from "./DatePicker-vGQGWrmB.js";
3
- import { _ as D } from "./Button-CYr52jII.js";
4
- import { w as y } from "./utils-CbI5IWJJ.js";
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 = {
6
- key: 1,
7
- class: "detail-header--right"
8
- }, L = { class: "info-pair--label" }, S = { class: "info-pair--value" }, V = /* @__PURE__ */ h({
9
- name: "ZhDetailHeader",
10
- __name: "DetailHeader",
11
- props: {
12
- title: {},
13
- leftInfos: {},
14
- rightInfos: {},
15
- stateMeta: {}
16
- },
17
- setup(_) {
18
- const f = p(), r = _;
19
- return (t, w) => {
20
- var d, c;
21
- return a(), o("div", I, [
22
- e("div", null, [
23
- l(t.$slots, "menu", {}, void 0, !0)
24
- ]),
25
- e("div", b, [
26
- e("div", E, [
27
- e("div", H, i(r.title), 1),
28
- l(t.$slots, "extra-info", {}, void 0, !0),
29
- (a(!0), o(m, null, u(r.leftInfos, (s) => (a(), o("div", {
30
- class: "info-pair",
31
- key: s.value
32
- }, [
33
- e("div", M, i(s.label), 1),
34
- e("div", $, i(s.value ?? n(v)), 1)
35
- ]))), 128))
36
- ]),
37
- l(t.$slots, "default", {}, void 0, !0),
38
- n(f)["right-infos"] ? l(t.$slots, "right-infos", { key: 0 }, void 0, !0) : (a(), o("div", C, [
39
- (a(!0), o(m, null, u(r.rightInfos, (s) => (a(), o("div", {
40
- class: "info-pair",
41
- key: s.value
42
- }, [
43
- e("div", L, i(s.label), 1),
44
- e("div", S, i(s.value ?? n(v)), 1)
45
- ]))), 128)),
46
- t.stateMeta ? (a(), o("div", {
47
- key: 0,
48
- class: g(["state common-title", (d = t.stateMeta) == null ? void 0 : d.state])
49
- }, i((c = t.stateMeta) == null ? void 0 : c.intro), 3)) : k("", !0)
50
- ]))
51
- ])
52
- ]);
53
- };
54
- }
55
- }), Z = /* @__PURE__ */ D(V, [["__scopeId", "data-v-8830340b"]]), U = y(Z);
56
- export {
57
- U as Z
58
- };
@@ -1,304 +0,0 @@
1
- import { defineComponent as H, useModel as N, ref as b, openBlock as d, createBlock as g, unref as s, withCtx as p, createVNode as v, createElementBlock as f, Fragment as W, renderList as Z, normalizeClass as D, toDisplayString as m, renderSlot as C, createCommentVNode as k, createElementVNode as y, createTextVNode as V, mergeModels as z } from "vue";
2
- import { D as P } from "./DatePicker-vGQGWrmB.js";
3
- import { d as E, e as $, f as X, g as j, i as _, j as T, k as K, l as M, E as A } from "./vendor-AIl6iHcE.js";
4
- import { _ as G } from "./Button-CYr52jII.js";
5
- import { w as J } from "./utils-CbI5IWJJ.js";
6
- var c = /* @__PURE__ */ ((u) => (u.AUTOCOMPLETE = "autocomplete", u.FORMAT = "format", u.TEXT = "text", u))(c || {});
7
- const Q = { key: 0 }, Y = {
8
- key: 1,
9
- class: "col-edit-header"
10
- }, ee = ["onClick"], te = { key: 0 }, ae = { key: 2 }, le = { class: "header-operation-container" }, re = { class: "operation-container" }, oe = ["onClick"], L = "$ZH_DIV$", ie = /* @__PURE__ */ H({
11
- name: "zh-diy-data-table",
12
- __name: "DiyDataTable",
13
- props: /* @__PURE__ */ z({
14
- isEdit: { type: Boolean, default: !1 },
15
- maxRowLength: { default: 50 },
16
- maxColLength: { default: 10 },
17
- defaultMinWidth: { default: 120 }
18
- }, {
19
- rawData: { required: !0 },
20
- rawDataModifiers: {}
21
- }),
22
- emits: ["update:rawData"],
23
- setup(u, { expose: R }) {
24
- const h = u, n = N(u, "rawData"), o = b([]), U = () => {
25
- if (n.value.length === h.maxRowLength) {
26
- E({
27
- message: `最多添加${h.maxRowLength}行`,
28
- type: "warning"
29
- });
30
- return;
31
- }
32
- n.value.push({});
33
- }, F = () => {
34
- if (o.value.filter((e) => e.isAdd).length >= h.maxColLength) {
35
- E({
36
- message: `最多添加${h.maxColLength}列`,
37
- type: "warning"
38
- });
39
- return;
40
- }
41
- const l = String(Date.now());
42
- o.value.push({
43
- prop: l,
44
- label: "",
45
- isEditHeader: !0,
46
- isAdd: !0,
47
- maxlength: 15,
48
- minWidth: 150,
49
- headerMaxlength: 15
50
- });
51
- }, S = (a, l) => {
52
- o.value.splice(a, 1), n.value.forEach((e) => {
53
- delete e[l.prop];
54
- });
55
- }, I = (a) => {
56
- n.value.splice(a, 1);
57
- }, O = (a, l, e) => {
58
- l(
59
- e.completeList.filter((r) => r.includes(a)).map((r) => ({ value: r }))
60
- );
61
- }, q = (a) => [
62
- {
63
- validator: (l, e, r) => {
64
- if (!o.value[a].label) {
65
- r(new Error("请输入表头"));
66
- return;
67
- }
68
- r();
69
- },
70
- message: "请输入表头",
71
- trigger: ["blur", "change"]
72
- }
73
- ], B = (a) => {
74
- const l = [];
75
- return a.required && l.push({
76
- required: !0,
77
- message: "请输入" + a.label,
78
- trigger: a.slot ? void 0 : "blur"
79
- }), a.varidate && l.push({
80
- validator: (e, r, t) => {
81
- const i = a.varidate(r);
82
- i !== !0 ? t(new Error(i)) : t();
83
- },
84
- trigger: a.slot ? void 0 : "blur"
85
- }), l;
86
- }, w = b();
87
- return R({
88
- /** 初始化数据 */
89
- initData: (a, l) => {
90
- console.log("initData", a, l), a = $(a) || [], a.length === 0 && a.push({}), l = [...l];
91
- for (const e in a[0])
92
- if (!l.some(
93
- (r) => r.prop === e
94
- )) {
95
- const r = Date.now() + e, t = e.split(L);
96
- if (t.length !== 2) {
97
- console.log("keySplit 失败", e);
98
- continue;
99
- }
100
- const i = Number(t[1]);
101
- l[i] = {
102
- prop: e,
103
- isEditHeader: !0,
104
- label: t[0],
105
- key: r,
106
- isAdd: !0,
107
- maxlength: 15,
108
- headerMaxlength: 15
109
- };
110
- }
111
- n.value = a, o.value = l;
112
- },
113
- /** 获取数据 */
114
- getData: async () => {
115
- await w.value.validate();
116
- for (const l in o.value) {
117
- const e = o.value[l];
118
- for (const r of o.value)
119
- if (e.prop !== r.prop && e.label === r.label) {
120
- E({
121
- message: "所有列的表头不可重复",
122
- type: "warning"
123
- });
124
- return;
125
- }
126
- }
127
- const a = $(n.value);
128
- for (const l in a) {
129
- const e = a[l];
130
- for (const r in o.value) {
131
- const t = o.value[r];
132
- if (t.isSameData && l !== "0" && (e[t.prop] = a[0][t.prop]), t.varidate && !t.varidate(e[t.prop]))
133
- return;
134
- if (t.isAdd) {
135
- const i = t.label + L + r;
136
- e[i] = e[t.prop], delete e[t.prop];
137
- }
138
- t.formatter && t.type === c.FORMAT && (e[t.prop] = t.formatter(e));
139
- }
140
- }
141
- return console.log("DiyDataTable 获取数据", a, o.value), {
142
- data: a,
143
- columns: o.value
144
- };
145
- },
146
- /** 更新列配置数据 */
147
- updateColumn: (a, l) => {
148
- const e = o.value[a].prop;
149
- if (o.value[a] = l, e !== l.prop)
150
- for (const r of n.value)
151
- r[l.prop] = r[e], delete r[e];
152
- },
153
- /** 重置列配置数据 */
154
- resetColumns: (a) => {
155
- const e = o.value.filter((t) => !t.isAdd).reduce((t, i) => (a.some((x) => x.prop === i.prop) || t.push(i.prop), t), []);
156
- n.value.forEach((t) => {
157
- e.forEach((i) => {
158
- delete t[i];
159
- });
160
- });
161
- const r = a.filter((t) => t.isAdd);
162
- o.value = [...a, ...r];
163
- }
164
- }), (a, l) => (d(), g(s(X), {
165
- class: "diy-data-table",
166
- model: u.rawData,
167
- ref_key: "formRef",
168
- ref: w
169
- }, {
170
- default: p(() => [
171
- v(s(j), { data: n.value }, {
172
- default: p(() => [
173
- v(s(_), {
174
- type: "index",
175
- label: "序号",
176
- width: "132",
177
- fixed: "left"
178
- }),
179
- (d(!0), f(W, null, Z(o.value, (e, r) => (d(), g(s(_), {
180
- key: e.key || r,
181
- prop: e.prop,
182
- label: e.label,
183
- width: e.width,
184
- "min-width": e.minWidth || a.defaultMinWidth,
185
- fixed: e.fixed
186
- }, {
187
- header: p(() => [
188
- a.isEdit ? e.isEditHeader ? (d(), f("div", Y, [
189
- v(s(T), {
190
- prop: `columns.${r}`,
191
- rules: q(r)
192
- }, {
193
- default: p(() => [
194
- v(s(M), {
195
- modelValue: e.label,
196
- "onUpdate:modelValue": (t) => e.label = t,
197
- maxlength: e.headerMaxlength || 20,
198
- placeholder: "请输入表头"
199
- }, null, 8, ["modelValue", "onUpdate:modelValue", "maxlength"])
200
- ]),
201
- _: 2
202
- }, 1032, ["prop", "rules"]),
203
- e.isAdd ? (d(), f("i", {
204
- key: 0,
205
- class: "iconfont icon-close",
206
- onClick: (t) => S(r, e)
207
- }, null, 8, ee)) : k("", !0)
208
- ])) : (d(), f("div", {
209
- key: 2,
210
- class: D({ "is-required-label": e.required })
211
- }, m(e.label), 3)) : (d(), f("div", Q, m(e.label), 1))
212
- ]),
213
- default: p((t) => [
214
- h.isEdit && (!e.isSameData || t.$index === 0) && e.type !== s(c).TEXT ? (d(), g(s(T), {
215
- key: 0,
216
- prop: `${t.$index}.${e.prop}`,
217
- rules: B(e),
218
- class: D(["col-edit-container", { "close-padding": e.isAdd }])
219
- }, {
220
- default: p(() => [
221
- e.type === s(c).FORMAT && e.formatter ? (d(), f("div", te, m(e.formatter(t.row)), 1)) : e.type === s(c).AUTOCOMPLETE ? (d(), g(s(K), {
222
- key: 1,
223
- modelValue: t.row[e.prop],
224
- "onUpdate:modelValue": (i) => t.row[e.prop] = i,
225
- placeholder: e.placeholder || "请输入",
226
- "fetch-suggestions": (i, x) => O(i, x, e),
227
- maxlength: e.maxlength || 20
228
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "fetch-suggestions", "maxlength"])) : e.slot ? C(a.$slots, e.slot, {
229
- key: 2,
230
- row: t.row,
231
- $index: t.$index
232
- }, void 0, !0) : (d(), g(s(M), {
233
- key: 3,
234
- modelValue: t.row[e.prop],
235
- "onUpdate:modelValue": (i) => t.row[e.prop] = i,
236
- placeholder: e.placeholder || "请输入",
237
- formatter: e.formatter,
238
- parser: e.parser,
239
- maxlength: e.maxlength || 20
240
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "formatter", "parser", "maxlength"]))
241
- ]),
242
- _: 2
243
- }, 1032, ["prop", "rules", "class"])) : e.slot ? C(a.$slots, e.slot, {
244
- key: 1,
245
- row: t.row,
246
- $index: t.$index
247
- }, void 0, !0) : (d(), f("div", ae, m((e.isSameData ? n.value[0][e.prop] : t.row[e.prop]) || s(P)), 1))
248
- ]),
249
- _: 2
250
- }, 1032, ["prop", "label", "width", "min-width", "fixed"]))), 128)),
251
- h.isEdit ? (d(), g(s(_), {
252
- key: 0,
253
- width: "150",
254
- fixed: "right"
255
- }, {
256
- header: p(() => [
257
- y("div", le, [
258
- v(s(A), {
259
- type: "primary",
260
- link: "",
261
- onClick: U
262
- }, {
263
- default: p(() => l[0] || (l[0] = [
264
- y("i", { class: "iconfont icon-Frame1" }, null, -1),
265
- V("增行")
266
- ])),
267
- _: 1
268
- }),
269
- v(s(A), {
270
- type: "primary",
271
- link: "",
272
- onClick: F
273
- }, {
274
- default: p(() => l[1] || (l[1] = [
275
- y("i", { class: "iconfont icon-Frame-11" }, null, -1),
276
- V("增列")
277
- ])),
278
- _: 1
279
- })
280
- ])
281
- ]),
282
- default: p(({ $index: e }) => [
283
- y("div", re, [
284
- n.value.length > 1 ? (d(), f("i", {
285
- key: 0,
286
- class: "iconfont icon-close",
287
- onClick: (r) => I(e)
288
- }, null, 8, oe)) : k("", !0)
289
- ])
290
- ]),
291
- _: 1
292
- })) : k("", !0)
293
- ]),
294
- _: 3
295
- }, 8, ["data"])
296
- ]),
297
- _: 3
298
- }, 8, ["model"]));
299
- }
300
- }), se = /* @__PURE__ */ G(ie, [["__scopeId", "data-v-a77561c1"]]), he = J(se);
301
- export {
302
- c as D,
303
- he as Z
304
- };