vlite3 0.3.7 → 0.3.8
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/components/Button.vue.js +4 -4
- package/components/DataList/DataList.vue.js +44 -52
- package/components/DataTable/DataTable.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.js +155 -159
- package/components/Empty/Empty.vue.d.ts +27 -0
- package/components/Empty/Empty.vue.js +33 -0
- package/components/Empty/Empty.vue2.js +4 -0
- package/components/Empty/index.d.ts +1 -0
- package/components/Screen/Screen.vue.js +145 -141
- package/components/Screen/types.d.ts +2 -0
- package/package.json +1 -1
- package/style.css +5 -2
- package/types/button.d.ts +1 -1
package/components/Button.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as B, useSlots as I, computed as r, inject as R, withDirectives as S, openBlock as s, createElementBlock as g, normalizeClass as o, createBlock as u, createCommentVNode as h, renderSlot as f, createTextVNode as m, toDisplayString as b, unref as G } from "vue";
|
|
2
2
|
import d from "./Icon.vue.js";
|
|
3
3
|
import { vRipple as j } from "../directives/vRipple.js";
|
|
4
|
-
const V = ["type", "disabled"],
|
|
4
|
+
const V = ["type", "disabled"], E = /* @__PURE__ */ B({
|
|
5
5
|
__name: "Button",
|
|
6
6
|
props: {
|
|
7
7
|
variant: { default: "primary" },
|
|
@@ -15,7 +15,7 @@ const V = ["type", "disabled"], N = /* @__PURE__ */ B({
|
|
|
15
15
|
text: {},
|
|
16
16
|
rounded: { default: "md" },
|
|
17
17
|
textClass: {},
|
|
18
|
-
|
|
18
|
+
iconClass: {},
|
|
19
19
|
iconRightClass: {},
|
|
20
20
|
asIcon: { type: Boolean }
|
|
21
21
|
},
|
|
@@ -104,7 +104,7 @@ const V = ["type", "disabled"], N = /* @__PURE__ */ B({
|
|
|
104
104
|
}, null, 8, ["class"])) : e.icon ? (s(), u(d, {
|
|
105
105
|
key: 1,
|
|
106
106
|
icon: e.icon,
|
|
107
|
-
class: o(["pointer-events-none", [e.
|
|
107
|
+
class: o(["pointer-events-none", [e.iconClass, a.value, l.value ? "mx-auto" : ""]])
|
|
108
108
|
}, null, 8, ["icon", "class"])) : h("", !0),
|
|
109
109
|
e.textClass ? (s(), g("span", {
|
|
110
110
|
key: 2,
|
|
@@ -127,5 +127,5 @@ const V = ["type", "disabled"], N = /* @__PURE__ */ B({
|
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
export {
|
|
130
|
-
|
|
130
|
+
E as default
|
|
131
131
|
};
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as b, ref as D, watch as r, computed as u, openBlock as a, createElementBlock as o, normalizeClass as f, Fragment as P, renderList as y, renderSlot as s, createBlock as k, resolveDynamicComponent as h, createVNode as I, unref as v, mergeProps as p, createCommentVNode as C } from "vue";
|
|
2
|
+
import L from "../Pagination/Pagination.vue.js";
|
|
3
|
+
import x from "../Empty/Empty.vue.js";
|
|
4
|
+
const z = { class: "flex flex-col w-full" }, E = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "h-48 rounded-lg bg-gray-200 animate-pulse w-full"
|
|
7
7
|
}, F = {
|
|
8
|
-
key: 1,
|
|
9
|
-
class: "flex flex-col items-center justify-center p-12 text-center bg-gray-50 border border-gray-200 rounded-lg"
|
|
10
|
-
}, O = { class: "flex h-12 w-12 items-center justify-center rounded-full bg-gray-100 mb-4" }, U = { class: "text-lg font-semibold text-gray-900" }, V = { class: "mt-2 text-sm text-gray-500" }, W = {
|
|
11
8
|
key: 3,
|
|
12
9
|
class: "mt-8 w-full"
|
|
13
|
-
},
|
|
10
|
+
}, W = /* @__PURE__ */ b({
|
|
14
11
|
__name: "DataList",
|
|
15
12
|
props: {
|
|
16
13
|
data: { default: () => [] },
|
|
@@ -35,87 +32,82 @@ const S = { class: "flex flex-col w-full" }, z = {
|
|
|
35
32
|
delete: {}
|
|
36
33
|
},
|
|
37
34
|
emits: ["change"],
|
|
38
|
-
setup(e, { emit:
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
() =>
|
|
35
|
+
setup(e, { emit: T }) {
|
|
36
|
+
const n = e, w = T, i = D(n.pageInfo?.itemsPerPage || n.paginationProps?.itemsPerPage || 10);
|
|
37
|
+
r(
|
|
38
|
+
() => n.pageInfo?.itemsPerPage,
|
|
42
39
|
(t) => {
|
|
43
|
-
t !== void 0 && (
|
|
40
|
+
t !== void 0 && (i.value = t);
|
|
44
41
|
}
|
|
45
|
-
),
|
|
46
|
-
() =>
|
|
42
|
+
), r(
|
|
43
|
+
() => n.paginationProps?.itemsPerPage,
|
|
47
44
|
(t) => {
|
|
48
|
-
t !== void 0 && (
|
|
45
|
+
t !== void 0 && (i.value = t);
|
|
49
46
|
}
|
|
50
47
|
);
|
|
51
|
-
let
|
|
52
|
-
const g = (t,
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
let m = null;
|
|
49
|
+
const g = (t, c) => {
|
|
50
|
+
m && clearTimeout(m), m = setTimeout(() => {
|
|
51
|
+
w("change", { page: t, limit: c });
|
|
55
52
|
}, 10);
|
|
56
53
|
}, N = (t) => {
|
|
57
|
-
g(t,
|
|
58
|
-
},
|
|
59
|
-
|
|
54
|
+
g(t, i.value);
|
|
55
|
+
}, $ = (t) => {
|
|
56
|
+
i.value = t, g(n.pageInfo?.currentPage || 1, t);
|
|
60
57
|
};
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
return (t,
|
|
64
|
-
e.loading ? (a(),
|
|
58
|
+
u(() => n.pageInfo?.currentPage || 1);
|
|
59
|
+
const B = u(() => n.pageInfo?.totalPages || 1);
|
|
60
|
+
return (t, c) => (a(), o("div", z, [
|
|
61
|
+
e.loading ? (a(), o("div", {
|
|
65
62
|
key: 0,
|
|
66
|
-
class:
|
|
63
|
+
class: f(e.className)
|
|
67
64
|
}, [
|
|
68
|
-
(a(),
|
|
65
|
+
(a(), o(P, null, y(8, (l) => s(t.$slots, "skeleton", {
|
|
69
66
|
key: "skeleton-" + l,
|
|
70
67
|
index: l
|
|
71
68
|
}, () => [
|
|
72
|
-
|
|
73
|
-
e.skeleton || e.skelton ? (a(), k(
|
|
69
|
+
s(t.$slots, "skelton", { index: l }, () => [
|
|
70
|
+
e.skeleton || e.skelton ? (a(), k(h(e.skeleton || e.skelton), { key: 0 })) : (a(), o("div", E))
|
|
74
71
|
])
|
|
75
72
|
])), 64))
|
|
76
|
-
], 2)) : !e.data || e.data.length === 0 ? (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
]),
|
|
84
|
-
c("h3", U, p(e.emptyTitle), 1),
|
|
85
|
-
c("p", V, p(e.emptyDescription), 1)
|
|
86
|
-
])
|
|
87
|
-
])) : (a(), n("div", {
|
|
73
|
+
], 2)) : !e.data || e.data.length === 0 ? s(t.$slots, "empty", { key: 1 }, () => [
|
|
74
|
+
I(v(x), {
|
|
75
|
+
title: e.emptyTitle,
|
|
76
|
+
description: e.emptyDescription,
|
|
77
|
+
icon: e.emptyIcon
|
|
78
|
+
}, null, 8, ["title", "description", "icon"])
|
|
79
|
+
]) : (a(), o("div", {
|
|
88
80
|
key: 2,
|
|
89
|
-
class:
|
|
81
|
+
class: f(e.className)
|
|
90
82
|
}, [
|
|
91
|
-
(a(!0),
|
|
83
|
+
(a(!0), o(P, null, y(e.data, (l, d) => s(t.$slots, "item", {
|
|
92
84
|
key: d,
|
|
93
85
|
item: l,
|
|
94
86
|
data: e.data,
|
|
95
87
|
index: d
|
|
96
88
|
}, () => [
|
|
97
|
-
e.item ? (a(), k(
|
|
89
|
+
e.item ? (a(), k(h(e.item), p({
|
|
98
90
|
key: 0,
|
|
99
91
|
item: l,
|
|
100
92
|
data: e.data,
|
|
101
93
|
index: d
|
|
102
|
-
}, { ref_for: !0 }, e.itemProps), null, 16, ["item", "data", "index"])) :
|
|
94
|
+
}, { ref_for: !0 }, e.itemProps), null, 16, ["item", "data", "index"])) : C("", !0)
|
|
103
95
|
])), 128))
|
|
104
96
|
], 2)),
|
|
105
|
-
e.showPagination && e.pageInfo &&
|
|
106
|
-
I(L
|
|
97
|
+
e.showPagination && e.pageInfo && B.value > 1 ? (a(), o("div", F, [
|
|
98
|
+
I(v(L), p({
|
|
107
99
|
"current-page": e.pageInfo?.currentPage,
|
|
108
100
|
"total-pages": e.pageInfo?.totalPages,
|
|
109
101
|
"total-items": e.pageInfo?.totalItems,
|
|
110
102
|
navType: "icon"
|
|
111
103
|
}, e.paginationProps, {
|
|
112
104
|
onChange: N,
|
|
113
|
-
"onUpdate:itemsPerPage":
|
|
105
|
+
"onUpdate:itemsPerPage": $
|
|
114
106
|
}), null, 16, ["current-page", "total-pages", "total-items"])
|
|
115
|
-
])) :
|
|
107
|
+
])) : C("", !0)
|
|
116
108
|
]));
|
|
117
109
|
}
|
|
118
110
|
});
|
|
119
111
|
export {
|
|
120
|
-
|
|
112
|
+
W as default
|
|
121
113
|
};
|