@zl-ui-kit/components 0.7.2 → 0.8.1

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,4 +1,4 @@
1
- import { defineComponent as Z, computed as C, resolveComponent as s, openBlock as n, createElementBlock as c, Fragment as p, renderList as g, createBlock as r, withCtx as i, createVNode as h, mergeProps as f, withModifiers as _, createCommentVNode as d, createElementVNode as j, toDisplayString as v, renderSlot as E, normalizeProps as O, createTextVNode as z, unref as S, normalizeClass as T } from "vue";
1
+ import { defineComponent as Z, computed as C, resolveComponent as s, openBlock as n, createElementBlock as c, Fragment as p, renderList as g, createBlock as r, withCtx as i, createVNode as h, mergeProps as f, withModifiers as _, createCommentVNode as a, createElementVNode as j, toDisplayString as v, renderSlot as E, normalizeProps as O, createTextVNode as z, unref as S, normalizeClass as T } from "vue";
2
2
  import { useZlT as D } from "@zl-ui-kit/composables";
3
3
  import { isPlainObject as F } from "@zl-ui-kit/utils";
4
4
  import w from "../ZlIcon/index.vue.mjs";
@@ -19,8 +19,8 @@ const q = { class: "zl-action-list" }, G = {
19
19
  separator: { type: Boolean }
20
20
  },
21
21
  emits: ["action"],
22
- setup(k, { emit: P }) {
23
- const { t: M } = D(), t = k, B = P, y = C(() => {
22
+ setup(b, { emit: P }) {
23
+ const { t: M } = D(), t = b, B = P, k = C(() => {
24
24
  if (t.iconMore === !0)
25
25
  return { icon: "zl:operate-color" };
26
26
  if (F(t.iconMore))
@@ -31,8 +31,8 @@ const q = { class: "zl-action-list" }, G = {
31
31
  }
32
32
  const u = C(() => {
33
33
  const o = t.actions.filter((l) => {
34
- const a = N(l);
35
- return typeof l.visible == "function" ? l.visible(...t.visibleArgs, l) && a : (l.visible === void 0 || !!l.visible) && a;
34
+ const d = N(l);
35
+ return typeof l.visible == "function" ? l.visible(...t.visibleArgs, l) && d : (l.visible === void 0 || !!l.visible) && d;
36
36
  });
37
37
  return o.length <= t.listCount ? { list: o, more: [] } : {
38
38
  list: o.slice(0, t.listCount - 1),
@@ -40,15 +40,15 @@ const q = { class: "zl-action-list" }, G = {
40
40
  };
41
41
  });
42
42
  function m(o) {
43
- B("action", o, ...t.actionArgs), typeof o.handler == "function" && o.handler(...t.actionArgs, o);
43
+ o.disabled || (B("action", o, ...t.actionArgs), typeof o.handler == "function" && o.handler(...t.actionArgs, o));
44
44
  }
45
45
  return (o, l) => {
46
- const a = s("el-tooltip"), b = s("el-link"), V = s("el-dropdown-item"), $ = s("el-dropdown-menu"), x = s("el-dropdown");
46
+ const d = s("el-tooltip"), y = s("el-link"), V = s("el-dropdown-item"), $ = s("el-dropdown-menu"), x = s("el-dropdown");
47
47
  return n(), c("div", q, [
48
48
  (n(!0), c(p, null, g(u.value.list, (e) => (n(), c(p, {
49
49
  key: e.label
50
50
  }, [
51
- e.tooltip && e.icon ? (n(), r(a, {
51
+ e.tooltip && e.icon ? (n(), r(d, {
52
52
  key: 0,
53
53
  content: e.label,
54
54
  placement: "top"
@@ -61,23 +61,24 @@ const q = { class: "zl-action-list" }, G = {
61
61
  }), null, 16, ["icon", "onClick"])
62
62
  ]),
63
63
  _: 2
64
- }, 1032, ["content"])) : (n(), r(b, {
64
+ }, 1032, ["content"])) : (n(), r(y, {
65
65
  key: 1,
66
66
  class: "zl-action-list__action",
67
67
  type: "primary",
68
68
  underline: !1,
69
+ disabled: e.disabled,
69
70
  onClick: _((L) => m(e), ["stop"])
70
71
  }, {
71
72
  default: i(() => [
72
73
  e.icon ? (n(), r(w, f({
73
74
  key: 0,
74
75
  icon: e.icon
75
- }, { ref_for: !0 }, e.iconProps), null, 16, ["icon"])) : d("", !0),
76
+ }, { ref_for: !0 }, e.iconProps), null, 16, ["icon"])) : a("", !0),
76
77
  j("span", null, v(e.label), 1)
77
78
  ]),
78
79
  _: 2
79
- }, 1032, ["onClick"])),
80
- k.separator ? (n(), c("div", G)) : d("", !0)
80
+ }, 1032, ["disabled", "onClick"])),
81
+ b.separator ? (n(), c("div", G)) : a("", !0)
81
82
  ], 64))), 128)),
82
83
  u.value.more.length ? (n(), r(x, {
83
84
  key: 0,
@@ -100,7 +101,7 @@ const q = { class: "zl-action-list" }, G = {
100
101
  key: 0,
101
102
  icon: e.icon,
102
103
  class: T(e.iconClass)
103
- }, null, 8, ["icon", "class"])) : d("", !0),
104
+ }, null, 8, ["icon", "class"])) : a("", !0),
104
105
  z(" " + v(e.label), 1)
105
106
  ]),
106
107
  _: 2
@@ -111,7 +112,7 @@ const q = { class: "zl-action-list" }, G = {
111
112
  ]),
112
113
  default: i(() => [
113
114
  E(o.$slots, "more", {}, () => [
114
- y.value ? (n(), r(A, O(f({ key: 0 }, y.value)), null, 16)) : (n(), r(b, {
115
+ k.value ? (n(), r(A, O(f({ key: 0 }, k.value)), null, 16)) : (n(), r(y, {
115
116
  key: 1,
116
117
  class: "zl-action-list__more-icon",
117
118
  type: "primary",
@@ -127,7 +128,7 @@ const q = { class: "zl-action-list" }, G = {
127
128
  ])
128
129
  ]),
129
130
  _: 3
130
- })) : d("", !0)
131
+ })) : a("", !0)
131
132
  ]);
132
133
  };
133
134
  }
@@ -18,8 +18,11 @@ export interface ActionItem {
18
18
  divided?: boolean;
19
19
  /** 权限键(三段式,经 usePermission 校验) */
20
20
  permission?: string | string[];
21
- /** 显隐判定(接收 visibleArgs) */
22
- visible?: (...args: any[]) => boolean;
21
+ /**
22
+ * 显隐控制:布尔值直接判定;函数接收 `visibleArgs`(末尾追加 action 自身)后判定。
23
+ * 与权限取交集:两者都通过才展示。
24
+ */
25
+ visible?: boolean | ((...args: any[]) => boolean);
23
26
  /** 点击处理(接收 actionArgs) */
24
27
  handler?: (...args: any[]) => void;
25
28
  [key: string]: any;
@@ -1,16 +1,41 @@
1
1
  import { SearchItem } from '../../types';
2
+ /**
3
+ * useRequest / usePageableRequest 实例形态(消费方自行创建后传入)。
4
+ * 仅用结构特征识别:带 `run`/`data`/`loading` 且**没有** `service` 字段即视为实例。
5
+ */
6
+ interface UseRequestInstance {
7
+ /**
8
+ * `run` 的返回类型各家不一致:`useRequest` 返回 `Promise`,`usePageableRequest`
9
+ * 声明为 `void`,因此这里放宽成 any(本组件只调不读返回值)。
10
+ */
11
+ run: (...args: any[]) => any;
12
+ data: any;
13
+ loading: any;
14
+ params?: any;
15
+ refresh?: () => void;
16
+ [key: string]: any;
17
+ }
2
18
  type __VLS_Props = {
3
19
  immediate?: boolean;
4
- /** 请求函数,或 { service, options } */
20
+ /**
21
+ * 请求来源,三种形态任一:
22
+ * 1. 请求函数 `(...args) => Promise`
23
+ * 2. `{ service, options }` 对象(ZlCardPage 内部再包一层 usePageableRequest)
24
+ * 3. `useRequest` / `usePageableRequest` 实例(消费方自行创建,便于接管 loading/refresh)
25
+ */
5
26
  request: ((...args: any[]) => Promise<any>) | {
6
27
  service: (...args: any[]) => Promise<any>;
7
28
  options?: Record<string, any>;
8
- };
29
+ } | UseRequestInstance;
9
30
  queryItems?: SearchItem[];
10
31
  pagination?: Record<string, any> | boolean;
11
32
  itemKey?: string;
12
33
  cardMinWidth?: string;
13
34
  };
35
+ declare function search(form?: Record<string, any>, pagination?: {
36
+ pageNum: number;
37
+ pageSize: number;
38
+ }): void;
14
39
  declare function __VLS_template(): {
15
40
  attrs: Partial<{}>;
16
41
  slots: Partial<Record<`search-${string}`, (_: {
@@ -41,6 +66,7 @@ declare function __VLS_template(): {
41
66
  readonly model?: Record<string, any> | undefined;
42
67
  readonly immediate?: boolean | undefined;
43
68
  readonly disabled?: boolean | undefined;
69
+ readonly labelsVisible?: boolean | undefined;
44
70
  readonly showLabels?: boolean | undefined;
45
71
  readonly onSearch?: ((params: Record<string, any>) => any) | undefined;
46
72
  readonly onReset?: (() => any) | undefined;
@@ -237,6 +263,7 @@ declare function __VLS_template(): {
237
263
  model?: Record<string, any>;
238
264
  immediate?: boolean;
239
265
  disabled?: boolean;
266
+ labelsVisible?: boolean;
240
267
  showLabels?: boolean;
241
268
  }> & Readonly<{
242
269
  onSearch?: ((params: Record<string, any>) => any) | undefined;
@@ -252,6 +279,7 @@ declare function __VLS_template(): {
252
279
  immediate: boolean;
253
280
  disabled: boolean;
254
281
  items: SearchItem[];
282
+ labelsVisible: boolean;
255
283
  showLabels: boolean;
256
284
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
257
285
  beforeCreate?: (() => void) | (() => void)[];
@@ -277,17 +305,19 @@ declare function __VLS_template(): {
277
305
  immediate: boolean;
278
306
  disabled: boolean;
279
307
  items: SearchItem[];
308
+ labelsVisible: boolean;
280
309
  showLabels: boolean;
281
310
  }> & Omit<Readonly<{
282
311
  items?: SearchItem[];
283
312
  model?: Record<string, any>;
284
313
  immediate?: boolean;
285
314
  disabled?: boolean;
315
+ labelsVisible?: boolean;
286
316
  showLabels?: boolean;
287
317
  }> & Readonly<{
288
318
  onSearch?: ((params: Record<string, any>) => any) | undefined;
289
319
  onReset?: (() => any) | undefined;
290
- }>, "search" | "reset" | "params" | ("immediate" | "disabled" | "items" | "showLabels")> & {
320
+ }>, "search" | "reset" | "params" | ("immediate" | "disabled" | "items" | "labelsVisible" | "showLabels")> & {
291
321
  params: Record<string, any>;
292
322
  search: () => Promise<void>;
293
323
  reset: () => Promise<void>;
@@ -327,7 +357,8 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
327
357
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
328
358
  refresh: () => void;
329
359
  params: import('vue').ComputedRef<unknown>;
330
- search: {};
360
+ /** 重新查询并回到第 1 页;消费方可在 useRequest 的 refreshDepsAction 里调用 */
361
+ search: typeof search;
331
362
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
332
363
  "search-reset": () => any;
333
364
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -346,6 +377,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
346
377
  readonly model?: Record<string, any> | undefined;
347
378
  readonly immediate?: boolean | undefined;
348
379
  readonly disabled?: boolean | undefined;
380
+ readonly labelsVisible?: boolean | undefined;
349
381
  readonly showLabels?: boolean | undefined;
350
382
  readonly onSearch?: ((params: Record<string, any>) => any) | undefined;
351
383
  readonly onReset?: (() => any) | undefined;
@@ -542,6 +574,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
542
574
  model?: Record<string, any>;
543
575
  immediate?: boolean;
544
576
  disabled?: boolean;
577
+ labelsVisible?: boolean;
545
578
  showLabels?: boolean;
546
579
  }> & Readonly<{
547
580
  onSearch?: ((params: Record<string, any>) => any) | undefined;
@@ -557,6 +590,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
557
590
  immediate: boolean;
558
591
  disabled: boolean;
559
592
  items: SearchItem[];
593
+ labelsVisible: boolean;
560
594
  showLabels: boolean;
561
595
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
562
596
  beforeCreate?: (() => void) | (() => void)[];
@@ -582,17 +616,19 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
582
616
  immediate: boolean;
583
617
  disabled: boolean;
584
618
  items: SearchItem[];
619
+ labelsVisible: boolean;
585
620
  showLabels: boolean;
586
621
  }> & Omit<Readonly<{
587
622
  items?: SearchItem[];
588
623
  model?: Record<string, any>;
589
624
  immediate?: boolean;
590
625
  disabled?: boolean;
626
+ labelsVisible?: boolean;
591
627
  showLabels?: boolean;
592
628
  }> & Readonly<{
593
629
  onSearch?: ((params: Record<string, any>) => any) | undefined;
594
630
  onReset?: (() => any) | undefined;
595
- }>, "search" | "reset" | "params" | ("immediate" | "disabled" | "items" | "showLabels")> & {
631
+ }>, "search" | "reset" | "params" | ("immediate" | "disabled" | "items" | "labelsVisible" | "showLabels")> & {
596
632
  params: Record<string, any>;
597
633
  search: () => Promise<void>;
598
634
  reset: () => Promise<void>;
@@ -1,12 +1,12 @@
1
- import { defineComponent as Z, useSlots as j, ref as x, computed as l, watch as K, resolveDirective as M, withDirectives as V, openBlock as u, createElementBlock as q, normalizeStyle as F, createBlock as p, createSlots as L, withCtx as P, renderSlot as h, renderList as S, normalizeProps as G, guardReactiveProps as H, createCommentVNode as k, createElementVNode as z, Fragment as J, mergeProps as $, unref as g } from "vue";
2
- import { usePageableRequest as Q } from "@zl-ui-kit/composables";
3
- import { isArray as w } from "@zl-ui-kit/utils";
4
- import T from "../ZlEmpty/index.vue.mjs";
5
- import U from "../ZlPagination/index.vue.mjs";
6
- import X from "../ZlSearch/index.vue.mjs";
1
+ import { defineComponent as M, useSlots as V, ref as _, computed as u, watch as x, resolveDirective as F, withDirectives as L, openBlock as m, createElementBlock as P, normalizeStyle as G, createBlock as v, createSlots as H, withCtx as S, renderSlot as h, renderList as k, normalizeProps as J, guardReactiveProps as Q, createCommentVNode as q, createElementVNode as z, Fragment as T, mergeProps as $, unref as g } from "vue";
2
+ import { usePageableRequest as U } from "@zl-ui-kit/composables";
3
+ import { isArray as D } from "@zl-ui-kit/utils";
4
+ import X from "../ZlEmpty/index.vue.mjs";
5
+ import Y from "../ZlPagination/index.vue.mjs";
6
+ import ee from "../ZlSearch/index.vue.mjs";
7
7
  import '../ZlSearch/index.css';/* empty css */
8
- import { usePagination as Y } from "../ZlPagination/usePagination.mjs";
9
- const ee = { class: "zl-card-page__content" }, te = { class: "zl-card-page__list" }, D = "search-", ce = /* @__PURE__ */ Z({
8
+ import { usePagination as te } from "../ZlPagination/usePagination.mjs";
9
+ const ae = { class: "zl-card-page__content" }, re = { class: "zl-card-page__list" }, b = "search-", de = /* @__PURE__ */ M({
10
10
  name: "ZlCardPage",
11
11
  __name: "index",
12
12
  props: {
@@ -18,123 +18,117 @@ const ee = { class: "zl-card-page__content" }, te = { class: "zl-card-page__list
18
18
  cardMinWidth: {}
19
19
  },
20
20
  emits: ["search-reset"],
21
- setup(s, { expose: B, emit: C }) {
22
- const r = s, R = C, E = j(), c = x(null), v = l(() => {
21
+ setup(r, { expose: R, emit: w }) {
22
+ const i = r, B = w, C = V(), E = _(null), f = u(() => {
23
+ const e = i.request;
24
+ if (e && typeof e == "object" && "run" in e && "data" in e && !("service" in e))
25
+ return {
26
+ instance: e,
27
+ service: () => Promise.resolve([]),
28
+ options: { manual: !0, initialData: [] }
29
+ };
23
30
  const t = { manual: !0, initialData: [] };
24
- if (typeof r.request == "function")
25
- return { service: r.request, options: t };
26
- const {
27
- refreshDeps: e,
28
- refreshDepsAction: o,
29
- ...a
30
- } = r.request.options ?? {};
31
+ if (typeof e == "function")
32
+ return { instance: null, service: e, options: t };
33
+ const { refreshDeps: n, refreshDepsAction: a, ...c } = e.options ?? {};
31
34
  return {
32
- ...r.request,
35
+ instance: null,
36
+ service: e.service,
33
37
  options: {
38
+ ...c,
34
39
  ...t,
35
- ...a,
36
- manual: !0,
37
- ...e ? { refreshDeps: e, refreshDepsAction: o ?? (() => i()) } : {}
40
+ ...n ? { refreshDeps: n, refreshDepsAction: a ?? (() => l()) } : {}
38
41
  }
39
42
  };
40
- }), {
41
- loading: I,
42
- data: n,
43
- run: N,
44
- params: _,
45
- refresh: b
46
- } = Q(v.value.service, v.value.options), A = l(() => _.value?.[0]), O = l(() => {
47
- if (w(n.value))
48
- return r.pagination && { total: n.value.length, ...r.pagination };
43
+ }), o = U(f.value.service, f.value.options), I = f.value.instance ?? {
44
+ loading: o.loading,
45
+ data: o.data,
46
+ run: o.run,
47
+ params: o.params,
48
+ refresh: o.refresh
49
+ }, { loading: N, data: s, run: O, params: j, refresh: A } = I, W = u(() => j.value?.[0]), Z = u(() => {
50
+ if (D(s.value))
51
+ return i.pagination && { total: s.value.length, ...i.pagination };
49
52
  {
50
- const { pageNum: t, pageSize: e, total: o = 0 } = n.value;
51
- return { pageNum: t, pageSize: e, total: o };
53
+ const { pageNum: e, pageSize: t, total: n = 0 } = s.value;
54
+ return { pageNum: e, pageSize: t, total: n };
52
55
  }
53
- }), m = Y(() => O.value ?? !1), y = l(
54
- () => w(n.value) ? n.value : n.value?.rows ?? []
55
- ), W = l(() => {
56
- const t = [];
57
- return Object.keys(E).forEach((e) => {
58
- e.startsWith(D) && e !== "search-actions" && t.push(e.slice(D.length));
59
- }), t;
56
+ }), d = te(() => Z.value ?? !1), y = u(
57
+ () => D(s.value) ? s.value : s.value?.rows ?? []
58
+ ), K = u(() => {
59
+ const e = [];
60
+ return Object.keys(C).forEach((t) => {
61
+ t.startsWith(b) && t !== "search-actions" && e.push(t.slice(b.length));
62
+ }), e;
60
63
  });
61
- let d;
62
- function i(t, e = {
64
+ let p;
65
+ function l(e, t = {
63
66
  pageNum: 1,
64
- pageSize: m.value !== !1 ? m.value.pageSize : 30
67
+ pageSize: d.value !== !1 ? d.value.pageSize : 30
65
68
  }) {
66
- d = {
67
- ...d,
68
- ...t,
69
- ...e
70
- }, N(d);
69
+ p = {
70
+ ...p,
71
+ ...e,
72
+ ...t
73
+ }, O(p);
71
74
  }
72
- return K(
73
- () => r.immediate,
74
- (t) => {
75
- t && !r.queryItems.length && i();
75
+ return x(
76
+ () => i.immediate,
77
+ (e) => {
78
+ e && !i.queryItems.length && l();
76
79
  },
77
80
  { immediate: !0, once: !0 }
78
- ), B({
79
- refresh: b,
80
- params: A,
81
- search: new Proxy(
82
- {},
83
- {
84
- get(t, e) {
85
- return !c.value && e === "search" ? i : c.value?.[e];
86
- },
87
- has(t, e) {
88
- return e in (c.value ?? {});
89
- }
90
- }
91
- )
92
- }), (t, e) => {
93
- const o = M("loading");
94
- return V((u(), q("div", {
81
+ ), R({
82
+ refresh: A,
83
+ params: W,
84
+ /** 重新查询并回到第 1 页;消费方可在 useRequest 的 refreshDepsAction 里调用 */
85
+ search: l
86
+ }), (e, t) => {
87
+ const n = F("loading");
88
+ return L((m(), P("div", {
95
89
  class: "zl-card-page",
96
- style: F({ "--card-min-width": s.cardMinWidth })
90
+ style: G({ "--card-min-width": r.cardMinWidth })
97
91
  }, [
98
- s.queryItems.length || t.$slots["search-actions"] ? (u(), p(X, {
92
+ r.queryItems.length || e.$slots["search-actions"] ? (m(), v(ee, {
99
93
  key: 0,
100
94
  ref_key: "searchRef",
101
- ref: c,
102
- items: s.queryItems,
103
- immediate: s.immediate,
104
- onSearch: i,
105
- onReset: e[0] || (e[0] = (a) => R("search-reset"))
106
- }, L({ _: 2 }, [
107
- t.$slots["search-actions"] ? {
95
+ ref: E,
96
+ items: r.queryItems,
97
+ immediate: r.immediate,
98
+ onSearch: l,
99
+ onReset: t[0] || (t[0] = (a) => B("search-reset"))
100
+ }, H({ _: 2 }, [
101
+ e.$slots["search-actions"] ? {
108
102
  name: "actions",
109
- fn: P(() => [
110
- h(t.$slots, "search-actions")
103
+ fn: S(() => [
104
+ h(e.$slots, "search-actions")
111
105
  ]),
112
106
  key: "0"
113
107
  } : void 0,
114
- S(W.value, (a) => ({
108
+ k(K.value, (a) => ({
115
109
  name: a,
116
- fn: P((f) => [
117
- h(t.$slots, `search-${a}`, G(H(f)))
110
+ fn: S((c) => [
111
+ h(e.$slots, `search-${a}`, J(Q(c)))
118
112
  ])
119
113
  }))
120
- ]), 1032, ["items", "immediate"])) : k("", !0),
121
- z("div", ee, [
122
- z("div", te, [
123
- y.value.length ? (u(!0), q(J, { key: 0 }, S(y.value, (a, f) => h(t.$slots, "default", $({
124
- key: a[s.itemKey] || f
125
- }, { ref_for: !0 }, { data: a }))), 128)) : (u(), p(T, { key: 1 }))
114
+ ]), 1032, ["items", "immediate"])) : q("", !0),
115
+ z("div", ae, [
116
+ z("div", re, [
117
+ y.value.length ? (m(!0), P(T, { key: 0 }, k(y.value, (a, c) => h(e.$slots, "default", $({
118
+ key: a[r.itemKey] || c
119
+ }, { ref_for: !0 }, { data: a }))), 128)) : (m(), v(X, { key: 1 }))
126
120
  ])
127
121
  ]),
128
- s.pagination && g(m) !== !1 ? (u(), p(U, $({ key: 1 }, g(m), {
129
- onChange: e[1] || (e[1] = (a) => i(void 0, a))
130
- }), null, 16)) : k("", !0)
122
+ r.pagination && g(d) !== !1 ? (m(), v(Y, $({ key: 1 }, g(d), {
123
+ onChange: t[1] || (t[1] = (a) => l(void 0, a))
124
+ }), null, 16)) : q("", !0)
131
125
  ], 4)), [
132
- [o, g(I)]
126
+ [n, g(N)]
133
127
  ]);
134
128
  };
135
129
  }
136
130
  });
137
131
  export {
138
- ce as default
132
+ de as default
139
133
  };
140
134
  //# sourceMappingURL=index.vue.mjs.map
@@ -7,10 +7,15 @@ type __VLS_Props = {
7
7
  corner?: boolean | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
8
8
  value?: string;
9
9
  simple?: boolean;
10
+ /** 是否展示字典项图标(默认 true) */
11
+ iconVisible?: boolean;
12
+ /** @deprecated 用 `iconVisible`:全库显隐统一用 visible 语义,且不要用反向命名 */
10
13
  hideIcon?: boolean;
11
14
  };
12
15
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
16
  corner: boolean | "top-left" | "top-right" | "bottom-left" | "bottom-right";
17
+ iconVisible: boolean;
18
+ hideIcon: boolean;
14
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
20
  export default _default;
16
21
  //# sourceMappingURL=index.vue.d.ts.map
@@ -1,10 +1,10 @@
1
- import { defineComponent as f, watch as y, computed as r, openBlock as n, createBlock as s, mergeProps as u, withCtx as d, createTextVNode as p, toDisplayString as m } from "vue";
1
+ import { defineComponent as f, watch as y, computed as l, openBlock as n, createBlock as s, mergeProps as u, withCtx as d, createTextVNode as p, toDisplayString as m } from "vue";
2
2
  import { useDict as g, useDictStore as h } from "@zl-ui-kit/composables";
3
- import _ from "../ZlTag/ZlCornerTag.vue.mjs";
3
+ import B from "../ZlTag/ZlCornerTag.vue.mjs";
4
4
  import '../ZlTag/index.css';import '../ZlTag/ZlCornerTag.css';/* empty css */
5
- import B from "../ZlTag/index.vue.mjs";
5
+ import _ from "../ZlTag/index.vue.mjs";
6
6
  /* empty css */
7
- const b = /* @__PURE__ */ f({
7
+ const K = /* @__PURE__ */ f({
8
8
  name: "ZlDictTag",
9
9
  __name: "index",
10
10
  props: {
@@ -13,44 +13,45 @@ const b = /* @__PURE__ */ f({
13
13
  corner: { type: [Boolean, String], default: !1 },
14
14
  value: {},
15
15
  simple: { type: Boolean },
16
- hideIcon: { type: Boolean }
16
+ iconVisible: { type: Boolean, default: void 0 },
17
+ hideIcon: { type: Boolean, default: void 0 }
17
18
  },
18
- setup(a) {
19
- const e = a, v = g(e.dictKey, { data: e.dict });
19
+ setup(i) {
20
+ const e = i, v = g(e.dictKey, { data: e.dict });
20
21
  y(
21
22
  () => e.dict,
22
23
  (t) => {
23
24
  if (t?.length) {
24
- const { dictStore: i } = h();
25
- i.value = { ...i.value, [e.dictKey]: t };
25
+ const { dictStore: a } = h();
26
+ a.value = { ...a.value, [e.dictKey]: t };
26
27
  }
27
28
  },
28
29
  { deep: !1 }
29
30
  );
30
- const o = r(() => v.value.find((t) => t.value === e.value)), c = r(() => o.value ? {
31
+ const o = l(() => v.value.find((t) => t.value === e.value)), r = l(() => o.value ? {
31
32
  color: e.simple ? void 0 : o.value.color,
32
- icon: e.hideIcon ? void 0 : o.value.icon
33
- } : {}), l = r(() => e.corner === !0 ? "top-right" : e.corner);
34
- return (t, i) => l.value ? (n(), s(_, u({
33
+ icon: e.iconVisible ?? !e.hideIcon ? o.value.icon : void 0
34
+ } : {}), c = l(() => e.corner === !0 ? "top-right" : e.corner);
35
+ return (t, a) => c.value ? (n(), s(B, u({
35
36
  key: 0,
36
37
  class: "zl-dict-corner-tag"
37
- }, { ...c.value, ...t.$attrs }, { position: l.value }), {
38
+ }, { ...r.value, ...t.$attrs }, { position: c.value }), {
38
39
  default: d(() => [
39
- p(m(o.value?.label || a.value), 1)
40
+ p(m(o.value?.label || i.value), 1)
40
41
  ]),
41
42
  _: 1
42
- }, 16, ["position"])) : (n(), s(B, u({
43
+ }, 16, ["position"])) : (n(), s(_, u({
43
44
  key: 1,
44
45
  class: "zl-dict-tag"
45
- }, { ...c.value, ...t.$attrs }), {
46
+ }, { ...r.value, ...t.$attrs }), {
46
47
  default: d(() => [
47
- p(m(o.value?.label || a.value), 1)
48
+ p(m(o.value?.label || i.value), 1)
48
49
  ]),
49
50
  _: 1
50
51
  }, 16));
51
52
  }
52
53
  });
53
54
  export {
54
- b as default
55
+ K as default
55
56
  };
56
57
  //# sourceMappingURL=index.vue.mjs.map
@@ -1 +1 @@
1
- @charset "UTF-8";.zl-pagination[data-v-5eee61b9]{padding:6px 16px;background-color:var(--zl-fill-1, #f9fbfd);justify-content:var(--zl-pagination-justify, flex-end)}.zl-pagination--left[data-v-5eee61b9]{--zl-pagination-justify: flex-start}.zl-pagination--center[data-v-5eee61b9]{--zl-pagination-justify: center}.zl-pagination--right[data-v-5eee61b9]{--zl-pagination-justify: flex-end}
1
+ @charset "UTF-8";.zl-pagination[data-v-fd07517c]{padding:6px 16px;background-color:var(--zl-fill-1, #f9fbfd);justify-content:var(--zl-pagination-justify, flex-end)}.zl-pagination--left[data-v-fd07517c]{--zl-pagination-justify: flex-start}.zl-pagination--center[data-v-fd07517c]{--zl-pagination-justify: center}.zl-pagination--right[data-v-fd07517c]{--zl-pagination-justify: flex-end}
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.vue.mjs";
2
2
  import './index.css';/* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5eee61b9"]]);
4
+ const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fd07517c"]]);
5
5
  export {
6
6
  i as default
7
7
  };
@@ -4,7 +4,13 @@ export interface PaginationProps {
4
4
  pageNum?: number;
5
5
  pageSize?: number;
6
6
  pageSizeOptions?: number[];
7
+ /** 是否展示总数(默认 true) */
8
+ totalVisible?: boolean;
9
+ /** 是否展示每页条数选择器(默认 true) */
10
+ pageSizeVisible?: boolean;
11
+ /** @deprecated 用 `totalVisible`(全库显隐统一用 visible 语义) */
7
12
  showTotal?: boolean;
13
+ /** @deprecated 用 `pageSizeVisible`(全库显隐统一用 visible 语义) */
8
14
  showPageSize?: boolean;
9
15
  simple?: boolean;
10
16
  [key: string]: any;