@zy-frontend/business 1.1.13 → 1.1.14

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.
@@ -4,7 +4,11 @@ declare const _default: <Row extends Record<string, any>>(__VLS_props: Awaited<t
4
4
  props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & ZYTableColumnProps<Row>, keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
5
5
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
6
6
  attrs: any;
7
- slots: ReturnType<() => Partial<Record<NonNullable<(string & {}) | Extract<keyof Row, string>>, (_: {
7
+ slots: ReturnType<() => Partial<Record<NonNullable<`${string & {}}-header` | `${Extract<keyof Row, string>}-header`>, (_: {
8
+ prop: (string & {}) | Extract<keyof Row, string>;
9
+ index: number;
10
+ column: import('./interface').ZYTableColumn<Row>;
11
+ }) => any>> & Partial<Record<NonNullable<(string & {}) | Extract<keyof Row, string>>, (_: {
8
12
  row: Row;
9
13
  prop: (string & {}) | Extract<keyof Row, string>;
10
14
  index: number;
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getCurrentInstance as nl, inject as _e, provide as st, reactive as pt, defineComponent as M, renderSlot as Ae, ref as _, watch as Te, onBeforeUnmount as Mt, shallowRef as kl, computed as Q, onMounted as Oe, openBlock as u, createElementBlock as k, normalizeStyle as Ye, normalizeClass as ye, unref as v, createCommentVNode as ee, Fragment as G, createElementVNode as I, withModifiers as dt, createBlock as D, resolveDynamicComponent as sl, renderList as Z, withCtx as x, createVNode as N, createTextVNode as te, toDisplayString as H, toRefs as Aa, withDirectives as $e, withKeys as Yt, useModel as he, mergeModels as ie, useAttrs as lt, normalizeProps as We, guardReactiveProps as et, toRaw as rt, mergeProps as ze, useTemplateRef as qe, nextTick as Ze, resolveComponent as Wl, useSlots as qt, createSlots as Ut, h as Ca, vShow as _t, watchEffect as ka, onUnmounted as wl } from "vue";
1
+ import { getCurrentInstance as nl, inject as _e, provide as st, reactive as pt, defineComponent as M, renderSlot as be, ref as _, watch as Te, onBeforeUnmount as Mt, shallowRef as kl, computed as Q, onMounted as Oe, openBlock as u, createElementBlock as k, normalizeStyle as Ye, normalizeClass as ye, unref as v, createCommentVNode as ee, Fragment as G, createElementVNode as I, withModifiers as dt, createBlock as D, resolveDynamicComponent as sl, renderList as Z, withCtx as x, createVNode as N, createTextVNode as te, toDisplayString as H, toRefs as Aa, withDirectives as $e, withKeys as Yt, useModel as he, mergeModels as ie, useAttrs as lt, normalizeProps as We, guardReactiveProps as et, toRaw as rt, mergeProps as ze, useTemplateRef as qe, nextTick as Ze, resolveComponent as Wl, useSlots as qt, createSlots as Ut, h as Ca, vShow as _t, watchEffect as ka, onUnmounted as wl } from "vue";
2
2
  import { ArrowLeft as Va, ArrowUp as Zl, ArrowRight as Ta, ArrowDown as Xl, Minus as Ea, Files as za, Plus as Ia, More as wa, Search as Vl, QuestionFilled as vl, FullScreen as Ra, Download as xa, PieChart as Oa, Switch as Na, Memo as _a, DCaret as Da, Close as Hl, Edit as Rl, Loading as Xt, Setting as La } from "@element-plus/icons-vue";
3
3
  import { ElTooltip as vt, ElButton as me, ElDropdown as Ua, ElIcon as Ge, ElDropdownMenu as Pa, ElDropdownItem as Ma, ElInput as yt, ElTag as Et, vLoading as bt, ElAutocomplete as Jl, ElSelect as St, ElOption as At, ElDatePicker as mt, ElInputNumber as Lt, ElCheckbox as Pt, ElDrawer as fl, ElTableColumn as ft, ElTable as tl, ElPagination as Fa, ElMessageBox as $l, ElMessage as tt, ElPopconfirm as ea, ElDialog as Kt, ElRadioGroup as rl, ElRadioButton as gl, ElTreeV2 as Ba, ElLink as ta, ElRadio as Qt, ElTabs as la, ElTabPane as aa, ElCheckboxGroup as Ga } from "element-plus";
4
4
  import { debounce as Tl, throttle as oa, cloneDeep as ut, get as xl } from "lodash-es";
@@ -103,7 +103,7 @@ const qa = (e) => {
103
103
  name: "ZYGlobalProvider",
104
104
  props: { request: { type: Function }, ...Ka },
105
105
  setup(e, { slots: c }) {
106
- return Qa(e), qa(e.request), () => Ae(c, "default", {
106
+ return Qa(e), qa(e.request), () => be(c, "default", {
107
107
  request: e.request
108
108
  });
109
109
  }
@@ -377,8 +377,8 @@ function Xa(e) {
377
377
  }
378
378
  if (B < 0 || B >= y.value.length) return;
379
379
  const $ = h.value.slice();
380
- $[B] = E(K), h.value = $, L(), be();
381
- }, Me = () => j.value.slice(), Ke = () => S.value.slice(), be = (B = -1) => {
380
+ $[B] = E(K), h.value = $, L(), Se();
381
+ }, Me = () => j.value.slice(), Ke = () => S.value.slice(), Se = (B = -1) => {
382
382
  if (w) return;
383
383
  const K = j.value.slice();
384
384
  O(), o == null || o(K), i == null || i("resize", {
@@ -389,7 +389,7 @@ function Xa(e) {
389
389
  };
390
390
  let je = 0, ke = null, ae = -1;
391
391
  const we = (B) => {
392
- je = Date.now(), be(B);
392
+ je = Date.now(), Se(B);
393
393
  }, ht = (B) => {
394
394
  const K = Date.now() - je;
395
395
  if (K >= Ul) {
@@ -573,7 +573,7 @@ const Ja = M({ name: "ZYSplitter" }), $a = /* @__PURE__ */ M({
573
573
  class: ye(["zy-splitter", [`zy-splitter--${e.direction}`, { "is-dragging": v(r), "is-disabled": e.disabled }]]),
574
574
  style: Ye(V.value)
575
575
  }, [
576
- Ae(w.$slots, "default"),
576
+ be(w.$slots, "default"),
577
577
  v(r) ? (u(), k("div", {
578
578
  key: 0,
579
579
  class: ye(["zy-splitter__mask", [`zy-splitter__mask--${e.direction}`]])
@@ -682,7 +682,7 @@ const Ja = M({ name: "ZYSplitter" }), $a = /* @__PURE__ */ M({
682
682
  ref: n,
683
683
  class: ye(["zy-splitter-panel", c.class ?? ""])
684
684
  }, [
685
- Ae(A.$slots, "default")
685
+ be(A.$slots, "default")
686
686
  ], 2),
687
687
  s.value ? ee("", !0) : (u(), k("div", {
688
688
  key: 0,
@@ -708,7 +708,7 @@ const Ja = M({ name: "ZYSplitter" }), $a = /* @__PURE__ */ M({
708
708
  onPointerdown: R[1] || (R[1] = dt(() => {
709
709
  }, ["stop"]))
710
710
  }, [
711
- Ae(A.$slots, "collapse-self", {
711
+ be(A.$slots, "collapse-self", {
712
712
  index: a.value,
713
713
  collapsed: o.value
714
714
  }, () => [
@@ -728,7 +728,7 @@ const Ja = M({ name: "ZYSplitter" }), $a = /* @__PURE__ */ M({
728
728
  onPointerdown: R[3] || (R[3] = dt(() => {
729
729
  }, ["stop"]))
730
730
  }, [
731
- Ae(A.$slots, "collapse-next", {
731
+ be(A.$slots, "collapse-next", {
732
732
  index: a.value,
733
733
  nextIndex: a.value + 1,
734
734
  collapsed: y.value
@@ -736,7 +736,7 @@ const Ja = M({ name: "ZYSplitter" }), $a = /* @__PURE__ */ M({
736
736
  (u(), D(sl(z.value), { class: "zy-splitter__collapse-icon-svg" }))
737
737
  ])
738
738
  ], 34)) : ee("", !0),
739
- Ae(A.$slots, "bar-extra", {
739
+ be(A.$slots, "bar-extra", {
740
740
  index: a.value,
741
741
  direction: b.value,
742
742
  selfCollapsed: o.value,
@@ -746,7 +746,7 @@ const Ja = M({ name: "ZYSplitter" }), $a = /* @__PURE__ */ M({
746
746
  ], 64));
747
747
  }
748
748
  });
749
- var Ce = /* @__PURE__ */ ((e) => (e.AND = "AND", e.OR = "OR", e.NOT = "NOT", e))(Ce || {}), pe = /* @__PURE__ */ ((e) => (e.EXISTS = "EXISTS", e.EQ = "EQ", e.LIKE = "LIKE", e.RANGE = "RANGE", e.LTE = "LTE", e.LT = "LT", e.GTE = "GTE", e.GT = "GT", e.WILDCARD = "WILDCARD", e.NEQ = "NEQ", e))(pe || {}), Se = /* @__PURE__ */ ((e) => (e.TEXT = "TEXT", e.TEXT_BOOLEAN = "TEXT_BOOLEAN", e.TEXT_ARRAY = "TEXT_ARRAY", e.KEYWORD = "KEYWORD", e.KEYWORD_ARRAY = "KEYWORD_ARRAY", e.DATE_TIME = "DATE_TIME", e.DATE = "DATE", e.NUMBER = "NUMBER", e.NUMBER_INT = "NUMBER_INT", e))(Se || {}), cl = /* @__PURE__ */ ((e) => (e.FIRST = "first", e.LAST = "last", e))(cl || {});
749
+ var Ce = /* @__PURE__ */ ((e) => (e.AND = "AND", e.OR = "OR", e.NOT = "NOT", e))(Ce || {}), pe = /* @__PURE__ */ ((e) => (e.EXISTS = "EXISTS", e.EQ = "EQ", e.LIKE = "LIKE", e.RANGE = "RANGE", e.LTE = "LTE", e.LT = "LT", e.GTE = "GTE", e.GT = "GT", e.WILDCARD = "WILDCARD", e.NEQ = "NEQ", e))(pe || {}), Ae = /* @__PURE__ */ ((e) => (e.TEXT = "TEXT", e.TEXT_BOOLEAN = "TEXT_BOOLEAN", e.TEXT_ARRAY = "TEXT_ARRAY", e.KEYWORD = "KEYWORD", e.KEYWORD_ARRAY = "KEYWORD_ARRAY", e.DATE_TIME = "DATE_TIME", e.DATE = "DATE", e.NUMBER = "NUMBER", e.NUMBER_INT = "NUMBER_INT", e))(Ae || {}), cl = /* @__PURE__ */ ((e) => (e.FIRST = "first", e.LAST = "last", e))(cl || {});
750
750
  const Ht = "1", Oi = {
751
751
  [Ce.AND]: "AND",
752
752
  [Ce.OR]: "OR",
@@ -758,15 +758,15 @@ const Ht = "1", Oi = {
758
758
  [Ce.AND]: "且",
759
759
  [Ce.OR]: "或",
760
760
  [Ce.NOT]: "排除"
761
- }, xt = [Se.DATE_TIME, Se.DATE], Ot = [Se.NUMBER, Se.NUMBER_INT], Jt = [
762
- Se.TEXT,
763
- Se.TEXT_BOOLEAN,
764
- Se.TEXT_ARRAY,
765
- Se.KEYWORD,
766
- Se.KEYWORD_ARRAY
761
+ }, xt = [Ae.DATE_TIME, Ae.DATE], Ot = [Ae.NUMBER, Ae.NUMBER_INT], Jt = [
762
+ Ae.TEXT,
763
+ Ae.TEXT_BOOLEAN,
764
+ Ae.TEXT_ARRAY,
765
+ Ae.KEYWORD,
766
+ Ae.KEYWORD_ARRAY
767
767
  ], El = [
768
768
  { name: "区间", value: pe.RANGE, dataTypes: [...Ot, ...xt] },
769
- { name: "非空", value: pe.EXISTS, dataTypes: Object.values(Se) },
769
+ { name: "非空", value: pe.EXISTS, dataTypes: Object.values(Ae) },
770
770
  { name: "等于", value: pe.EQ, dataTypes: [...Ot, ...xt] },
771
771
  { name: "不等于", value: pe.NEQ, dataTypes: Jt },
772
772
  { name: "大于", value: pe.GT, dataTypes: Ot },
@@ -783,7 +783,7 @@ const Ht = "1", Oi = {
783
783
  ], lo = {
784
784
  logicalOperator: Ce.AND,
785
785
  fieldName: "",
786
- dataType: Se.TEXT,
786
+ dataType: Ae.TEXT,
787
787
  operator: pe.EXISTS,
788
788
  caseInsensitive: void 0
789
789
  }, ca = [
@@ -1301,7 +1301,7 @@ const bo = (e) => {
1301
1301
  }), Oo = M({ name: "ZYAdvancedSearchOperatorSelect" }), No = /* @__PURE__ */ M({
1302
1302
  ...Oo,
1303
1303
  props: /* @__PURE__ */ ie({
1304
- dataType: { default: Se.TEXT }
1304
+ dataType: { default: Ae.TEXT }
1305
1305
  }, {
1306
1306
  modelValue: {},
1307
1307
  modelModifiers: {}
@@ -1351,15 +1351,15 @@ const Do = { class: "zy-condition__inner" }, Lo = {
1351
1351
  setup(e, { expose: c, emit: t }) {
1352
1352
  const l = e, n = _(l.condition), a = t, s = lt(), o = _(!1), r = (b) => {
1353
1353
  Object.assign(n.value, b), o.value = !1;
1354
- }, i = (b) => b && [Se.NUMBER, Se.NUMBER_INT].includes(b), y = (b) => b && [Se.DATE, Se.DATE_TIME].includes(b), h = (b) => {
1355
- b === pe.EXISTS ? n.value.value = void 0 : b === pe.RANGE ? n.value.value = [] : n.value.dataType && [Se.NUMBER, Se.NUMBER_INT].includes(n.value.dataType) ? n.value.value = null : n.value.value = "", n.value.caseInsensitive = void 0;
1354
+ }, i = (b) => b && [Ae.NUMBER, Ae.NUMBER_INT].includes(b), y = (b) => b && [Ae.DATE, Ae.DATE_TIME].includes(b), h = (b) => {
1355
+ b === pe.EXISTS ? n.value.value = void 0 : b === pe.RANGE ? n.value.value = [] : n.value.dataType && [Ae.NUMBER, Ae.NUMBER_INT].includes(n.value.dataType) ? n.value.value = null : n.value.value = "", n.value.caseInsensitive = void 0;
1356
1356
  }, S = () => {
1357
1357
  a("active", rt(n.value));
1358
1358
  }, C = [
1359
- Se.DATE,
1360
- Se.DATE_TIME,
1361
- Se.NUMBER,
1362
- Se.NUMBER_INT
1359
+ Ae.DATE,
1360
+ Ae.DATE_TIME,
1361
+ Ae.NUMBER,
1362
+ Ae.NUMBER_INT
1363
1363
  ];
1364
1364
  return c({ setField: (b) => {
1365
1365
  l.active && Object.assign(n.value, {
@@ -1747,7 +1747,7 @@ const kt = new jo(), Yo = { class: "zy-condition-group__inner" }, qo = M({ name:
1747
1747
  I("strong", {
1748
1748
  id: e.name.toString()
1749
1749
  }, H(e.label), 9, Qo),
1750
- Ae(c.$slots, "default")
1750
+ be(c.$slots, "default")
1751
1751
  ]));
1752
1752
  }
1753
1753
  });
@@ -1838,7 +1838,7 @@ const Ho = { class: "zy-anchor-tab" }, Jo = {
1838
1838
  onClick: (V) => b(f)
1839
1839
  }, [
1840
1840
  I("p", null, H(p), 1),
1841
- Ae(d.$slots, "tab", { tabName: f })
1841
+ be(d.$slots, "tab", { tabName: f })
1842
1842
  ], 10, $o))), 128))
1843
1843
  ], 512),
1844
1844
  I("div", {
@@ -1847,7 +1847,7 @@ const Ho = { class: "zy-anchor-tab" }, Jo = {
1847
1847
  onScroll: g[0] || (g[0] = //@ts-ignore
1848
1848
  (...p) => v(C) && v(C)(...p))
1849
1849
  }, [
1850
- Ae(d.$slots, "default")
1850
+ be(d.$slots, "default")
1851
1851
  ], 544)
1852
1852
  ]));
1853
1853
  }
@@ -1992,12 +1992,19 @@ const Ho = { class: "zy-anchor-tab" }, Jo = {
1992
1992
  return u(!0), k(G, null, Z(e.columns, (n) => (u(), D(v(ft), ze({
1993
1993
  key: n.prop
1994
1994
  }, { ref_for: !0 }, n), {
1995
+ header: x(({ $index: a }) => [
1996
+ be(c.$slots, `${n.prop}-header`, {
1997
+ prop: n.prop,
1998
+ index: a,
1999
+ column: n
2000
+ })
2001
+ ]),
1995
2002
  default: x(({ row: a, $index: s }) => {
1996
2003
  var o;
1997
2004
  return [
1998
2005
  n.type === "index" ? (u(), k(G, { key: 0 }, [
1999
2006
  te(H(s + 1), 1)
2000
- ], 64)) : n.type === "custom" ? Ae(c.$slots, n.prop, {
2007
+ ], 64)) : n.type === "custom" ? be(c.$slots, n.prop, {
2001
2008
  row: a,
2002
2009
  prop: n.prop,
2003
2010
  index: s,
@@ -2287,11 +2294,11 @@ const Gl = (e, c, t) => {
2287
2294
  }
2288
2295
  }), (L, P) => (u(), k("div", hn, [
2289
2296
  v(l).header || v(l).search || v(l).action ? (u(), k("div", gn, [
2290
- Ae(L.$slots, "header", {}, () => [
2297
+ be(L.$slots, "header", {}, () => [
2291
2298
  I("div", bn, [
2292
- Ae(L.$slots, "search")
2299
+ be(L.$slots, "search")
2293
2300
  ]),
2294
- Ae(L.$slots, "action")
2301
+ be(L.$slots, "action")
2295
2302
  ])
2296
2303
  ])) : ee("", !0),
2297
2304
  I("div", Sn, [
@@ -2321,7 +2328,7 @@ const Gl = (e, c, t) => {
2321
2328
  Z(v(l), (j, q) => ({
2322
2329
  name: q,
2323
2330
  fn: x((fe) => [
2324
- Ae(L.$slots, q, We(et(fe)))
2331
+ be(L.$slots, q, We(et(fe)))
2325
2332
  ])
2326
2333
  }))
2327
2334
  ]), 1032, ["columns", "table-data"]),
@@ -2346,7 +2353,7 @@ const Gl = (e, c, t) => {
2346
2353
  { "zy-table__pagination--has-extra": !!v(l)["footer-extra"] }
2347
2354
  ])
2348
2355
  }, [
2349
- Ae(L.$slots, "footer-extra"),
2356
+ be(L.$slots, "footer-extra"),
2350
2357
  N(v(Fa), ze({
2351
2358
  "current-page": b.current,
2352
2359
  "onUpdate:currentPage": P[1] || (P[1] = (j) => b.current = j),
@@ -2874,7 +2881,7 @@ const Gl = (e, c, t) => {
2874
2881
  ]),
2875
2882
  _: 1
2876
2883
  }),
2877
- Ae(p.$slots, "extra-action")
2884
+ be(p.$slots, "extra-action")
2878
2885
  ]),
2879
2886
  N(Mn, {
2880
2887
  ref: "historyList",
@@ -3048,12 +3055,12 @@ const Gl = (e, c, t) => {
3048
3055
  class: ye(["zy-layout-container", e.className])
3049
3056
  }, [
3050
3057
  I("div", es, [
3051
- Ae(c.$slots, "header", We(et({ title: e.title })), () => [
3058
+ be(c.$slots, "header", We(et({ title: e.title })), () => [
3052
3059
  I("strong", null, H(e.title), 1)
3053
3060
  ])
3054
3061
  ]),
3055
3062
  I("div", ts, [
3056
- Ae(c.$slots, "default")
3063
+ be(c.$slots, "default")
3057
3064
  ])
3058
3065
  ], 2));
3059
3066
  }
@@ -3082,14 +3089,14 @@ const Gl = (e, c, t) => {
3082
3089
  className: (y = e.config) == null ? void 0 : y.className
3083
3090
  }, {
3084
3091
  header: x((d) => [
3085
- Ae(a.$slots, "containerHeader", We(et(d)))
3092
+ be(a.$slots, "containerHeader", We(et(d)))
3086
3093
  ]),
3087
3094
  default: x(() => [
3088
3095
  N(pa, { config: n.value }, Ut({ _: 2 }, [
3089
3096
  Z(v(t), (d, g) => ({
3090
3097
  name: g,
3091
3098
  fn: x((p) => [
3092
- Ae(a.$slots, g, We(et(p)))
3099
+ be(a.$slots, g, We(et(p)))
3093
3100
  ])
3094
3101
  }))
3095
3102
  ]), 1032, ["config"])
@@ -3107,10 +3114,10 @@ const Gl = (e, c, t) => {
3107
3114
  Z(v(t), (p, f) => ({
3108
3115
  name: f,
3109
3116
  fn: x((V) => [
3110
- Ae(a.$slots, f, ze({ ref_for: !0 }, V))
3117
+ be(a.$slots, f, ze({ ref_for: !0 }, V))
3111
3118
  ])
3112
3119
  }))
3113
- ]), 1032, ["config"]))), 128)) : typeof e.config == "string" || (b = e.config) != null && b.slotKey ? Ae(a.$slots, typeof e.config == "string" ? e.config : (m = e.config) == null ? void 0 : m.slotKey, {}, void 0, void 0, 1) : ee("", !0)
3120
+ ]), 1032, ["config"]))), 128)) : typeof e.config == "string" || (b = e.config) != null && b.slotKey ? be(a.$slots, typeof e.config == "string" ? e.config : (m = e.config) == null ? void 0 : m.slotKey, {}, void 0, void 0, 1) : ee("", !0)
3114
3121
  ], 6));
3115
3122
  };
3116
3123
  }
@@ -3126,7 +3133,7 @@ const Gl = (e, c, t) => {
3126
3133
  Z(v(c), (n, a) => ({
3127
3134
  name: a,
3128
3135
  fn: x((s) => [
3129
- Ae(t.$slots, a, We(et(s)))
3136
+ be(t.$slots, a, We(et(s)))
3130
3137
  ])
3131
3138
  }))
3132
3139
  ]), 1032, ["config"])
@@ -3314,7 +3321,7 @@ const fs = (e, c) => {
3314
3321
  }, z = _("chart"), b = _(!1), m = Q(() => z.value === "table"), d = _([]), g = pt({ columns: [], hasPagination: !1 }), p = Te(z, async (Y) => {
3315
3322
  Y === "auxiliary-chart" && !r && (await Ze(), h(), p());
3316
3323
  }), f = _((le = (T = l.charts) == null ? void 0 : T[0]) == null ? void 0 : le.statCode), V = _({}), w = _(l.options), O = _(""), E = _(!1), A = _(!1), R = async (Y) => {
3317
- var W, Ne, Pe, Me, Ke, be, je, ke, ae, we, ht, Ct, He, at, B, K, $, oe, se, X, ce, Ee, Fe, Qe;
3324
+ var W, Ne, Pe, Me, Ke, Se, je, ke, ae, we, ht, Ct, He, at, B, K, $, oe, se, X, ce, Ee, Fe, Qe;
3318
3325
  try {
3319
3326
  E.value = !0;
3320
3327
  const Re = {
@@ -3326,7 +3333,7 @@ const fs = (e, c) => {
3326
3333
  ...Be,
3327
3334
  formatter: (ot, Ft, Sa) => Sa ?? "--"
3328
3335
  })), d.value = ((Me = (Pe = w.value) == null ? void 0 : Pe.dataset) == null ? void 0 : Me.source) || [];
3329
- const Ve = ((be = (Ke = w.value) == null ? void 0 : Ke["@data"]) == null ? void 0 : be.total) ?? ((ke = (je = w.value) == null ? void 0 : je["@data"]) == null ? void 0 : ke.avg) ?? ((we = (ae = w.value) == null ? void 0 : ae["@data"]) == null ? void 0 : we.value) ?? "";
3336
+ const Ve = ((Se = (Ke = w.value) == null ? void 0 : Ke["@data"]) == null ? void 0 : Se.total) ?? ((ke = (je = w.value) == null ? void 0 : je["@data"]) == null ? void 0 : ke.avg) ?? ((we = (ae = w.value) == null ? void 0 : ae["@data"]) == null ? void 0 : we.value) ?? "";
3330
3337
  O.value = Ve ? `${Ve}${((Ct = (ht = w.value) == null ? void 0 : ht["@data"]) == null ? void 0 : Ct.unit) ?? ""}` : "", A.value = !((B = (at = (He = w.value) == null ? void 0 : He.dataset) == null ? void 0 : at.source) != null && B.length);
3331
3338
  }
3332
3339
  return;
@@ -3374,9 +3381,9 @@ const fs = (e, c) => {
3374
3381
  var Y;
3375
3382
  (Y = P.value) == null || Y.start(l.title, g, d.value);
3376
3383
  }, q = (Y, W) => W && Y !== null && Y !== void 0 ? W.replace("{v}", Y) : Y, fe = async () => {
3377
- var Ke, be, je;
3384
+ var Ke, Se, je;
3378
3385
  const Y = `${l.title || ((Ke = l.requestParams) == null ? void 0 : Ke.statCode) || "图表"}.xlsx`, W = new ja.Workbook(), Ne = W.addWorksheet("Sheet1");
3379
- Ne.addRow((be = g.columns) == null ? void 0 : be.map((ke) => ke.label)), d.value.forEach((ke) => {
3386
+ Ne.addRow((Se = g.columns) == null ? void 0 : Se.map((ke) => ke.label)), d.value.forEach((ke) => {
3380
3387
  var ae;
3381
3388
  Ne.addRow(
3382
3389
  (ae = g.columns) == null ? void 0 : ae.map(({ prop: we, format: ht }) => q(ke[we], ht))
@@ -3393,7 +3400,7 @@ const fs = (e, c) => {
3393
3400
  const Y = z.value === "auxiliary-chart" ? r : o;
3394
3401
  if (Y) {
3395
3402
  const {
3396
- backgroundColor: be = "#fff",
3403
+ backgroundColor: Se = "#fff",
3397
3404
  excludeComponents: je = ["dataZoom"],
3398
3405
  extraTitle: ke
3399
3406
  } = l.downloadOptions;
@@ -3440,7 +3447,7 @@ const fs = (e, c) => {
3440
3447
  width: 800,
3441
3448
  height: 400
3442
3449
  }), ma(
3443
- Y.getDataURL({ backgroundColor: be, excludeComponents: je }),
3450
+ Y.getDataURL({ backgroundColor: Se, excludeComponents: je }),
3444
3451
  decodeURIComponent(_l(l.title || ((Pe = l.requestParams) == null ? void 0 : Pe.statCode) || "图表"))
3445
3452
  ), await Ze(), ae = ut(
3446
3453
  z.value === "auxiliary-chart" ? i : w.value
@@ -3484,7 +3491,7 @@ const fs = (e, c) => {
3484
3491
  onClick: J
3485
3492
  }, [
3486
3493
  e.showChartHeader ? (u(), k("div", ps, [
3487
- Ae(Y.$slots, "header", We(et({ title: e.title, subTitle: O.value, statCode: e.requestParams.statCode, option: w.value })), () => [
3494
+ be(Y.$slots, "header", We(et({ title: e.title, subTitle: O.value, statCode: e.requestParams.statCode, option: w.value })), () => [
3488
3495
  e.title || O.value ? (u(), k("div", ys, [
3489
3496
  N(ms, {
3490
3497
  content: e.title ?? ""
@@ -3495,16 +3502,16 @@ const fs = (e, c) => {
3495
3502
  (Ne = e.charts) != null && Ne.length && !e.hoverShowToolbar ? (u(), D(v(rl), {
3496
3503
  key: 0,
3497
3504
  modelValue: f.value,
3498
- "onUpdate:modelValue": W[0] || (W[0] = (be) => f.value = be),
3505
+ "onUpdate:modelValue": W[0] || (W[0] = (Se) => f.value = Se),
3499
3506
  size: "small",
3500
3507
  disabled: E.value,
3501
- onChange: W[1] || (W[1] = (be) => R({ statCode: be }))
3508
+ onChange: W[1] || (W[1] = (Se) => R({ statCode: Se }))
3502
3509
  }, {
3503
3510
  default: x(() => [
3504
- (u(!0), k(G, null, Z(e.charts, ({ statCode: be, title: je }) => (u(), D(v(gl), {
3505
- key: be,
3511
+ (u(!0), k(G, null, Z(e.charts, ({ statCode: Se, title: je }) => (u(), D(v(gl), {
3512
+ key: Se,
3506
3513
  label: je,
3507
- value: be
3514
+ value: Se
3508
3515
  }, null, 8, ["label", "value"]))), 128))
3509
3516
  ]),
3510
3517
  _: 1
@@ -3534,34 +3541,34 @@ const fs = (e, c) => {
3534
3541
  icon: v(Oa),
3535
3542
  disabled: E.value,
3536
3543
  text: "图表",
3537
- onClick: W[3] || (W[3] = (be) => z.value = "chart")
3544
+ onClick: W[3] || (W[3] = (Se) => z.value = "chart")
3538
3545
  }, null, 8, ["icon", "disabled"])) : b.value && z.value === "chart" ? (u(), D(v(Nt), {
3539
3546
  key: 1,
3540
3547
  icon: v(Na),
3541
3548
  disabled: E.value,
3542
3549
  text: "辅助图表",
3543
- onClick: W[4] || (W[4] = (be) => z.value = "auxiliary-chart")
3550
+ onClick: W[4] || (W[4] = (Se) => z.value = "auxiliary-chart")
3544
3551
  }, null, 8, ["icon", "disabled"])) : (u(), D(v(Nt), {
3545
3552
  key: 2,
3546
3553
  icon: v(_a),
3547
3554
  disabled: E.value,
3548
3555
  text: "列表",
3549
- onClick: W[5] || (W[5] = (be) => z.value = "table")
3556
+ onClick: W[5] || (W[5] = (Se) => z.value = "table")
3550
3557
  }, null, 8, ["icon", "disabled"]))
3551
3558
  ], 64)) : ee("", !0)
3552
3559
  ], 2)) : ee("", !0),
3553
3560
  (Me = e.charts) != null && Me.length && e.hoverShowToolbar ? (u(), D(v(rl), {
3554
3561
  key: 1,
3555
3562
  modelValue: f.value,
3556
- "onUpdate:modelValue": W[6] || (W[6] = (be) => f.value = be),
3563
+ "onUpdate:modelValue": W[6] || (W[6] = (Se) => f.value = Se),
3557
3564
  size: "small",
3558
- onChange: W[7] || (W[7] = (be) => R({ statCode: be }))
3565
+ onChange: W[7] || (W[7] = (Se) => R({ statCode: Se }))
3559
3566
  }, {
3560
3567
  default: x(() => [
3561
- (u(!0), k(G, null, Z(e.charts, ({ statCode: be, title: je }) => (u(), D(v(gl), {
3562
- key: be,
3568
+ (u(!0), k(G, null, Z(e.charts, ({ statCode: Se, title: je }) => (u(), D(v(gl), {
3569
+ key: Se,
3563
3570
  label: je,
3564
- value: be
3571
+ value: Se
3565
3572
  }, null, 8, ["label", "value"]))), 128))
3566
3573
  ]),
3567
3574
  _: 1
@@ -3594,15 +3601,15 @@ const fs = (e, c) => {
3594
3601
  key: 0,
3595
3602
  ref: "tableRef",
3596
3603
  modelValue: d.value,
3597
- "onUpdate:modelValue": W[8] || (W[8] = (be) => d.value = be),
3604
+ "onUpdate:modelValue": W[8] || (W[8] = (Se) => d.value = Se),
3598
3605
  "is-loading": E.value,
3599
- "onUpdate:isLoading": W[9] || (W[9] = (be) => E.value = be),
3606
+ "onUpdate:isLoading": W[9] || (W[9] = (Se) => E.value = Se),
3600
3607
  config: g
3601
3608
  }, null, 8, ["modelValue", "is-loading", "config"])) : ee("", !0)
3602
3609
  ], 512), [
3603
3610
  [_t, m.value]
3604
3611
  ]),
3605
- Ae(Y.$slots, "footer", We(et({ option: w.value })))
3612
+ be(Y.$slots, "footer", We(et({ option: w.value })))
3606
3613
  ]),
3607
3614
  N($n, {
3608
3615
  ref_key: "chartViewDialogRef",
@@ -3701,10 +3708,10 @@ const fs = (e, c) => {
3701
3708
  onVnodeMounted: i
3702
3709
  }), {
3703
3710
  header: x((f) => [
3704
- Ae(d.$slots, "chartHeader", We(et(f)))
3711
+ be(d.$slots, "chartHeader", We(et(f)))
3705
3712
  ]),
3706
3713
  footer: x((f) => [
3707
- Ae(d.$slots, "chartFooter", We(et(f)))
3714
+ be(d.$slots, "chartFooter", We(et(f)))
3708
3715
  ]),
3709
3716
  _: 3
3710
3717
  }, 16, ["title", "request-params", "charts", "options", "toolbar", "hover-show-toolbar", "show-empty", "clickable", "chart-clickable", "activated", "download-options", "theme", "class", "show-chart-header", "onClick", "onChartClick"])
@@ -3713,7 +3720,7 @@ const fs = (e, c) => {
3713
3720
  Z(v(a), (p, f) => ({
3714
3721
  name: f,
3715
3722
  fn: x((V) => [
3716
- Ae(d.$slots, f, We(et(V)))
3723
+ be(d.$slots, f, We(et(V)))
3717
3724
  ])
3718
3725
  }))
3719
3726
  ]), 1032, ["config", "style"]))
@@ -4009,7 +4016,7 @@ const fs = (e, c) => {
4009
4016
  }
4010
4017
  });
4011
4018
  function ha(e, c, t = "YYYY-MM-DD HH:mm:ss") {
4012
- return e && [Se.DATE_TIME, Se.DATE].includes(e) ? Math.max(t.length * 10, c.length * 22 + 20) : c.length * 22 + 20;
4019
+ return e && [Ae.DATE_TIME, Ae.DATE].includes(e) ? Math.max(t.length * 10, c.length * 22 + 20) : c.length * 22 + 20;
4013
4020
  }
4014
4021
  function Ui(e) {
4015
4022
  const c = (e == null ? void 0 : e.sortFields) || [], t = Object.entries((e == null ? void 0 : e.defaultSort) || {}).map(([l, n]) => ({
@@ -4287,7 +4294,7 @@ const js = { class: "zy-column-customize-drawer__footer" }, Ys = { class: "zy-co
4287
4294
  onConfirm: s
4288
4295
  }), {
4289
4296
  reference: x(() => [
4290
- Ae(o.$slots, "default")
4297
+ be(o.$slots, "default")
4291
4298
  ]),
4292
4299
  actions: x(({ confirm: i, cancel: y }) => [
4293
4300
  N(v(yt), {
@@ -4664,7 +4671,7 @@ const js = { class: "zy-column-customize-drawer__footer" }, Ys = { class: "zy-co
4664
4671
  _: 2
4665
4672
  }, [Z(v(r), (F, L) => ({
4666
4673
  name: L,
4667
- fn: x((P) => [Ae(R.$slots, L, We(et(P)))])
4674
+ fn: x((P) => [be(R.$slots, L, We(et(P)))])
4668
4675
  }))]), 1040, ["modelValue", "selections", "isLoading", "config", "request-fn", "onHeaderDragend"])), N(Ks, {
4669
4676
  ref: "columnCustomizeDrawer",
4670
4677
  "config-code": e.configCode,
@@ -6484,7 +6491,7 @@ const wu = /* @__PURE__ */ M({
6484
6491
  setup(e, { emit: c }) {
6485
6492
  const t = he(e, "modelValue"), l = e, n = c, a = Q(
6486
6493
  () => El.filter(
6487
- ({ dataTypes: s }) => s.includes(l.dataType || Se.TEXT)
6494
+ ({ dataTypes: s }) => s.includes(l.dataType || Ae.TEXT)
6488
6495
  )
6489
6496
  );
6490
6497
  return (s, o) => (u(), D(v(St), {
@@ -6514,7 +6521,7 @@ const wu = /* @__PURE__ */ M({
6514
6521
  }, Du = /* @__PURE__ */ M({
6515
6522
  __name: "SingleCondition",
6516
6523
  props: /* @__PURE__ */ ie({
6517
- dataType: { default: Se.TEXT },
6524
+ dataType: { default: Ae.TEXT },
6518
6525
  label: {},
6519
6526
  labelPosition: { default: "left" },
6520
6527
  fieldOptions: {},
@@ -6531,7 +6538,7 @@ const wu = /* @__PURE__ */ M({
6531
6538
  setup(e, { emit: c }) {
6532
6539
  const t = he(e, "modelValue"), l = e, n = c;
6533
6540
  t.value.operator || (t.value.operator = l.defaultOperator);
6534
- const a = (r) => [Se.NUMBER, Se.NUMBER_INT].includes(r), s = (r) => [Se.DATE, Se.DATE_TIME].includes(r), o = async () => {
6541
+ const a = (r) => [Ae.NUMBER, Ae.NUMBER_INT].includes(r), s = (r) => [Ae.DATE, Ae.DATE_TIME].includes(r), o = async () => {
6535
6542
  await Ze(), n("change", t.value);
6536
6543
  };
6537
6544
  return Te(
@@ -7850,7 +7857,7 @@ const pi = { class: "zy-search-form__inner" }, yi = M({ name: "ZYSearchForm" }),
7850
7857
  ])]),
7851
7858
  _: 1
7852
7859
  }),
7853
- Ae(ne.$slots, "extra-action")
7860
+ be(ne.$slots, "extra-action")
7854
7861
  ], 512)
7855
7862
  ], 512)
7856
7863
  ])), [
@@ -8019,7 +8026,7 @@ export {
8019
8026
  Ks as ZYColumnCustomizeDrawer,
8020
8027
  nr as ZYColumnCustomizeExportDrawer,
8021
8028
  Hs as ZYCustomExportTemplateTagList,
8022
- Se as ZYDataType,
8029
+ Ae as ZYDataType,
8023
8030
  Gi as ZYFieldPicker,
8024
8031
  Os as ZYFieldTreeSelect,
8025
8032
  xi as ZYGlobalProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zy-frontend/business",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",