zhihao-ui 1.2.25 → 1.2.26

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.
@@ -1,13 +1,15 @@
1
- import { defineComponent as V, useModel as k, computed as w, openBlock as r, createBlock as T, unref as v, mergeProps as D, withCtx as o, renderSlot as a, createElementVNode as c, createVNode as u, createTextVNode as p, toDisplayString as l, createElementBlock as M, createCommentVNode as z, mergeModels as m } from "vue";
1
+ import { defineComponent as k, useModel as w, computed as T, openBlock as r, createBlock as v, unref as D, mergeProps as M, withCtx as o, renderSlot as s, createElementVNode as c, createVNode as u, createTextVNode as m, toDisplayString as l, createElementBlock as Z, createCommentVNode as z, mergeModels as p } from "vue";
2
2
  import { Z as f } from "./Button-Va8xfPJd.js";
3
3
  import { c as E } from "./vendor-gTOtiVzA.js";
4
- import { w as Z } from "./utils-D-zYpBSZ.js";
5
- const I = { class: "title" }, N = {
4
+ import { w as I } from "./utils-D-zYpBSZ.js";
5
+ const N = { class: "title" }, O = {
6
6
  key: 0,
7
7
  class: "sub-title"
8
- }, O = { class: "zh-dialog__footer" }, S = /* @__PURE__ */ V({
8
+ }, S = { class: "zh-dialog__footer" }, _ = /* @__PURE__ */ k({
9
+ name: "ZhDialog",
10
+ inheritAttrs: !1,
9
11
  __name: "Dialog",
10
- props: /* @__PURE__ */ m({
12
+ props: /* @__PURE__ */ p({
11
13
  title: {},
12
14
  subTitle: {},
13
15
  cancelButtonText: { default: "取消" },
@@ -43,41 +45,44 @@ const I = { class: "title" }, N = {
43
45
  modelValue: { type: Boolean, default: !0 },
44
46
  modelModifiers: {}
45
47
  }),
46
- emits: /* @__PURE__ */ m(["submit", "close"], ["update:modelValue"]),
48
+ emits: /* @__PURE__ */ p(["submit", "close"], ["update:modelValue"]),
47
49
  setup(n, { emit: B }) {
48
- const t = n, s = k(n, "modelValue"), d = B, y = () => {
49
- d("close");
50
+ const t = n, d = w(n, "modelValue"), a = B, y = () => {
51
+ a("close");
50
52
  }, h = () => {
51
- d("submit");
52
- }, C = {
53
+ a("submit");
54
+ }, C = () => {
55
+ a("close");
56
+ }, g = {
53
57
  small: "400px",
54
58
  middle: "600px",
55
59
  large: "800px",
56
60
  extraLarge: "920px"
57
- }, g = w(() => t.width ? t.width : C[t.size]);
58
- return (e, i) => (r(), T(v(E), D({
59
- modelValue: s.value,
60
- "onUpdate:modelValue": i[0] || (i[0] = (b) => s.value = b),
61
+ }, b = T(() => t.width ? t.width : g[t.size]);
62
+ return (e, i) => (r(), v(D(E), M({
63
+ modelValue: d.value,
64
+ "onUpdate:modelValue": i[0] || (i[0] = (V) => d.value = V),
61
65
  class: "zh-dialog"
62
66
  }, e.$attrs, {
63
- width: g.value,
64
- "close-on-click-modal": e.closeOnClickModal
67
+ width: b.value,
68
+ "close-on-click-modal": e.closeOnClickModal,
69
+ onClose: C
65
70
  }), {
66
71
  header: o(() => [
67
- a(e.$slots, "header", {}, () => [
68
- c("div", I, l(e.title), 1),
69
- e.subTitle ? (r(), M("div", N, l(e.subTitle), 1)) : z("", !0)
72
+ s(e.$slots, "header", {}, () => [
73
+ c("div", N, l(e.title), 1),
74
+ e.subTitle ? (r(), Z("div", O, l(e.subTitle), 1)) : z("", !0)
70
75
  ])
71
76
  ]),
72
77
  footer: o(() => [
73
- a(e.$slots, "footer", {}, () => [
74
- c("div", O, [
78
+ s(e.$slots, "footer", {}, () => [
79
+ c("div", S, [
75
80
  u(f, {
76
81
  plain: "",
77
82
  onClick: y
78
83
  }, {
79
84
  default: o(() => [
80
- p(l(e.cancelButtonText), 1)
85
+ m(l(e.cancelButtonText), 1)
81
86
  ]),
82
87
  _: 1
83
88
  }),
@@ -87,7 +92,7 @@ const I = { class: "title" }, N = {
87
92
  onClick: h
88
93
  }, {
89
94
  default: o(() => [
90
- p(l(e.confirmButtonText), 1)
95
+ m(l(e.confirmButtonText), 1)
91
96
  ]),
92
97
  _: 1
93
98
  }, 8, ["disabled"])
@@ -95,13 +100,13 @@ const I = { class: "title" }, N = {
95
100
  ])
96
101
  ]),
97
102
  default: o(() => [
98
- a(e.$slots, "default")
103
+ s(e.$slots, "default")
99
104
  ]),
100
105
  _: 3
101
106
  }, 16, ["modelValue", "width", "close-on-click-modal"]));
102
107
  }
103
- }), P = Z(S);
108
+ }), P = I(_);
104
109
  export {
105
110
  P as Z,
106
- S as _
111
+ _
107
112
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as Z, useModel as z, ref as D, openBlock as n, createBlock as v, unref as s, withCtx as p, createVNode as g, createElementBlock as h, Fragment as C, renderList as P, normalizeClass as V, toDisplayString as y, renderSlot as R, createTextVNode as x, createCommentVNode as k, createElementVNode as c, mergeModels as X } from "vue";
1
+ import { defineComponent as Z, useModel as z, ref as D, openBlock as n, createBlock as v, unref as s, withCtx as p, createVNode as g, createElementBlock as h, Fragment as C, renderList as P, normalizeClass as V, toDisplayString as c, renderSlot as R, createTextVNode as x, createCommentVNode as k, createElementVNode as w, mergeModels as X } from "vue";
2
2
  import { D as $ } from "./DatePicker-BrD1XS6-.js";
3
3
  import { d as E, e as A, f as j, g as K, i as b, j as T, k as G, l as F, E as M } from "./vendor-gTOtiVzA.js";
4
4
  import { _ as J } from "./Button-Va8xfPJd.js";
@@ -139,9 +139,10 @@ const Y = { key: 0 }, ee = {
139
139
  if (r.isSameData && t !== "0" && (e[r.prop] = a[0][r.prop]), r.varidate && !r.varidate(e[r.prop]))
140
140
  return;
141
141
  if (r.isAdd) {
142
+ const i = e[r.prop];
142
143
  delete e[r.prop];
143
- const i = r.label + L + o;
144
- e[i] = e[r.prop];
144
+ const y = r.label + L + o;
145
+ e[y] = i;
145
146
  }
146
147
  r.formatter && r.type === m.FORMAT && (e[r.prop] = r.formatter(e));
147
148
  }
@@ -160,7 +161,7 @@ const Y = { key: 0 }, ee = {
160
161
  },
161
162
  /** 重置默认列配置数据 */
162
163
  resetColumns: (a) => {
163
- const e = l.value.filter((r) => !r.isAdd).reduce((r, i) => (a.some((w) => w.prop === i.prop) || r.push(i.prop), r), []);
164
+ const e = l.value.filter((r) => !r.isAdd).reduce((r, i) => (a.some((y) => y.prop === i.prop) || r.push(i.prop), r), []);
164
165
  d.value.forEach((r) => {
165
166
  e.forEach((i) => {
166
167
  delete r[i];
@@ -216,7 +217,7 @@ const Y = { key: 0 }, ee = {
216
217
  ])) : (n(), h("div", {
217
218
  key: 2,
218
219
  class: V({ "is-required-label": e.required })
219
- }, y(e.label), 3)) : (n(), h("div", Y, y(e.label), 1))
220
+ }, c(e.label), 3)) : (n(), h("div", Y, c(e.label), 1))
220
221
  ]),
221
222
  default: p((r) => [
222
223
  u.isEdit && (!e.isSameData || r.$index === 0) && e.type !== s(m).TEXT ? (n(), v(s(T), {
@@ -226,14 +227,14 @@ const Y = { key: 0 }, ee = {
226
227
  class: V(["col-edit-container", { "close-padding": e.isAdd }])
227
228
  }, {
228
229
  default: p(() => [
229
- e.type === s(m).FORMAT && e.formatter ? (n(), h("div", ae, y(e.showFormatter ? e.showFormatter(
230
+ e.type === s(m).FORMAT && e.formatter ? (n(), h("div", ae, c(e.showFormatter ? e.showFormatter(
230
231
  e.formatter(r.row)
231
232
  ) : e.formatter(r.row)), 1)) : e.type === s(m).AUTOCOMPLETE ? (n(), v(s(G), {
232
233
  key: 1,
233
234
  modelValue: r.row[e.prop],
234
235
  "onUpdate:modelValue": (i) => r.row[e.prop] = i,
235
236
  placeholder: e.placeholder || "请输入",
236
- "fetch-suggestions": (i, w) => B(i, w, e),
237
+ "fetch-suggestions": (i, y) => B(i, y, e),
237
238
  maxlength: e.maxlength || 20
238
239
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "fetch-suggestions", "maxlength"])) : e.slot ? R(a.$slots, e.slot, {
239
240
  key: 2,
@@ -255,7 +256,7 @@ const Y = { key: 0 }, ee = {
255
256
  row: r.row,
256
257
  $index: r.$index
257
258
  }, void 0, !0) : (n(), h(C, { key: 2 }, [
258
- x(y(W(r.row, e)), 1)
259
+ x(c(W(r.row, e)), 1)
259
260
  ], 64))
260
261
  ]),
261
262
  _: 2
@@ -266,14 +267,14 @@ const Y = { key: 0 }, ee = {
266
267
  fixed: "right"
267
268
  }, {
268
269
  header: p(() => [
269
- c("div", re, [
270
+ w("div", re, [
270
271
  g(s(M), {
271
272
  type: "primary",
272
273
  link: "",
273
274
  onClick: U
274
275
  }, {
275
276
  default: p(() => t[0] || (t[0] = [
276
- c("i", { class: "iconfont icon-Frame1" }, null, -1),
277
+ w("i", { class: "iconfont icon-Frame1" }, null, -1),
277
278
  x("增行")
278
279
  ])),
279
280
  _: 1
@@ -284,7 +285,7 @@ const Y = { key: 0 }, ee = {
284
285
  onClick: I
285
286
  }, {
286
287
  default: p(() => t[1] || (t[1] = [
287
- c("i", { class: "iconfont icon-Frame-11" }, null, -1),
288
+ w("i", { class: "iconfont icon-Frame-11" }, null, -1),
288
289
  x("增列")
289
290
  ])),
290
291
  _: 1
@@ -292,7 +293,7 @@ const Y = { key: 0 }, ee = {
292
293
  ])
293
294
  ]),
294
295
  default: p(({ $index: e }) => [
295
- c("div", oe, [
296
+ w("div", oe, [
296
297
  d.value.length > 1 ? (n(), h("i", {
297
298
  key: 0,
298
299
  class: "iconfont icon-close",
@@ -309,7 +310,7 @@ const Y = { key: 0 }, ee = {
309
310
  _: 3
310
311
  }, 8, ["model"]));
311
312
  }
312
- }), se = /* @__PURE__ */ J(ie, [["__scopeId", "data-v-a8cfe06d"]]), he = Q(se);
313
+ }), se = /* @__PURE__ */ J(ie, [["__scopeId", "data-v-52d02832"]]), he = Q(se);
313
314
  export {
314
315
  m as D,
315
316
  he as Z
@@ -2,7 +2,7 @@ import { reactive as X, computed as O, toRefs as Ae, ref as M, defineComponent a
2
2
  import { Z as xe, _ as kt, $ as Pt, a0 as qe, a1 as Tt, f as $t, a2 as Et, j as Bt, a3 as zt, Y as me, E as ke, a4 as ge, a5 as It, a6 as Mt, i as oe, a7 as Lt, a8 as Dt, a9 as Ft, aa as He, ab as Ze, e as q, g as Ge, ac as De, ad as Ot, ae as Je, af as Vt, ag as Rt, ah as At, ai as Kt, m as Se, aj as Ut, d as jt, ak as Nt, al as Fe, am as Oe } from "./vendor-gTOtiVzA.js";
3
3
  import { D as ee, C as Wt } from "./DatePicker-BrD1XS6-.js";
4
4
  import { _ as le, Z as we } from "./Button-Va8xfPJd.js";
5
- import { _ as xt } from "./Dialog-CnqJMaPI.js";
5
+ import { _ as xt } from "./Dialog-D1K_vH8I.js";
6
6
  import { w as qt } from "./utils-D-zYpBSZ.js";
7
7
  const Ht = (g, c = {}, a = !0, f, m, y = (t) => t) => {
8
8
  const t = X({
package/dist/es/index.js CHANGED
@@ -2,7 +2,7 @@ import { m as o } from "./utils-D-zYpBSZ.js";
2
2
  import { a as r, b as a } from "./Button-Va8xfPJd.js";
3
3
  import { Z as m } from "./DatePicker-BrD1XS6-.js";
4
4
  import { Z as t } from "./DetailSubTitle-BgbefcLD.js";
5
- import { Z } from "./Dialog-CnqJMaPI.js";
5
+ import { Z } from "./Dialog-D1K_vH8I.js";
6
6
  import { Z as s } from "./EditInfoPair-XiseN2F2.js";
7
7
  import { Z as i } from "./FileWrapper-CAwHicjK.js";
8
8
  import { Z as p } from "./Grid-CshEwvAH.js";
@@ -15,10 +15,10 @@ import { Z as T } from "./PageHeadPanel-BWjWkx8n.js";
15
15
  import { Z as b } from "./ToolTips-Bw2lHQxC.js";
16
16
  import { Z as d } from "./BaseInfo-DCB7xgRw.js";
17
17
  import { Z as c } from "./DetailHeader-C13bJw_K.js";
18
- import { Z as g } from "./DiyDataTable-BqAwjS3F.js";
19
- import { D as R } from "./DiyDataTable-BqAwjS3F.js";
18
+ import { Z as g } from "./DiyDataTable-Chu357SY.js";
19
+ import { D as R } from "./DiyDataTable-Chu357SY.js";
20
20
  import { Z as B } from "./Map-DhceUygQ.js";
21
- import { Z as x } from "./Table-CQjp8H9A.js";
21
+ import { Z as x } from "./Table-9BngZpmt.js";
22
22
  const A = [
23
23
  d,
24
24
  r,