@zl-ui-kit/components 0.18.1 → 0.18.3

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,11 +1,11 @@
1
- import { defineComponent as E, useSlots as K, useAttrs as T, computed as m, ref as b, toRef as V, watch as L, openBlock as y, createElementBlock as W, createBlock as Z, createSlots as q, withCtx as f, renderSlot as d, renderList as S, normalizeProps as $, guardReactiveProps as P, createCommentVNode as x, createVNode as F, mergeProps as G, unref as h } from "vue";
1
+ import { defineComponent as D, useSlots as K, useAttrs as T, computed as m, ref as v, toRef as V, watch as _, openBlock as y, createElementBlock as W, createBlock as Z, createSlots as q, withCtx as f, renderSlot as d, renderList as S, normalizeProps as $, guardReactiveProps as P, createCommentVNode as x, createVNode as F, mergeProps as G, unref as h } from "vue";
2
2
  import { usePageableRequest as H } from "@zl-ui-kit/composables";
3
3
  import J from "../ZlSearch/index.vue.mjs";
4
4
  import '../ZlTable/index.css';import '../ZlSearch/index.css';/* empty css */
5
5
  import M from "../ZlTable/index.vue.mjs";
6
6
  /* empty css */
7
7
  import { useTablePagination as Q } from "../ZlTable/useTablePagination.mjs";
8
- const U = { class: "zl-search-table" }, R = "search-", ne = /* @__PURE__ */ E({
8
+ const U = { class: "zl-search-table" }, R = "search-", ne = /* @__PURE__ */ D({
9
9
  name: "ZlSearchTable",
10
10
  inheritAttrs: !1,
11
11
  __name: "index",
@@ -14,11 +14,12 @@ const U = { class: "zl-search-table" }, R = "search-", ne = /* @__PURE__ */ E({
14
14
  request: {},
15
15
  columns: { default: () => [] },
16
16
  queryItems: { default: () => [] },
17
- pagination: { type: [Object, Boolean] }
17
+ pagination: { type: [Object, Boolean] },
18
+ hideEmptyLabel: { type: Boolean, default: !1 }
18
19
  },
19
20
  emits: ["search-reset"],
20
- setup(r, { expose: w, emit: z }) {
21
- const s = r, B = z, k = K(), p = T(), g = m(() => {
21
+ setup(r, { expose: B, emit: w }) {
22
+ const s = r, z = w, k = K(), p = T(), g = m(() => {
22
23
  const e = [], t = [];
23
24
  return Object.keys(k).forEach((a) => {
24
25
  if (a.startsWith(R)) {
@@ -27,7 +28,7 @@ const U = { class: "zl-search-table" }, R = "search-", ne = /* @__PURE__ */ E({
27
28
  } else
28
29
  e.push(a);
29
30
  }), { table: e, search: t };
30
- }), n = b(null), i = b(null), v = m(() => {
31
+ }), n = v(null), i = v(null), b = m(() => {
31
32
  const e = { manual: !0, initialData: [] };
32
33
  return typeof s.request == "function" ? { service: s.request, options: e } : {
33
34
  ...s.request,
@@ -36,13 +37,13 @@ const U = { class: "zl-search-table" }, R = "search-", ne = /* @__PURE__ */ E({
36
37
  }), {
37
38
  loading: A,
38
39
  data: C,
39
- run: I,
40
- params: _,
40
+ run: E,
41
+ params: I,
41
42
  refresh: j
42
- } = H(v.value.service, v.value.options), N = m(() => _.value?.[0]), O = p.dataKey ?? p["data-key"] ?? "rows", { data: D, pagination: l } = Q({
43
+ } = H(b.value.service, b.value.options), L = m(() => I.value?.[0]), N = p.dataKey ?? p["data-key"] ?? "rows", { data: O, pagination: l } = Q({
43
44
  data: C,
44
45
  pagination: V(s, "pagination"),
45
- dataKey: O,
46
+ dataKey: N,
46
47
  // 分页事件由 ZlTable 内部处理,这里无需重复派发
47
48
  emit: {}
48
49
  });
@@ -52,19 +53,19 @@ const U = { class: "zl-search-table" }, R = "search-", ne = /* @__PURE__ */ E({
52
53
  ...u,
53
54
  ...e,
54
55
  ...t
55
- }, I(u);
56
+ }, E(u);
56
57
  }
57
- return L(
58
+ return _(
58
59
  () => s.immediate,
59
60
  (e) => {
60
61
  e && !s.queryItems.length && o();
61
62
  },
62
63
  { immediate: !0, once: !0 }
63
- ), w({
64
+ ), B({
64
65
  /** 原地重查:用最近一次入参重新请求,保持当前页码(区别于 `search()` 会回到第 1 页) */
65
66
  refresh: j,
66
67
  /** 最近一次请求的入参(`{ pageNum, pageSize, ...查询表单 }`) */
67
- params: N,
68
+ params: L,
68
69
  /** 内部 ZlSearch 实例,`params` / `search()` / `reset()` 等可直接调用 */
69
70
  search: new Proxy(
70
71
  {},
@@ -96,8 +97,9 @@ const U = { class: "zl-search-table" }, R = "search-", ne = /* @__PURE__ */ E({
96
97
  ref: n,
97
98
  items: r.queryItems,
98
99
  immediate: r.immediate,
100
+ "hide-empty-label": r.hideEmptyLabel,
99
101
  onSearch: o,
100
- onReset: t[0] || (t[0] = (a) => B("search-reset"))
102
+ onReset: t[0] || (t[0] = (a) => z("search-reset"))
101
103
  }, q({ _: 2 }, [
102
104
  e.$slots.searchActions || e.$slots["search-actions"] ? {
103
105
  name: "actions",
@@ -112,13 +114,13 @@ const U = { class: "zl-search-table" }, R = "search-", ne = /* @__PURE__ */ E({
112
114
  d(e.$slots, a.slot, $(P(c)))
113
115
  ])
114
116
  }))
115
- ]), 1032, ["items", "immediate"])) : x("", !0),
117
+ ]), 1032, ["items", "immediate", "hide-empty-label"])) : x("", !0),
116
118
  F(M, G({
117
119
  ref_key: "tableRef",
118
120
  ref: i,
119
121
  class: "zl-search-table__table",
120
122
  columns: r.columns,
121
- data: h(D),
123
+ data: h(O),
122
124
  pagination: h(l),
123
125
  loading: h(A)
124
126
  }, e.$attrs, {
@@ -1,4 +1,4 @@
1
- import { defineComponent as k, computed as t, ref as i, openBlock as c, createElementBlock as u, normalizeClass as f, createBlock as h, createCommentVNode as r, createVNode as g, withCtx as V, createElementVNode as x, renderSlot as I } from "vue";
1
+ import { defineComponent as k, computed as t, ref as s, openBlock as c, createElementBlock as u, normalizeClass as f, createBlock as h, createCommentVNode as r, createVNode as g, withCtx as V, createElementVNode as x, renderSlot as I } from "vue";
2
2
  import $ from "../ZlAutoTooltip/index.vue.mjs";
3
3
  import v from "../ZlIcon/index.vue.mjs";
4
4
  const N = { class: "zl-tag__text" }, A = /* @__PURE__ */ k({
@@ -38,9 +38,9 @@ const N = { class: "zl-tag__text" }, A = /* @__PURE__ */ k({
38
38
  },
39
39
  emits: ["close", "update:visible", "update:selected", "select"],
40
40
  setup(e, { emit: b }) {
41
- const l = e, o = b, m = t(() => l.size ?? "small"), z = t(() => l.disabled), n = t(() => l.dotIcon ? "zl:dot-fill" : l.icon), s = i(l.defaultVisible), y = t(() => l.visible ?? s.value), B = t(() => !l.selectable && l.fill), a = i(l.defaultSelected), p = t(() => l.selected ?? a.value);
41
+ const l = e, o = b, m = t(() => l.size ?? "small"), z = t(() => l.disabled), n = t(() => l.dotIcon ? "zl:dot-fill" : l.icon), i = s(l.defaultVisible), y = t(() => l.visible ?? i.value), B = t(() => !l.selectable && l.fill), a = s(l.defaultSelected), p = t(() => l.selected ?? a.value);
42
42
  function C(d) {
43
- s.value = !1, o("update:visible", !1), o("close", d);
43
+ i.value = !1, o("update:visible", !1), o("close", d);
44
44
  }
45
45
  function S() {
46
46
  l.selectable && (a.value = !a.value, o("update:selected", a.value), o("select", a.value));
@@ -83,7 +83,7 @@ const N = { class: "zl-tag__text" }, A = /* @__PURE__ */ k({
83
83
  class: "zl-tag__close",
84
84
  onClick: C
85
85
  }, [
86
- g(v, { icon: "zl:cross" })
86
+ g(v, { icon: "zl:disagree" })
87
87
  ])) : r("", !0)
88
88
  ], 2));
89
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zl-ui-kit/components",
3
- "version": "0.18.1",
3
+ "version": "0.18.3",
4
4
  "type": "module",
5
5
  "description": "ZL UI 业务组件库(Element Plus 体系,Zl 前缀)——首批:Icon/AutoTooltip/Tag/CornerTag/Text/Title/Copy/Empty/Pagination/DictTag",
6
6
  "license": "MIT",
@@ -39,9 +39,9 @@
39
39
  "file-type": "^20.4.1",
40
40
  "dt-sql-parser": "^4.3.1",
41
41
  "sql-formatter": "^15.4.2",
42
- "@zl-ui-kit/composables": "0.18.1",
43
- "@zl-ui-kit/icons": "0.18.1",
44
- "@zl-ui-kit/utils": "0.18.1"
42
+ "@zl-ui-kit/composables": "0.18.3",
43
+ "@zl-ui-kit/utils": "0.18.3",
44
+ "@zl-ui-kit/icons": "0.18.3"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@vueuse/core": "^12.3.0 || ^13.0.0 || ^14.0.0 || ^15.0.0",
@@ -98,10 +98,10 @@
98
98
  "@vue-office/pdf": "^2.0.10",
99
99
  "@vue-office/pptx": "1.0.1",
100
100
  "echarts": "^5.6.0",
101
- "@jichuang/tsconfig": "1.0.0",
102
101
  "@jichuang/eslint-config": "1.0.0",
102
+ "@zl-ui-kit/theme": "0.18.3",
103
103
  "@jichuang/vite-config": "1.0.0",
104
- "@zl-ui-kit/theme": "0.18.1"
104
+ "@jichuang/tsconfig": "1.0.0"
105
105
  },
106
106
  "repository": {
107
107
  "type": "git",