y-admin-ui 0.3.6 → 0.3.7
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/index.79294c1c.js +6 -0
- package/lib/{index.29624317.js → index.b517d1e1.js} +4156 -3832
- package/lib/index.b517d1e1.js.gz +0 -0
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/lib/y-admin-ui.js +12 -11
- package/lib/y-admin-ui.umd.cjs +15 -15
- package/lib/y-file-grid-item.5cc109db.js +90 -0
- package/lib/y-file-grid.02dd85ed.js +76 -0
- package/lib/y-file-sort.057cb87a.js +34 -0
- package/lib/y-file-table-item.8d4cb4dd.js +85 -0
- package/lib/y-file-table.53811948.js +132 -0
- package/package.json +1 -1
- package/lib/index.29624317.js.gz +0 -0
- package/lib/index.a54901f1.js +0 -6
@@ -0,0 +1,90 @@
|
|
1
|
+
import { defineComponent as d, reactive as u, computed as l, resolveComponent as p, openBlock as r, createElementBlock as a, normalizeClass as m, createElementVNode as i, createVNode as k, withCtx as b, toDisplayString as v, withModifiers as C, createCommentVNode as g } from "vue";
|
2
|
+
const x = { class: "y-file-list-item-body" }, w = { class: "y-file-list-item-icon" }, A = ["src", "alt"], E = ["title"], B = { class: "item-txt-title line-clamp-1 w-full break-words" }, N = ["onClick"], V = /* @__PURE__ */ i("i", { class: "y-file-icon-check y-bg-primary" }, null, -1), q = [
|
3
|
+
V
|
4
|
+
], D = /* @__PURE__ */ i("div", { class: "y-file-list-item-bg y-bg-primary" }, null, -1), j = /* @__PURE__ */ i("div", { class: "y-file-list-item-border y-border-primary" }, null, -1), z = d({
|
5
|
+
name: "YFileGridItem"
|
6
|
+
}), G = /* @__PURE__ */ d({
|
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(n, { emit: s }) {
|
24
|
+
const e = n;
|
25
|
+
u({});
|
26
|
+
const h = l(() => Array.isArray(e.selection) && e.selection.includes(e.item)), y = l(() => {
|
27
|
+
if (e.item.thumbnail)
|
28
|
+
return e.item.thumbnail;
|
29
|
+
if (e.item.isDirectory) {
|
30
|
+
const t = e.icons.find((c) => c.type === "dir");
|
31
|
+
return t == null ? void 0 : t.icon;
|
32
|
+
}
|
33
|
+
let o;
|
34
|
+
if (e.icons.forEach((t) => {
|
35
|
+
t.types && t.types.forEach((c) => {
|
36
|
+
e.item.name.endsWith(c) && (o = t.icon);
|
37
|
+
});
|
38
|
+
}), !o) {
|
39
|
+
const t = e.icons.find((c) => c.type === "file");
|
40
|
+
o = t == null ? void 0 : t.icon;
|
41
|
+
}
|
42
|
+
return o;
|
43
|
+
}), _ = () => {
|
44
|
+
s("item-click", e.item);
|
45
|
+
}, f = () => {
|
46
|
+
s("item-check-change", e.item);
|
47
|
+
};
|
48
|
+
return (o, t) => {
|
49
|
+
const c = p("el-tooltip");
|
50
|
+
return r(), a("div", {
|
51
|
+
class: m(["y-file-list-item", { checked: h.value }]),
|
52
|
+
onClick: _
|
53
|
+
}, [
|
54
|
+
i("div", x, [
|
55
|
+
i("div", w, [
|
56
|
+
i("img", {
|
57
|
+
src: y.value,
|
58
|
+
alt: e.item.name,
|
59
|
+
class: m({ "y-file-list-item-icon-image": e.item.thumbnail })
|
60
|
+
}, null, 10, A)
|
61
|
+
]),
|
62
|
+
i("div", {
|
63
|
+
class: "y-file-list-item-title ele-text-primary",
|
64
|
+
title: e.item.name
|
65
|
+
}, [
|
66
|
+
k(c, {
|
67
|
+
content: e.item.name,
|
68
|
+
placement: "top"
|
69
|
+
}, {
|
70
|
+
default: b(() => [
|
71
|
+
i("div", B, v(e.item.name), 1)
|
72
|
+
]),
|
73
|
+
_: 1
|
74
|
+
}, 8, ["content"])
|
75
|
+
], 8, E)
|
76
|
+
]),
|
77
|
+
n.checkbox ? (r(), a("div", {
|
78
|
+
key: 0,
|
79
|
+
class: "y-file-list-item-check y-bg-white",
|
80
|
+
onClick: C(f, ["stop"])
|
81
|
+
}, q, 8, N)) : g("", !0),
|
82
|
+
D,
|
83
|
+
j
|
84
|
+
], 2);
|
85
|
+
};
|
86
|
+
}
|
87
|
+
});
|
88
|
+
export {
|
89
|
+
G as default
|
90
|
+
};
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import { defineComponent as s, defineAsyncComponent as _, computed as g, resolveComponent as f, openBlock as t, createElementBlock as c, createElementVNode as n, withModifiers as C, normalizeClass as x, toDisplayString as l, createCommentVNode as b, Fragment as v, renderList as A, createBlock as B, unref as F, createVNode as N } from "vue";
|
2
|
+
const S = {
|
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
|
+
}, T = {
|
23
|
+
key: 0,
|
24
|
+
class: "y-file-list"
|
25
|
+
}, q = {
|
26
|
+
key: 0,
|
27
|
+
class: "y-file-list-header"
|
28
|
+
}, G = ["onClick"], I = { key: 0 }, V = { key: 1 }, Y = {
|
29
|
+
key: 1,
|
30
|
+
style: { height: "100%", display: "flex", "justify-content": "center", "align-items": "center" }
|
31
|
+
}, z = s({
|
32
|
+
name: "YFileGrid"
|
33
|
+
}), w = /* @__PURE__ */ s({
|
34
|
+
...z,
|
35
|
+
props: S,
|
36
|
+
emits: ["check-all-change", "item-check-change", "item-click"],
|
37
|
+
setup(r, { emit: i }) {
|
38
|
+
const e = r, a = _(() => import("./y-file-grid-item.5cc109db.js")), h = g(() => [["y-file-list-check y-file-icon-check y-bg-primary", { checked: e.checked }]]), d = () => {
|
39
|
+
i("check-all-change");
|
40
|
+
}, k = (o) => {
|
41
|
+
i("item-click", o);
|
42
|
+
}, m = (o) => {
|
43
|
+
i("item-check-change", o);
|
44
|
+
};
|
45
|
+
return (o, E) => {
|
46
|
+
const p = f("el-empty");
|
47
|
+
return e.data.length > 0 ? (t(), c("div", T, [
|
48
|
+
e.checkbox ? (t(), c("div", q, [
|
49
|
+
n("div", {
|
50
|
+
class: "y-file-list-check-group",
|
51
|
+
onClick: C(d, ["stop"])
|
52
|
+
}, [
|
53
|
+
n("i", {
|
54
|
+
class: x(h.value)
|
55
|
+
}, null, 2),
|
56
|
+
e.total ? (t(), c("div", I, l(e.totalText.replace(/{total}/g, String(e.total))), 1)) : (t(), c("div", V, l(e.checkAllText), 1))
|
57
|
+
], 8, G)
|
58
|
+
])) : b("", !0),
|
59
|
+
(t(!0), c(v, null, A(e.data, (y, u) => (t(), B(F(a), {
|
60
|
+
key: u,
|
61
|
+
item: y,
|
62
|
+
icons: e.icons,
|
63
|
+
checkbox: e.checkbox,
|
64
|
+
selection: e.selection,
|
65
|
+
onItemClick: k,
|
66
|
+
onItemCheckChange: m
|
67
|
+
}, null, 8, ["item", "icons", "checkbox", "selection"]))), 128))
|
68
|
+
])) : (t(), c("div", Y, [
|
69
|
+
N(p, { "image-size": 200 })
|
70
|
+
]));
|
71
|
+
};
|
72
|
+
}
|
73
|
+
});
|
74
|
+
export {
|
75
|
+
w as default
|
76
|
+
};
|
@@ -0,0 +1,34 @@
|
|
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
|
+
};
|
@@ -0,0 +1,85 @@
|
|
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: ["ele-file-list-table-item-check", "ele-file-icon-check", "ele-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((s) => s.type === "dir");
|
28
|
+
return t == null ? void 0 : t.icon;
|
29
|
+
}
|
30
|
+
let l;
|
31
|
+
if (e.icons.forEach((t) => {
|
32
|
+
t.types && t.types.forEach((s) => {
|
33
|
+
e.item.name.endsWith(s) && (l = t.icon);
|
34
|
+
});
|
35
|
+
}), !l) {
|
36
|
+
const t = e.icons.find((s) => s.type === "file");
|
37
|
+
l = t == null ? void 0 : t.icon;
|
38
|
+
}
|
39
|
+
return l;
|
40
|
+
}), a = () => {
|
41
|
+
n("item-click", e.item);
|
42
|
+
}, u = () => {
|
43
|
+
n("item-check-change", e.item);
|
44
|
+
};
|
45
|
+
return (l, 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(l.$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
|
+
};
|
@@ -0,0 +1,132 @@
|
|
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.8d4cb4dd.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
|
+
};
|
package/package.json
CHANGED
package/lib/index.29624317.js.gz
DELETED
Binary file
|