y-admin-ui 0.4.9 → 0.5.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.
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/lib/y-admin-ui.js +26947 -15
- package/lib/y-admin-ui.js.gz +0 -0
- package/lib/y-admin-ui.umd.cjs +15 -15
- package/package.json +3 -2
- package/lib/index.6e70d2da.js +0 -25956
- package/lib/index.6e70d2da.js.gz +0 -0
- package/lib/index.e986195f.js +0 -6
- package/lib/index.fcb0faf9.js +0 -182
- package/lib/y-file-grid-item.3bec6068.js +0 -99
- package/lib/y-file-grid.5eb564d7.js +0 -84
- package/lib/y-file-sort.057cb87a.js +0 -34
- package/lib/y-file-table-item.89223297.js +0 -85
- package/lib/y-file-table.e530cc48.js +0 -132
package/lib/index.6e70d2da.js.gz
DELETED
Binary file
|
package/lib/index.e986195f.js
DELETED
package/lib/index.fcb0faf9.js
DELETED
@@ -1,182 +0,0 @@
|
|
1
|
-
import { defineComponent as k, reactive as $, ref as f, inject as x, onMounted as j, watch as E, computed as n, nextTick as K, unref as U, resolveComponent as z, openBlock as Y, createBlock as G, withCtx as I, createVNode as J, renderSlot as Q } from "vue";
|
2
|
-
const X = {
|
3
|
-
value: {
|
4
|
-
require: !0,
|
5
|
-
default: ""
|
6
|
-
},
|
7
|
-
placeholder: String,
|
8
|
-
automaticDropdown: Boolean,
|
9
|
-
popperClass: String,
|
10
|
-
popperOptions: Object,
|
11
|
-
popperWidth: [Number, String],
|
12
|
-
selectedLabel: {
|
13
|
-
type: [String, Number],
|
14
|
-
required: !0
|
15
|
-
},
|
16
|
-
selected: {
|
17
|
-
type: Array,
|
18
|
-
required: !0,
|
19
|
-
default: () => []
|
20
|
-
},
|
21
|
-
visible: {
|
22
|
-
type: Boolean,
|
23
|
-
required: !0
|
24
|
-
}
|
25
|
-
}, Z = {
|
26
|
-
multiple: Boolean,
|
27
|
-
disabled: Boolean,
|
28
|
-
valueKey: String,
|
29
|
-
size: String,
|
30
|
-
clearable: Boolean,
|
31
|
-
collapseTags: Boolean,
|
32
|
-
name: String,
|
33
|
-
autocomplete: {
|
34
|
-
type: String,
|
35
|
-
default: "off"
|
36
|
-
}
|
37
|
-
}, ee = {
|
38
|
-
...X,
|
39
|
-
...Z
|
40
|
-
}, te = k({
|
41
|
-
name: "YBasicSelect"
|
42
|
-
}), oe = /* @__PURE__ */ k({
|
43
|
-
...te,
|
44
|
-
props: ee,
|
45
|
-
emits: [
|
46
|
-
"update:visible",
|
47
|
-
"focus",
|
48
|
-
"blur",
|
49
|
-
"select-option",
|
50
|
-
"navigate-options",
|
51
|
-
"clear",
|
52
|
-
"remove-tag",
|
53
|
-
"show",
|
54
|
-
"before-enter",
|
55
|
-
"after-enter",
|
56
|
-
"before-leave",
|
57
|
-
"hide"
|
58
|
-
],
|
59
|
-
setup(M, { expose: T, emit: o }) {
|
60
|
-
const e = M, c = $({
|
61
|
-
initialInputHeight: 0,
|
62
|
-
popperMinWidth: ""
|
63
|
-
}), b = f(), r = f(), N = f(), u = x("elForm"), d = x("elFormItem");
|
64
|
-
j(() => {
|
65
|
-
var l, s;
|
66
|
-
const t = (s = (l = r == null ? void 0 : r.value) == null ? void 0 : l.$el) == null ? void 0 : s.querySelector("input");
|
67
|
-
if (t) {
|
68
|
-
const a = {
|
69
|
-
mini: 28,
|
70
|
-
small: 32,
|
71
|
-
medium: 36
|
72
|
-
}, i = t.getBoundingClientRect().height;
|
73
|
-
c.initialInputHeight = i || a[m.value], v(), c.popperMinWidth = t.getBoundingClientRect().width;
|
74
|
-
}
|
75
|
-
}), E(
|
76
|
-
() => e.disabled,
|
77
|
-
() => {
|
78
|
-
v();
|
79
|
-
}
|
80
|
-
);
|
81
|
-
const m = n(() => {
|
82
|
-
const t = d == null ? void 0 : d.elFormItemSize;
|
83
|
-
return e.size || t;
|
84
|
-
}), p = n(() => e.disabled || (u == null ? void 0 : u.disabled)), _ = n(() => e.multiple ? Array.isArray(e.value) && e.value.length > 0 : e.value != null && e.value !== "");
|
85
|
-
n(() => ["el-icon el-select__caret el-select__icon", { "is-reverse": e.visible }]);
|
86
|
-
const R = n(() => e.clearable && !p.value && _.value), q = n(() => _.value ? "" : e.placeholder);
|
87
|
-
n(() => ["small", "default"].includes(m.value) ? "default" : "small"), n(() => e.selected.length ? e.selected[0] : null), n(() => "+ " + (e.selected.length - 1));
|
88
|
-
const h = (t) => {
|
89
|
-
o("update:visible", t);
|
90
|
-
}, H = (t) => {
|
91
|
-
e.automaticDropdown && !e.visible && h(!0), o("focus", t);
|
92
|
-
}, P = (t) => {
|
93
|
-
o("blur", t);
|
94
|
-
}, W = () => {
|
95
|
-
o("clear");
|
96
|
-
}, A = (t) => {
|
97
|
-
p.value || o("remove-tag", t);
|
98
|
-
}, v = () => {
|
99
|
-
K(() => {
|
100
|
-
var B, S, C, w;
|
101
|
-
const t = (C = (S = (B = r == null ? void 0 : r.value) == null ? void 0 : B.$el) == null ? void 0 : S.childNodes) != null ? C : [], l = [].find.call(t, (g) => g.tagName === "INPUT");
|
102
|
-
if (!l)
|
103
|
-
return;
|
104
|
-
if (e.collapseTags) {
|
105
|
-
l.style.height = null;
|
106
|
-
return;
|
107
|
-
}
|
108
|
-
const s = N.value, a = Math.round(((w = s == null ? void 0 : s.getBoundingClientRect()) == null ? void 0 : w.height) || 0), i = c.initialInputHeight || 40;
|
109
|
-
if (!e.selected.length)
|
110
|
-
l.style.height = i + "px";
|
111
|
-
else {
|
112
|
-
const g = Math.max(a + (a > i ? 6 : 0), i);
|
113
|
-
l.style.height = g + "px";
|
114
|
-
}
|
115
|
-
y();
|
116
|
-
});
|
117
|
-
}, y = () => {
|
118
|
-
var t, l;
|
119
|
-
(l = (t = U(b).popperRef) == null ? void 0 : t.popperInstanceRef) == null || l.update();
|
120
|
-
}, F = () => {
|
121
|
-
o("show");
|
122
|
-
}, D = () => {
|
123
|
-
o("before-enter");
|
124
|
-
}, L = () => {
|
125
|
-
o("after-enter");
|
126
|
-
}, O = () => {
|
127
|
-
o("hide");
|
128
|
-
}, V = () => {
|
129
|
-
o("before-leave");
|
130
|
-
};
|
131
|
-
return T({
|
132
|
-
updatePopper: y,
|
133
|
-
resetInputHeight: v
|
134
|
-
}), (t, l) => {
|
135
|
-
const s = z("el-select"), a = z("el-popover");
|
136
|
-
return Y(), G(a, {
|
137
|
-
ref_key: "popoverRef",
|
138
|
-
ref: b,
|
139
|
-
visible: e.visible,
|
140
|
-
disabled: p.value,
|
141
|
-
trigger: "click",
|
142
|
-
"popper-class": e.popperClass,
|
143
|
-
"popper-options": e.popperOptions,
|
144
|
-
width: e.popperWidth || c.popperMinWidth,
|
145
|
-
placement: "bottom-start",
|
146
|
-
transition: "el-zoom-in-top",
|
147
|
-
"onUpdate:visible": h,
|
148
|
-
onShow: F,
|
149
|
-
onInput: h,
|
150
|
-
onBeforeEnter: D,
|
151
|
-
onAfterEnter: L,
|
152
|
-
onHide: O,
|
153
|
-
onBeforeLeave: V
|
154
|
-
}, {
|
155
|
-
reference: I(() => [
|
156
|
-
J(s, {
|
157
|
-
"model-value": e.multiple ? e.selected : e.selectedLabel,
|
158
|
-
multiple: e.multiple,
|
159
|
-
disabled: p.value,
|
160
|
-
"value-key": e.valueKey,
|
161
|
-
size: e.size,
|
162
|
-
placeholder: q.value,
|
163
|
-
clearable: R.value,
|
164
|
-
"collapse-tags": e.collapseTags,
|
165
|
-
"popper-class": "y-basic-select-popper-class",
|
166
|
-
onClear: W,
|
167
|
-
onRemoveTag: A,
|
168
|
-
onFocus: H,
|
169
|
-
onBlur: P
|
170
|
-
}, null, 8, ["model-value", "multiple", "disabled", "value-key", "size", "placeholder", "clearable", "collapse-tags"])
|
171
|
-
]),
|
172
|
-
default: I(() => [
|
173
|
-
Q(t.$slots, "default")
|
174
|
-
]),
|
175
|
-
_: 3
|
176
|
-
}, 8, ["visible", "disabled", "popper-class", "popper-options", "width"]);
|
177
|
-
};
|
178
|
-
}
|
179
|
-
});
|
180
|
-
export {
|
181
|
-
oe as default
|
182
|
-
};
|
@@ -1,99 +0,0 @@
|
|
1
|
-
import { defineComponent as h, useSlots as p, reactive as k, computed as n, resolveComponent as b, openBlock as r, createElementBlock as m, normalizeClass as a, createElementVNode as i, renderSlot as d, createVNode as v, withCtx as C, toDisplayString as g, withModifiers as w, createCommentVNode as x } from "vue";
|
2
|
-
const A = { class: "y-file-list-item-body" }, E = { class: "y-file-list-item-icon" }, B = ["src", "alt"], N = ["title"], S = { class: "item-txt-title line-clamp-1 w-full break-words" }, V = ["onClick"], q = /* @__PURE__ */ i("i", { class: "y-file-icon-check y-bg-primary" }, null, -1), D = [
|
3
|
-
q
|
4
|
-
], T = /* @__PURE__ */ i("div", { class: "y-file-list-item-bg y-bg-primary" }, null, -1), $ = /* @__PURE__ */ i("div", { class: "y-file-list-item-border y-border-primary" }, null, -1), j = { class: "y-file-list-item-leftTop" }, z = h({
|
5
|
-
name: "YFileGridItem"
|
6
|
-
}), G = /* @__PURE__ */ h({
|
7
|
-
...z,
|
8
|
-
props: {
|
9
|
-
item: {
|
10
|
-
type: Object,
|
11
|
-
required: !0,
|
12
|
-
default: () => ({})
|
13
|
-
},
|
14
|
-
checkbox: Boolean,
|
15
|
-
selection: Array,
|
16
|
-
icons: {
|
17
|
-
type: Array,
|
18
|
-
required: !0,
|
19
|
-
default: () => []
|
20
|
-
}
|
21
|
-
},
|
22
|
-
emits: ["item-click", "item-check-change"],
|
23
|
-
setup(s, { emit: l }) {
|
24
|
-
const e = s;
|
25
|
-
p(), k({});
|
26
|
-
const f = n(() => Array.isArray(e.selection) && e.selection.includes(e.item)), y = n(() => {
|
27
|
-
if (e.item.thumbnail)
|
28
|
-
return e.item.thumbnail;
|
29
|
-
if (e.item.isDirectory) {
|
30
|
-
const t = e.icons.find((o) => o.type === "dir");
|
31
|
-
return t == null ? void 0 : t.icon;
|
32
|
-
}
|
33
|
-
let c;
|
34
|
-
if (e.icons.forEach((t) => {
|
35
|
-
t.types && t.types.forEach((o) => {
|
36
|
-
e.item.name.endsWith(o) && (c = t.icon);
|
37
|
-
});
|
38
|
-
}), !c) {
|
39
|
-
const t = e.icons.find((o) => o.type === "file");
|
40
|
-
c = t == null ? void 0 : t.icon;
|
41
|
-
}
|
42
|
-
return c;
|
43
|
-
}), u = () => {
|
44
|
-
l("item-click", e.item);
|
45
|
-
}, _ = () => {
|
46
|
-
l("item-check-change", e.item);
|
47
|
-
};
|
48
|
-
return (c, t) => {
|
49
|
-
const o = b("el-tooltip");
|
50
|
-
return r(), m("div", {
|
51
|
-
class: a(["y-file-list-item", { checked: f.value }]),
|
52
|
-
onClick: u
|
53
|
-
}, [
|
54
|
-
i("div", A, [
|
55
|
-
i("div", E, [
|
56
|
-
d(c.$slots, "content", {
|
57
|
-
item: e.item
|
58
|
-
}, () => [
|
59
|
-
i("img", {
|
60
|
-
src: y.value,
|
61
|
-
alt: e.item.name,
|
62
|
-
class: a({ "y-file-list-item-icon-image": e.item.thumbnail })
|
63
|
-
}, null, 10, B)
|
64
|
-
])
|
65
|
-
]),
|
66
|
-
i("div", {
|
67
|
-
class: "y-file-list-item-title ele-text-primary",
|
68
|
-
title: e.item.name
|
69
|
-
}, [
|
70
|
-
v(o, {
|
71
|
-
content: e.item.name,
|
72
|
-
placement: "top"
|
73
|
-
}, {
|
74
|
-
default: C(() => [
|
75
|
-
i("div", S, g(e.item.name), 1)
|
76
|
-
]),
|
77
|
-
_: 1
|
78
|
-
}, 8, ["content"])
|
79
|
-
], 8, N)
|
80
|
-
]),
|
81
|
-
s.checkbox ? (r(), m("div", {
|
82
|
-
key: 0,
|
83
|
-
class: "y-file-list-item-check y-bg-white",
|
84
|
-
onClick: w(_, ["stop"])
|
85
|
-
}, D, 8, V)) : x("", !0),
|
86
|
-
T,
|
87
|
-
$,
|
88
|
-
i("div", j, [
|
89
|
-
d(c.$slots, "leftTop", {
|
90
|
-
item: e.item
|
91
|
-
})
|
92
|
-
])
|
93
|
-
], 2);
|
94
|
-
};
|
95
|
-
}
|
96
|
-
});
|
97
|
-
export {
|
98
|
-
G as default
|
99
|
-
};
|
@@ -1,84 +0,0 @@
|
|
1
|
-
import { defineComponent as h, defineAsyncComponent as C, computed as x, resolveComponent as b, openBlock as t, createElementBlock as o, createElementVNode as l, withModifiers as v, normalizeClass as A, toDisplayString as s, createCommentVNode as B, Fragment as T, renderList as S, createBlock as F, unref as N, withCtx as r, renderSlot as a, createVNode as q } from "vue";
|
2
|
-
const G = {
|
3
|
-
data: {
|
4
|
-
type: Array,
|
5
|
-
required: !0
|
6
|
-
},
|
7
|
-
icons: {
|
8
|
-
type: Array,
|
9
|
-
required: !0
|
10
|
-
},
|
11
|
-
selection: Array,
|
12
|
-
checkbox: Boolean,
|
13
|
-
checked: Boolean,
|
14
|
-
indeterminate: Boolean,
|
15
|
-
total: Number,
|
16
|
-
totalText: {
|
17
|
-
type: String,
|
18
|
-
required: !0,
|
19
|
-
default: () => ""
|
20
|
-
},
|
21
|
-
checkAllText: String
|
22
|
-
}, I = {
|
23
|
-
key: 0,
|
24
|
-
class: "y-file-list"
|
25
|
-
}, V = {
|
26
|
-
key: 0,
|
27
|
-
class: "y-file-list-header"
|
28
|
-
}, Y = ["onClick"], w = { key: 0 }, z = { key: 1 }, E = {
|
29
|
-
key: 1,
|
30
|
-
style: { height: "100%", display: "flex", "justify-content": "center", "align-items": "center" }
|
31
|
-
}, $ = h({
|
32
|
-
name: "YFileGrid"
|
33
|
-
}), L = /* @__PURE__ */ h({
|
34
|
-
...$,
|
35
|
-
props: G,
|
36
|
-
emits: ["check-all-change", "item-check-change", "item-click"],
|
37
|
-
setup(d, { emit: i }) {
|
38
|
-
const e = d, m = C(() => import("./y-file-grid-item.3bec6068.js")), k = x(() => [["y-file-list-check y-file-icon-check y-bg-primary", { checked: e.checked }]]), p = () => {
|
39
|
-
i("check-all-change");
|
40
|
-
}, y = (c) => {
|
41
|
-
i("item-click", c);
|
42
|
-
}, u = (c) => {
|
43
|
-
i("item-check-change", c);
|
44
|
-
};
|
45
|
-
return (c, j) => {
|
46
|
-
const _ = b("el-empty");
|
47
|
-
return e.data.length > 0 ? (t(), o("div", I, [
|
48
|
-
e.checkbox ? (t(), o("div", V, [
|
49
|
-
l("div", {
|
50
|
-
class: "y-file-list-check-group",
|
51
|
-
onClick: v(p, ["stop"])
|
52
|
-
}, [
|
53
|
-
l("i", {
|
54
|
-
class: A(k.value)
|
55
|
-
}, null, 2),
|
56
|
-
e.total ? (t(), o("div", w, s(e.totalText.replace(/{total}/g, String(e.total))), 1)) : (t(), o("div", z, s(e.checkAllText), 1))
|
57
|
-
], 8, Y)
|
58
|
-
])) : B("", !0),
|
59
|
-
(t(!0), o(T, null, S(e.data, (g, f) => (t(), F(N(m), {
|
60
|
-
key: f,
|
61
|
-
item: g,
|
62
|
-
icons: e.icons,
|
63
|
-
checkbox: e.checkbox,
|
64
|
-
selection: e.selection,
|
65
|
-
onItemClick: y,
|
66
|
-
onItemCheckChange: u
|
67
|
-
}, {
|
68
|
-
content: r(({ item: n }) => [
|
69
|
-
a(c.$slots, "content", { item: n })
|
70
|
-
]),
|
71
|
-
leftTop: r(({ item: n }) => [
|
72
|
-
a(c.$slots, "leftTop", { item: n })
|
73
|
-
]),
|
74
|
-
_: 2
|
75
|
-
}, 1032, ["item", "icons", "checkbox", "selection"]))), 128))
|
76
|
-
])) : (t(), o("div", E, [
|
77
|
-
q(_, { "image-size": 200 })
|
78
|
-
]));
|
79
|
-
};
|
80
|
-
}
|
81
|
-
});
|
82
|
-
export {
|
83
|
-
L as default
|
84
|
-
};
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import { defineComponent as t, computed as l, openBlock as n, createElementBlock as i, normalizeClass as c, createElementVNode as r } from "vue";
|
2
|
-
const a = /* @__PURE__ */ r("i", { class: "ele-border-primary" }, null, -1), _ = /* @__PURE__ */ r("i", { class: "ele-border-primary" }, null, -1), d = [
|
3
|
-
a,
|
4
|
-
_
|
5
|
-
], m = t({
|
6
|
-
name: "YFileSort"
|
7
|
-
}), f = /* @__PURE__ */ t({
|
8
|
-
...m,
|
9
|
-
props: {
|
10
|
-
sort: String,
|
11
|
-
order: String,
|
12
|
-
name: {
|
13
|
-
type: String,
|
14
|
-
required: !0
|
15
|
-
}
|
16
|
-
},
|
17
|
-
setup(s) {
|
18
|
-
const e = s, o = l(() => [
|
19
|
-
"y-file-list-table-item-sort",
|
20
|
-
{
|
21
|
-
"y-file-list-sort-asc": e.name === e.sort && e.order === "asc"
|
22
|
-
},
|
23
|
-
{
|
24
|
-
"y-file-list-sort-desc": e.name === e.sort && e.order === "desc"
|
25
|
-
}
|
26
|
-
]);
|
27
|
-
return (p, u) => (n(), i("i", {
|
28
|
-
class: c(o.value)
|
29
|
-
}, d, 2));
|
30
|
-
}
|
31
|
-
});
|
32
|
-
export {
|
33
|
-
f as default
|
34
|
-
};
|
@@ -1,85 +0,0 @@
|
|
1
|
-
import { defineComponent as h, reactive as k, computed as m, openBlock as r, createElementBlock as d, normalizeClass as y, createElementVNode as i, withModifiers as p, createCommentVNode as v, toDisplayString as o, renderSlot as g } from "vue";
|
2
|
-
const C = { class: "y-file-list-table-item-body" }, x = {
|
3
|
-
key: 0,
|
4
|
-
class: "y-file-list-table-item-check-group"
|
5
|
-
}, A = ["onClick"], E = { class: "y-file-list-table-item-name" }, B = { class: "y-file-list-table-item-icon" }, T = ["src", "alt"], j = ["title"], q = { class: "y-file-list-table-item-tool-group" }, z = { class: "y-file-list-table-item-size" }, D = { class: "y-file-list-table-item-time" }, F = /* @__PURE__ */ i("div", { class: "y-file-list-table-item-bg y-bg-primary" }, null, -1), I = /* @__PURE__ */ i("div", { class: "y-file-list-table-item-border y-border-primary" }, null, -1), N = h({
|
6
|
-
name: "YFileTableItem"
|
7
|
-
}), V = /* @__PURE__ */ h({
|
8
|
-
...N,
|
9
|
-
props: {
|
10
|
-
item: {
|
11
|
-
type: Object,
|
12
|
-
required: !0
|
13
|
-
},
|
14
|
-
checkbox: Boolean,
|
15
|
-
selection: Array,
|
16
|
-
icons: {
|
17
|
-
type: Array,
|
18
|
-
required: !0
|
19
|
-
}
|
20
|
-
},
|
21
|
-
emits: ["item-click", "item-check-change"],
|
22
|
-
setup(c, { emit: n }) {
|
23
|
-
const e = c, _ = k({
|
24
|
-
checkboxClass: ["y-file-list-table-item-check", "y-file-icon-check", "y-bg-primary"].join(" ")
|
25
|
-
}), f = m(() => Array.isArray(e.selection) && e.selection.includes(e.item)), b = m(() => {
|
26
|
-
if (e.item.isDirectory) {
|
27
|
-
const t = e.icons.find((l) => l.type === "dir");
|
28
|
-
return t == null ? void 0 : t.icon;
|
29
|
-
}
|
30
|
-
let s;
|
31
|
-
if (e.icons.forEach((t) => {
|
32
|
-
t.types && t.types.forEach((l) => {
|
33
|
-
e.item.name.endsWith(l) && (s = t.icon);
|
34
|
-
});
|
35
|
-
}), !s) {
|
36
|
-
const t = e.icons.find((l) => l.type === "file");
|
37
|
-
s = t == null ? void 0 : t.icon;
|
38
|
-
}
|
39
|
-
return s;
|
40
|
-
}), a = () => {
|
41
|
-
n("item-click", e.item);
|
42
|
-
}, u = () => {
|
43
|
-
n("item-check-change", e.item);
|
44
|
-
};
|
45
|
-
return (s, t) => (r(), d("div", {
|
46
|
-
class: y(["y-file-list-table-item", { checked: f.value }])
|
47
|
-
}, [
|
48
|
-
i("div", C, [
|
49
|
-
c.checkbox ? (r(), d("div", x, [
|
50
|
-
i("i", {
|
51
|
-
class: y(_.checkboxClass),
|
52
|
-
onClick: p(u, ["stop"])
|
53
|
-
}, null, 10, A)
|
54
|
-
])) : v("", !0),
|
55
|
-
i("div", E, [
|
56
|
-
i("div", B, [
|
57
|
-
i("img", {
|
58
|
-
src: b.value,
|
59
|
-
alt: c.item.name,
|
60
|
-
class: "y-file-list-table-item-icon-image",
|
61
|
-
onClick: a
|
62
|
-
}, null, 8, T),
|
63
|
-
i("div", {
|
64
|
-
title: c.item.name,
|
65
|
-
class: "y-file-list-table-item-title y-text-primary",
|
66
|
-
onClick: a
|
67
|
-
}, o(e.item.name), 9, j)
|
68
|
-
]),
|
69
|
-
i("div", q, [
|
70
|
-
g(s.$slots, "tool", {
|
71
|
-
item: e.item
|
72
|
-
})
|
73
|
-
])
|
74
|
-
]),
|
75
|
-
i("div", z, o(e.item.length), 1),
|
76
|
-
i("div", D, o(e.item.updateTime), 1)
|
77
|
-
]),
|
78
|
-
F,
|
79
|
-
I
|
80
|
-
], 2));
|
81
|
-
}
|
82
|
-
});
|
83
|
-
export {
|
84
|
-
V as default
|
85
|
-
};
|
@@ -1,132 +0,0 @@
|
|
1
|
-
import { defineComponent as v, defineAsyncComponent as p, reactive as Y, computed as g, resolveComponent as $, openBlock as o, createElementBlock as n, createElementVNode as l, normalizeClass as C, withModifiers as b, createCommentVNode as c, toDisplayString as a, Fragment as f, createBlock as d, unref as m, renderList as q, withCtx as w, renderSlot as I, createVNode as V } from "vue";
|
2
|
-
const j = {
|
3
|
-
data: {
|
4
|
-
type: Array,
|
5
|
-
required: !0
|
6
|
-
},
|
7
|
-
icons: {
|
8
|
-
type: Array,
|
9
|
-
required: !0
|
10
|
-
},
|
11
|
-
selection: Array,
|
12
|
-
checkbox: Boolean,
|
13
|
-
checked: Boolean,
|
14
|
-
indeterminate: Boolean,
|
15
|
-
total: Number,
|
16
|
-
totalText: {
|
17
|
-
type: String,
|
18
|
-
required: !0,
|
19
|
-
default: () => ""
|
20
|
-
},
|
21
|
-
checkAllText: String,
|
22
|
-
nameText: String,
|
23
|
-
sizeText: String,
|
24
|
-
timeText: String,
|
25
|
-
sort: String,
|
26
|
-
order: String
|
27
|
-
}, E = {
|
28
|
-
key: 0,
|
29
|
-
class: "y-file-list-table"
|
30
|
-
}, D = { class: "y-file-list-table-item-body" }, L = {
|
31
|
-
key: 0,
|
32
|
-
class: "y-file-list-table-item-check-group"
|
33
|
-
}, M = ["onClick"], P = ["onClick"], G = {
|
34
|
-
key: 1,
|
35
|
-
style: { height: "100%", display: "flex", "justify-content": "center", "align-items": "center" }
|
36
|
-
}, H = v({
|
37
|
-
name: "YFileTable"
|
38
|
-
}), K = /* @__PURE__ */ v({
|
39
|
-
...H,
|
40
|
-
props: j,
|
41
|
-
emits: ["sort-change", "check-all-change", "item-click", "item-check-change"],
|
42
|
-
setup(x, { emit: r }) {
|
43
|
-
const e = x, k = p(() => import("./y-file-sort.057cb87a.js")), T = p(() => import("./y-file-table-item.89223297.js")), S = Y({
|
44
|
-
checkboxClass: ["y-file-list-table-item-check", "y-file-icon-check", "y-bg-primary"].join(" ")
|
45
|
-
}), h = g(() => typeof e.sort == "string"), _ = g(() => ["y-file-list-table-item y-file-list-table-item-header", { checked: e.checked }]), u = (t) => {
|
46
|
-
r("sort-change", t);
|
47
|
-
}, y = () => {
|
48
|
-
r("check-all-change", !e.checked);
|
49
|
-
}, B = (t) => {
|
50
|
-
r("item-click", t);
|
51
|
-
}, A = (t) => {
|
52
|
-
r("item-check-change", t);
|
53
|
-
};
|
54
|
-
return (t, i) => {
|
55
|
-
const z = $("el-empty");
|
56
|
-
return e.data.length > 0 ? (o(), n("div", E, [
|
57
|
-
l("div", {
|
58
|
-
class: C(_.value)
|
59
|
-
}, [
|
60
|
-
l("div", D, [
|
61
|
-
e.checkbox ? (o(), n("div", L, [
|
62
|
-
l("i", {
|
63
|
-
class: C(S.checkboxClass),
|
64
|
-
onClick: b(y, ["stop"])
|
65
|
-
}, null, 10, M)
|
66
|
-
])) : c("", !0),
|
67
|
-
l("div", {
|
68
|
-
class: "y-file-list-table-item-name",
|
69
|
-
onClick: i[0] || (i[0] = (s) => u("name"))
|
70
|
-
}, [
|
71
|
-
e.total ? (o(), n("div", {
|
72
|
-
key: 0,
|
73
|
-
onClick: b(y, ["stop"])
|
74
|
-
}, a(e.totalText.replace(/{total}/g, String(t.total))), 9, P)) : (o(), n(f, { key: 1 }, [
|
75
|
-
l("div", null, a(e.nameText), 1),
|
76
|
-
h.value ? (o(), d(m(k), {
|
77
|
-
key: 0,
|
78
|
-
sort: e.sort,
|
79
|
-
order: e.order,
|
80
|
-
name: "name"
|
81
|
-
}, null, 8, ["sort", "order"])) : c("", !0)
|
82
|
-
], 64))
|
83
|
-
]),
|
84
|
-
l("div", {
|
85
|
-
class: "y-file-list-table-item-size",
|
86
|
-
onClick: i[1] || (i[1] = (s) => u("length"))
|
87
|
-
}, [
|
88
|
-
l("div", null, a(t.sizeText), 1),
|
89
|
-
h.value ? (o(), d(m(k), {
|
90
|
-
key: 0,
|
91
|
-
sort: e.sort,
|
92
|
-
order: e.order,
|
93
|
-
name: "length"
|
94
|
-
}, null, 8, ["sort", "order"])) : c("", !0)
|
95
|
-
]),
|
96
|
-
l("div", {
|
97
|
-
class: "y-file-list-table-item-time",
|
98
|
-
onClick: i[2] || (i[2] = (s) => u("updateTime"))
|
99
|
-
}, [
|
100
|
-
l("div", null, a(t.timeText), 1),
|
101
|
-
h.value ? (o(), d(m(k), {
|
102
|
-
key: 0,
|
103
|
-
sort: e.sort,
|
104
|
-
order: e.order,
|
105
|
-
name: "updateTime"
|
106
|
-
}, null, 8, ["sort", "order"])) : c("", !0)
|
107
|
-
])
|
108
|
-
])
|
109
|
-
], 2),
|
110
|
-
(o(!0), n(f, null, q(e.data, (s, F) => (o(), d(m(T), {
|
111
|
-
key: F,
|
112
|
-
item: s,
|
113
|
-
icons: e.icons,
|
114
|
-
checkbox: t.checkbox,
|
115
|
-
selection: t.selection,
|
116
|
-
onItemClick: B,
|
117
|
-
onItemCheckChange: A
|
118
|
-
}, {
|
119
|
-
tool: w(({ item: N }) => [
|
120
|
-
I(t.$slots, "tool", { item: N })
|
121
|
-
]),
|
122
|
-
_: 2
|
123
|
-
}, 1032, ["item", "icons", "checkbox", "selection"]))), 128))
|
124
|
-
])) : (o(), n("div", G, [
|
125
|
-
V(z, { "image-size": 200 })
|
126
|
-
]));
|
127
|
-
};
|
128
|
-
}
|
129
|
-
});
|
130
|
-
export {
|
131
|
-
K as default
|
132
|
-
};
|