@zl-ui-kit/components 0.14.2 → 0.14.4
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.
- package/README.md +43 -0
- package/dist/components/ZlAutoTooltip/index.css +1 -1
- package/dist/components/ZlAutoTooltip/index.vue.mjs +2 -2
- package/dist/components/ZlCardPage/index.vue.mjs +47 -42
- package/dist/components/ZlCheckAll/index.css +1 -1
- package/dist/components/ZlCheckAll/index.vue.mjs +1 -1
- package/dist/components/ZlCopy/index.css +1 -1
- package/dist/components/ZlCopy/index.vue.mjs +1 -1
- package/dist/components/ZlEmpty/index.css +1 -1
- package/dist/components/ZlEmpty/index.vue.mjs +2 -2
- package/dist/components/ZlFilePreview/FileFetchError.css +1 -1
- package/dist/components/ZlFilePreview/FileFetchError.vue.mjs +2 -2
- package/dist/components/ZlLayoutSwitch/index.css +1 -1
- package/dist/components/ZlLayoutSwitch/index.vue.mjs +2 -2
- package/dist/components/ZlLogin/components/LoginForm.css +1 -1
- package/dist/components/ZlLogin/components/LoginForm.vue.mjs +1 -1
- package/dist/components/ZlLogin/components/SlideChecker.css +1 -1
- package/dist/components/ZlLogin/components/SlideChecker.vue.mjs +3 -3
- package/dist/components/ZlPageContainer/index.css +1 -1
- package/dist/components/ZlPageContainer/index.vue.mjs +1 -1
- package/dist/components/ZlPagination/index.css +1 -1
- package/dist/components/ZlPagination/index.vue.mjs +1 -1
- package/dist/components/ZlPagination/usePagination.d.ts +8 -0
- package/dist/components/ZlPagination/usePagination.mjs +28 -23
- package/dist/components/ZlSorter/ZlSorterList.css +1 -1
- package/dist/components/ZlSorter/ZlSorterList.vue.mjs +2 -2
- package/dist/components/ZlSorter/index.css +1 -1
- package/dist/components/ZlSorter/index.vue.mjs +1 -1
- package/dist/components/ZlStep/index.css +1 -1
- package/dist/components/ZlStep/index.vue.mjs +2 -2
- package/dist/components/ZlTable/useTablePagination.mjs +21 -19
- package/dist/components/ZlText/index.css +1 -1
- package/dist/components/ZlText/index.vue.mjs +2 -2
- package/dist/components/ZlUpload/index.css +1 -1
- package/dist/components/ZlUpload/index.vue.mjs +2 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -839,6 +839,49 @@ const onStatusChange = () => cardPageRef.value?.refresh()
|
|
|
839
839
|
> 两种刷新语义别混用:`refreshDeps` 变化**一律回第 1 页**(换条件后停在旧页码没有意义);
|
|
840
840
|
> 需要「原地重查、页码不变」(行内改状态、删除后刷新)用 `ref.refresh()` / `ref.search.search(params)`。
|
|
841
841
|
|
|
842
|
+
#### 分页属性:透传 `usePagination`
|
|
843
|
+
|
|
844
|
+
`ZlSearchTable` / `ZlCardPage` 的 `:pagination` 直接透传给 `usePagination`(`ZlCardPage` 在对象模式 `{ rows, total }` 下也会合并这些展示配置,不会丢弃)。常用属性:
|
|
845
|
+
|
|
846
|
+
| 属性 | 类型 | 默认 | 说明 |
|
|
847
|
+
| ----------------- | ---------- | ------------ | ----------------------------------------------------- |
|
|
848
|
+
| `pageSize` | `number` | `30` | 每页条数(同时作为请求入参 `pageSize`) |
|
|
849
|
+
| `pageSizeOptions` | `number[]` | `[10,30,50]` | 页容量下拉可选项(自动并入当前 `pageSize`) |
|
|
850
|
+
| `simple` | `boolean` | `true` | 简易分页:小尺寸 + 去掉跳页输入框;`false` 显示完整版 |
|
|
851
|
+
| `totalVisible` | `boolean` | `true` | 是否显示总数(`showTotal` 为已废弃别名) |
|
|
852
|
+
| `pageSizeVisible` | `boolean` | `true` | 是否显示页容量选择器(`showPageSize` 为已废弃别名) |
|
|
853
|
+
| `pageNum` | `number` | `1` | 初始当前页(一般交给组件内部管理,无需手动传) |
|
|
854
|
+
|
|
855
|
+
```vue
|
|
856
|
+
<!-- ZlSearchTable:简易分页 + 自定义页容量选项 + 隐藏页容量选择器 -->
|
|
857
|
+
<ZlSearchTable
|
|
858
|
+
:request="getResourcePage"
|
|
859
|
+
:columns="columns"
|
|
860
|
+
:query-items="queryItems"
|
|
861
|
+
:pagination="{
|
|
862
|
+
pageSize: 4,
|
|
863
|
+
pageSizeOptions: [4, 8, 12],
|
|
864
|
+
simple: true,
|
|
865
|
+
totalVisible: true,
|
|
866
|
+
pageSizeVisible: false,
|
|
867
|
+
}"
|
|
868
|
+
height="320"
|
|
869
|
+
/>
|
|
870
|
+
|
|
871
|
+
<!-- ZlCardPage:对象模式同样生效(simple / pageSize / pageSizeOptions / totalVisible) -->
|
|
872
|
+
<ZlCardPage
|
|
873
|
+
:request="getResourcePage"
|
|
874
|
+
card-min-width="200px"
|
|
875
|
+
:pagination="{ pageSize: 4, pageSizeOptions: [4, 8], simple: true, totalVisible: false }"
|
|
876
|
+
>
|
|
877
|
+
<template #default="{ data }">
|
|
878
|
+
<el-card>{{ data.name }}</el-card>
|
|
879
|
+
</template>
|
|
880
|
+
</ZlCardPage>
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
> `total` / `pageNum` / `pageSize` 的实际数值由接口返回(或数组长度)决定,`usePagination` 仅用它们渲染;上面的 `pageSize` 会作为请求入参下发,后端按此分页即可。
|
|
884
|
+
|
|
842
885
|
#### ③ `ZlTable` + `ZlPagination` —— 自行 `usePaginationRequest`
|
|
843
886
|
|
|
844
887
|
```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-auto-tooltip[data-v-
|
|
1
|
+
.zl-auto-tooltip[data-v-ce4eb303]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ce4eb303"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
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
|
|
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 z, normalizeStyle as G, createBlock as g, createSlots as H, withCtx as P, renderSlot as v, renderList as k, normalizeProps as J, guardReactiveProps as Q, createCommentVNode as q, createElementVNode as $, Fragment as T, mergeProps as D, unref as h } from "vue";
|
|
2
2
|
import { usePageableRequest as U } from "@zl-ui-kit/composables";
|
|
3
|
-
import { isArray as
|
|
3
|
+
import { isArray as b } from "@zl-ui-kit/utils";
|
|
4
4
|
import X from "../ZlEmpty/index.vue.mjs";
|
|
5
5
|
import Y from "../ZlPagination/index.vue.mjs";
|
|
6
6
|
import ee from "../ZlSearch/index.vue.mjs";
|
|
7
7
|
import '../ZlSearch/index.css';/* empty css */
|
|
8
8
|
import { usePagination as te } from "../ZlPagination/usePagination.mjs";
|
|
9
|
-
const ae = { class: "zl-card-page__content" },
|
|
9
|
+
const ae = { class: "zl-card-page__content" }, se = { class: "zl-card-page__list" }, N = "search-", de = /* @__PURE__ */ M({
|
|
10
10
|
name: "ZlCardPage",
|
|
11
11
|
__name: "index",
|
|
12
12
|
props: {
|
|
@@ -18,9 +18,9 @@ const ae = { class: "zl-card-page__content" }, re = { class: "zl-card-page__list
|
|
|
18
18
|
cardMinWidth: {}
|
|
19
19
|
},
|
|
20
20
|
emits: ["search-reset"],
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
23
|
-
const e =
|
|
21
|
+
setup(s, { expose: R, emit: w }) {
|
|
22
|
+
const n = s, B = w, C = V(), E = _(null), p = u(() => {
|
|
23
|
+
const e = n.request;
|
|
24
24
|
if (e && typeof e == "object" && "run" in e && "data" in e && !("service" in e))
|
|
25
25
|
return {
|
|
26
26
|
instance: e,
|
|
@@ -30,102 +30,107 @@ const ae = { class: "zl-card-page__content" }, re = { class: "zl-card-page__list
|
|
|
30
30
|
const t = { manual: !0, initialData: [] };
|
|
31
31
|
if (typeof e == "function")
|
|
32
32
|
return { instance: null, service: e, options: t };
|
|
33
|
-
const { refreshDeps:
|
|
33
|
+
const { refreshDeps: r, refreshDepsAction: a, ...c } = e.options ?? {};
|
|
34
34
|
return {
|
|
35
35
|
instance: null,
|
|
36
36
|
service: e.service,
|
|
37
37
|
options: {
|
|
38
38
|
...c,
|
|
39
39
|
...t,
|
|
40
|
-
...
|
|
40
|
+
...r ? { refreshDeps: r, refreshDepsAction: a ?? (() => l()) } : {}
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
}), o = U(
|
|
43
|
+
}), o = U(p.value.service, p.value.options), I = p.value.instance ?? {
|
|
44
44
|
loading: o.loading,
|
|
45
45
|
data: o.data,
|
|
46
46
|
run: o.run,
|
|
47
47
|
params: o.params,
|
|
48
48
|
refresh: o.refresh
|
|
49
|
-
}, { loading:
|
|
50
|
-
if (
|
|
51
|
-
return
|
|
49
|
+
}, { loading: O, data: i, run: j, params: A, refresh: W } = I, y = u(() => A.value?.[0]), Z = u(() => {
|
|
50
|
+
if (b(i.value))
|
|
51
|
+
return n.pagination && { total: i.value.length, ...n.pagination };
|
|
52
52
|
{
|
|
53
|
-
const
|
|
54
|
-
return {
|
|
53
|
+
const e = i.value ?? {}, t = y.value ?? {}, r = n.pagination;
|
|
54
|
+
return {
|
|
55
|
+
...r,
|
|
56
|
+
pageNum: e.pageNum ?? t.pageNum ?? 1,
|
|
57
|
+
pageSize: e.pageSize ?? t.pageSize ?? r?.pageSize ?? 30,
|
|
58
|
+
total: e.total ?? 0
|
|
59
|
+
};
|
|
55
60
|
}
|
|
56
|
-
}), d = te(() => Z.value ?? !1),
|
|
57
|
-
() =>
|
|
61
|
+
}), d = te(() => Z.value ?? !1), S = u(
|
|
62
|
+
() => b(i.value) ? i.value : i.value?.rows ?? []
|
|
58
63
|
), K = u(() => {
|
|
59
64
|
const e = [];
|
|
60
65
|
return Object.keys(C).forEach((t) => {
|
|
61
|
-
t.startsWith(
|
|
66
|
+
t.startsWith(N) && t !== "search-actions" && e.push(t.slice(N.length));
|
|
62
67
|
}), e;
|
|
63
68
|
});
|
|
64
|
-
let
|
|
69
|
+
let f;
|
|
65
70
|
function l(e, t = {
|
|
66
71
|
pageNum: 1,
|
|
67
72
|
pageSize: d.value !== !1 ? d.value.pageSize : 30
|
|
68
73
|
}) {
|
|
69
|
-
|
|
70
|
-
...
|
|
74
|
+
f = {
|
|
75
|
+
...f,
|
|
71
76
|
...e,
|
|
72
77
|
...t
|
|
73
|
-
},
|
|
78
|
+
}, j(f);
|
|
74
79
|
}
|
|
75
80
|
return x(
|
|
76
|
-
() =>
|
|
81
|
+
() => n.immediate,
|
|
77
82
|
(e) => {
|
|
78
|
-
e && !
|
|
83
|
+
e && !n.queryItems.length && l();
|
|
79
84
|
},
|
|
80
85
|
{ immediate: !0, once: !0 }
|
|
81
86
|
), R({
|
|
82
87
|
/** 原地重查:用最近一次入参重新请求,保持当前页码(区别于 `search()` 会回到第 1 页) */
|
|
83
|
-
refresh:
|
|
88
|
+
refresh: W,
|
|
84
89
|
/** 最近一次请求的入参(`{ pageNum, pageSize, ...查询表单 }`),未请求过时为 `undefined` */
|
|
85
|
-
params:
|
|
90
|
+
params: y,
|
|
86
91
|
/** 重新查询并回到第 1 页;消费方可在 useRequest 的 refreshDepsAction 里调用 */
|
|
87
92
|
search: l
|
|
88
93
|
}), (e, t) => {
|
|
89
|
-
const
|
|
90
|
-
return L((m(),
|
|
94
|
+
const r = F("loading");
|
|
95
|
+
return L((m(), z("div", {
|
|
91
96
|
class: "zl-card-page",
|
|
92
|
-
style: G({ "--card-min-width":
|
|
97
|
+
style: G({ "--card-min-width": s.cardMinWidth })
|
|
93
98
|
}, [
|
|
94
|
-
|
|
99
|
+
s.queryItems.length || e.$slots["search-actions"] ? (m(), g(ee, {
|
|
95
100
|
key: 0,
|
|
96
101
|
ref_key: "searchRef",
|
|
97
102
|
ref: E,
|
|
98
|
-
items:
|
|
99
|
-
immediate:
|
|
103
|
+
items: s.queryItems,
|
|
104
|
+
immediate: s.immediate,
|
|
100
105
|
onSearch: l,
|
|
101
106
|
onReset: t[0] || (t[0] = (a) => B("search-reset"))
|
|
102
107
|
}, H({ _: 2 }, [
|
|
103
108
|
e.$slots["search-actions"] ? {
|
|
104
109
|
name: "actions",
|
|
105
|
-
fn:
|
|
106
|
-
|
|
110
|
+
fn: P(() => [
|
|
111
|
+
v(e.$slots, "search-actions")
|
|
107
112
|
]),
|
|
108
113
|
key: "0"
|
|
109
114
|
} : void 0,
|
|
110
115
|
k(K.value, (a) => ({
|
|
111
116
|
name: a,
|
|
112
|
-
fn:
|
|
113
|
-
|
|
117
|
+
fn: P((c) => [
|
|
118
|
+
v(e.$slots, `search-${a}`, J(Q(c)))
|
|
114
119
|
])
|
|
115
120
|
}))
|
|
116
121
|
]), 1032, ["items", "immediate"])) : q("", !0),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
key: a[
|
|
121
|
-
}, { ref_for: !0 }, { data: a }))), 128)) : (m(),
|
|
122
|
+
$("div", ae, [
|
|
123
|
+
$("div", se, [
|
|
124
|
+
S.value.length ? (m(!0), z(T, { key: 0 }, k(S.value, (a, c) => v(e.$slots, "default", D({
|
|
125
|
+
key: a[s.itemKey] || c
|
|
126
|
+
}, { ref_for: !0 }, { data: a }))), 128)) : (m(), g(X, { key: 1 }))
|
|
122
127
|
])
|
|
123
128
|
]),
|
|
124
|
-
|
|
129
|
+
s.pagination && h(d) !== !1 ? (m(), g(Y, D({ key: 1 }, h(d), {
|
|
125
130
|
onChange: t[1] || (t[1] = (a) => l(void 0, a))
|
|
126
131
|
}), null, 16)) : q("", !0)
|
|
127
132
|
], 4)), [
|
|
128
|
-
[
|
|
133
|
+
[r, h(O)]
|
|
129
134
|
]);
|
|
130
135
|
};
|
|
131
136
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-check[data-v-
|
|
1
|
+
.zl-check[data-v-32d89cdc]{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.zl-check__all[data-v-32d89cdc]{margin-bottom:4px}.zl-check[data-v-32d89cdc] .el-checkbox:not(.zl-check__all){padding:5px;background:var(--zl-primary-1, var(--el-color-primary-light-9, #e8f3ff))}.zl-check[data-v-32d89cdc] .el-checkbox:not(.zl-check__all):hover{background:var(--zl-fill-3, #e3e9ef)}
|
|
@@ -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 p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-32d89cdc"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-copy[data-v-
|
|
1
|
+
.zl-copy[data-v-3a18b7dd]{max-width:100%;display:inline-flex;align-items:center;gap:12px}.zl-copy__text[data-v-3a18b7dd]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
@@ -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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3a18b7dd"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-empty[data-v-
|
|
1
|
+
.zl-empty[data-v-8addc696]{padding-block:5vw;display:flex;flex-direction:column;justify-content:center;align-items:center}.zl-empty__icon[data-v-8addc696]{width:128px;max-width:100%}.zl-empty__icon svg[data-v-8addc696]{width:100%}.zl-empty__text[data-v-8addc696]{margin-top:18px;font-size:14px;line-height:22px;color:var(--zl-text-3, var(--el-text-color-secondary, #79879c))}
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8addc696"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-file-fetch-error[data-v-
|
|
1
|
+
.zl-file-fetch-error[data-v-3781f6e9]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--zl-text-3, var(--el-text-color-secondary));font-size:13px}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./FileFetchError2.vue.mjs";
|
|
2
2
|
import './FileFetchError.css';/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3781f6e9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=FileFetchError.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-layout-switch .el-radio-button[data-v-
|
|
1
|
+
.zl-layout-switch .el-radio-button[data-v-89c83ab6]{line-height:1;font-size:14px;padding:9px}
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-89c83ab6"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-login__action[data-v-
|
|
1
|
+
.zl-login__action[data-v-3a11bb99]{margin-top:15px}[data-v-3a11bb99] .el-form-item{margin-bottom:20px}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./LoginForm2.vue.mjs";
|
|
2
2
|
import './LoginForm.css';/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3a11bb99"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.slide-checker[data-v-
|
|
1
|
+
.slide-checker[data-v-e2067270]{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:32px;background-color:var(--slider-check-bg-color);pointer-events:none;--slider-check-bg-color: var(--zl-fill-3);--slider-check-progress: 0px;--slider-check-success-color: var(--zl-success-6, var(--el-color-success));--slider-check-trigger-border-color: var(--slider-check-bg-color);--slider-check-trigger-color: var(--zl-text-3)}.slide-checker__progress[data-v-e2067270]{position:absolute;top:0;left:0;width:var(--slider-check-progress);background-color:var(--slider-check-success-color);height:100%;opacity:.2}.slide-checker__trigger[data-v-e2067270]{position:absolute;left:var(--slider-check-progress);top:0;height:100%;aspect-ratio:1;display:flex;align-items:center;justify-content:center;background:var(--zl-bg-1, #fff);border:1px solid var(--slider-check-trigger-border-color);cursor:grab;pointer-events:auto;color:var(--slider-check-trigger-color)}.slide-checker__text[data-v-e2067270]{font-size:12px;color:var(--zl-text-3);user-select:none}.slide-checker.is-checked[data-v-e2067270]{--slider-check-bg-color: var(--slider-check-success-color)}.slide-checker.is-checked .slide-checker__text[data-v-e2067270]{color:#fff}.slide-checker.is-checked .slide-checker__trigger[data-v-e2067270]{border-color:transparent;color:var(--slider-check-success-color);pointer-events:none}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./SlideChecker2.vue.mjs";
|
|
2
2
|
import './SlideChecker.css';/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e2067270"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=SlideChecker.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-page-container[data-v-
|
|
1
|
+
.zl-page-container[data-v-4d3cbbba]{display:flex;flex-direction:column;box-sizing:border-box;height:100%;background-color:var(--zl-fill-2, #f0f2f7)}.zl-page-container__header[data-v-4d3cbbba]{display:flex;flex-shrink:0;gap:16px;align-items:center;margin-bottom:16px}.zl-page-container__main[data-v-4d3cbbba]{flex:1;min-width:0}.zl-page-container__title[data-v-4d3cbbba]{font-size:16px;font-weight:600;line-height:24px;color:var(--zl-text-1, #242e43)}.zl-page-container__description[data-v-4d3cbbba]{margin-top:2px;font-size:13px;line-height:20px;color:var(--zl-text-3, #79879c)}.zl-page-container__extra[data-v-4d3cbbba]{display:flex;flex-shrink:0;align-items:center;gap:8px}.zl-page-container__content[data-v-4d3cbbba]{flex:1;min-height:0;overflow:auto}
|
|
@@ -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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4d3cbbba"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.zl-pagination[data-v-
|
|
1
|
+
@charset "UTF-8";.zl-pagination[data-v-c7c49843]{padding:6px 16px;background-color:var(--zl-fill-1, #f9fbfd);justify-content:var(--zl-pagination-justify, flex-end)}.zl-pagination--left[data-v-c7c49843]{--zl-pagination-justify: flex-start}.zl-pagination--center[data-v-c7c49843]{--zl-pagination-justify: center}.zl-pagination--right[data-v-c7c49843]{--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-
|
|
4
|
+
const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c7c49843"]]);
|
|
5
5
|
export {
|
|
6
6
|
i as default
|
|
7
7
|
};
|
|
@@ -2,8 +2,16 @@ import { Ref } from 'vue';
|
|
|
2
2
|
export interface PaginationProps {
|
|
3
3
|
total?: number;
|
|
4
4
|
pageNum?: number;
|
|
5
|
+
/** EP 名,等价于 `pageNum`(上层已归一化时传入) */
|
|
6
|
+
currentPage?: number;
|
|
5
7
|
pageSize?: number;
|
|
6
8
|
pageSizeOptions?: number[];
|
|
9
|
+
/** EP 名,等价于 `pageSizeOptions`(上层已归一化时传入) */
|
|
10
|
+
pageSizes?: number[];
|
|
11
|
+
/** EP 名,显式给出时原样保留,不再按显隐配置重算 */
|
|
12
|
+
layout?: string;
|
|
13
|
+
/** EP 尺寸:'small' | 'default' | 'large' */
|
|
14
|
+
size?: string;
|
|
7
15
|
/** 是否展示总数(默认 true) */
|
|
8
16
|
totalVisible?: boolean;
|
|
9
17
|
/** 是否展示每页条数选择器(默认 true) */
|
|
@@ -1,42 +1,47 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
function
|
|
3
|
-
return
|
|
4
|
-
const o =
|
|
1
|
+
import { computed as w, toValue as y } from "vue";
|
|
2
|
+
function b(i) {
|
|
3
|
+
return w(() => {
|
|
4
|
+
const o = y(i);
|
|
5
5
|
if (o === !1)
|
|
6
6
|
return !1;
|
|
7
7
|
const {
|
|
8
|
-
|
|
8
|
+
// 对外名优先,EP 名回落:上层已归一化时只会有 EP 名
|
|
9
|
+
pageSizeOptions: s,
|
|
10
|
+
pageSizes: n,
|
|
9
11
|
pageSize: t = 30,
|
|
10
|
-
pageNum:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
pageNum: r,
|
|
13
|
+
currentPage: l,
|
|
14
|
+
layout: p,
|
|
15
|
+
size: u,
|
|
16
|
+
simple: a = !0,
|
|
17
|
+
totalVisible: g,
|
|
18
|
+
pageSizeVisible: c,
|
|
14
19
|
// 旧名回落:新名优先,两者都没给才用默认值
|
|
15
|
-
showTotal:
|
|
16
|
-
showPageSize:
|
|
17
|
-
...
|
|
18
|
-
} = o || {},
|
|
20
|
+
showTotal: z,
|
|
21
|
+
showPageSize: f,
|
|
22
|
+
...m
|
|
23
|
+
} = o || {}, S = g ?? z ?? !0, e = (s ?? n ?? [10, 30, 50]).slice();
|
|
19
24
|
e.includes(t) || e.push(t);
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
const h = p ?? [
|
|
26
|
+
S ? "total" : "",
|
|
27
|
+
c ?? f ?? e.length > 0 ? "sizes" : "",
|
|
23
28
|
"prev",
|
|
24
29
|
"pager",
|
|
25
30
|
"next",
|
|
26
|
-
|
|
31
|
+
a ? "" : "jumper"
|
|
27
32
|
].filter(Boolean).join(", ");
|
|
28
33
|
return {
|
|
29
34
|
// EP 2.7+ 官方推荐 size(原 arco simple/mini 语义映射为小尺寸)
|
|
30
|
-
size:
|
|
31
|
-
...
|
|
32
|
-
layout:
|
|
33
|
-
currentPage:
|
|
35
|
+
size: u ?? (a ? "small" : "default"),
|
|
36
|
+
...m,
|
|
37
|
+
layout: h,
|
|
38
|
+
currentPage: r ?? l ?? 1,
|
|
34
39
|
pageSize: t,
|
|
35
|
-
pageSizes: e.sort((
|
|
40
|
+
pageSizes: e.sort((d, P) => d - P)
|
|
36
41
|
};
|
|
37
42
|
});
|
|
38
43
|
}
|
|
39
44
|
export {
|
|
40
|
-
|
|
45
|
+
b as usePagination
|
|
41
46
|
};
|
|
42
47
|
//# sourceMappingURL=usePagination.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-sorter-list[data-v-
|
|
1
|
+
.zl-sorter-list[data-v-ce1f37dd]{display:flex}.zl-sorter-list__separator[data-v-ce1f37dd]{margin:4px 2px;width:1px;background-color:var(--zl-border-2, #e3e9ef)}.zl-sorter-list__separator[data-v-ce1f37dd]:last-child{display:none}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./ZlSorterList2.vue.mjs";
|
|
2
2
|
import './ZlSorterList.css';/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ce1f37dd"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=ZlSorterList.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-sorter[data-v-
|
|
1
|
+
.zl-sorter[data-v-769f5bf6]{display:inline-flex;align-items:center;cursor:pointer;gap:4px;font-size:12px;padding:1px 4px}.zl-sorter__label[data-v-769f5bf6]{color:var(--zl-text-2, #4d5e7d)}.zl-sorter__label.active[data-v-769f5bf6]{color:var(--zl-link-6, var(--el-color-primary, #3b82f6))}.zl-sorter__icon[data-v-769f5bf6]{display:inline-flex;flex-direction:column;font-size:8px;color:var(--zl-text-4, #b3c0cc)}.zl-sorter__icon .active[data-v-769f5bf6]{color:var(--zl-link-6, var(--el-color-primary, #3b82f6))}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.vue.mjs";
|
|
2
2
|
import './index.css';/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-769f5bf6"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-step[data-v-
|
|
1
|
+
.zl-step[data-v-a165ee6c]{width:100%}
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a165ee6c"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import { isArray as
|
|
2
|
-
import { ref as
|
|
3
|
-
import { usePagination as
|
|
1
|
+
import { isArray as d, isPlainObject as h } from "@zl-ui-kit/utils";
|
|
2
|
+
import { ref as g, computed as b, watch as j } from "vue";
|
|
3
|
+
import { usePagination as z } from "../ZlPagination/usePagination.mjs";
|
|
4
4
|
function C(c) {
|
|
5
|
-
const { data: s, pagination:
|
|
6
|
-
() =>
|
|
7
|
-
), t =
|
|
8
|
-
|
|
5
|
+
const { data: s, pagination: r, dataKey: l, emit: n } = c, u = z(
|
|
6
|
+
() => r.value === void 0 ? {} : r.value
|
|
7
|
+
), t = g([]), a = g({}), i = b(() => u.value ? Object.assign({}, u.value, a.value) : !1);
|
|
8
|
+
j(
|
|
9
9
|
s,
|
|
10
|
-
(
|
|
11
|
-
if (
|
|
12
|
-
t.value =
|
|
13
|
-
else if (
|
|
14
|
-
t.value =
|
|
15
|
-
const { pageNum: o, pageSize: m, total: v } =
|
|
16
|
-
|
|
10
|
+
(e) => {
|
|
11
|
+
if (d(e))
|
|
12
|
+
t.value = e;
|
|
13
|
+
else if (h(e)) {
|
|
14
|
+
t.value = e[l] ?? [];
|
|
15
|
+
const { pageNum: o, pageSize: m, total: v } = e;
|
|
16
|
+
a.value = Object.fromEntries(
|
|
17
|
+
Object.entries({ currentPage: o, pageSize: m, total: v }).filter(([, P]) => P != null)
|
|
18
|
+
);
|
|
17
19
|
}
|
|
18
20
|
},
|
|
19
21
|
{ immediate: !0 }
|
|
20
22
|
);
|
|
21
|
-
function
|
|
23
|
+
function p(e) {
|
|
22
24
|
const o = (i.value === !1 ? 30 : i.value.pageSize) ?? 30;
|
|
23
|
-
n("pagination-change", { pageNum:
|
|
25
|
+
n("pagination-change", { pageNum: e, pageSize: o }), n("page-change", e), a.value.currentPage = e;
|
|
24
26
|
}
|
|
25
|
-
function f(
|
|
26
|
-
n("pagination-change", { pageNum: 1, pageSize:
|
|
27
|
+
function f(e) {
|
|
28
|
+
n("pagination-change", { pageNum: 1, pageSize: e }), n("page-size-change", e), a.value.currentPage = 1, a.value.pageSize = e;
|
|
27
29
|
}
|
|
28
|
-
return { pagination: i, data: t, onPageSizeChange: f, onPageChange:
|
|
30
|
+
return { pagination: i, data: t, onPageSizeChange: f, onPageChange: p };
|
|
29
31
|
}
|
|
30
32
|
export {
|
|
31
33
|
C as useTablePagination
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-text[data-v-
|
|
1
|
+
.zl-text[data-v-30209711]{display:inline-flex;font-size:12px;line-height:20px}
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
4
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-30209711"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-upload[data-v-
|
|
1
|
+
.zl-upload[data-v-dacf78f1]{width:100%}.zl-upload__trigger[data-v-dacf78f1]{width:80px;height:80px;display:flex;align-items:center;justify-content:center;border:1px dashed var(--zl-border-3, var(--el-border-color));border-radius:6px;cursor:pointer}.zl-upload__trigger[data-v-dacf78f1]:hover{border-color:var(--zl-primary-6, var(--el-color-primary))}.zl-upload__item[data-v-dacf78f1]{display:flex;align-items:center;gap:8px;padding:4px 8px;width:100%}.zl-upload__item[data-v-dacf78f1]:hover{background:var(--zl-fill-1, var(--el-fill-color-light))}.zl-upload__item-thumbnail[data-v-dacf78f1]{height:32px;width:32px;object-fit:cover;cursor:pointer}.zl-upload__item-name[data-v-dacf78f1]{flex:1;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.zl-upload__item-op[data-v-dacf78f1]{color:var(--zl-text-2)}.zl-upload__tip[data-v-dacf78f1]{font-size:12px;color:var(--zl-text-3);line-height:18px;white-space:pre-wrap;word-break:break-all}
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dacf78f1"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index.vue.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zl-ui-kit/components",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.4",
|
|
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.14.
|
|
43
|
-
"@zl-ui-kit/
|
|
44
|
-
"@zl-ui-kit/
|
|
42
|
+
"@zl-ui-kit/composables": "0.14.4",
|
|
43
|
+
"@zl-ui-kit/utils": "0.14.4",
|
|
44
|
+
"@zl-ui-kit/icons": "0.14.4"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@vueuse/core": "^12.3.0 || ^13.0.0 || ^14.0.0 || ^15.0.0",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@jichuang/tsconfig": "1.0.0",
|
|
102
102
|
"@jichuang/eslint-config": "1.0.0",
|
|
103
103
|
"@jichuang/vite-config": "1.0.0",
|
|
104
|
-
"@zl-ui-kit/theme": "0.14.
|
|
104
|
+
"@zl-ui-kit/theme": "0.14.4"
|
|
105
105
|
},
|
|
106
106
|
"repository": {
|
|
107
107
|
"type": "git",
|