y-admin-ui 0.3.6 → 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.
@@ -0,0 +1,95 @@
1
+ import { defineComponent as d, reactive as u, computed as n, resolveComponent as p, openBlock as r, createElementBlock as m, normalizeClass as a, createElementVNode as i, createVNode as k, withCtx as b, toDisplayString as v, withModifiers as C, createCommentVNode as g, renderSlot as x } from "vue";
2
+ const w = { class: "y-file-list-item-body" }, A = { class: "y-file-list-item-icon" }, E = ["src", "alt"], B = ["title"], N = { 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
+ ], S = /* @__PURE__ */ i("div", { class: "y-file-list-item-bg y-bg-primary" }, null, -1), T = /* @__PURE__ */ i("div", { class: "y-file-list-item-border y-border-primary" }, null, -1), j = { class: "y-file-list-item-leftTop" }, 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(s, { emit: l }) {
24
+ const e = s;
25
+ u({});
26
+ const h = n(() => Array.isArray(e.selection) && e.selection.includes(e.item)), f = n(() => {
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
+ }), y = () => {
44
+ l("item-click", e.item);
45
+ }, _ = () => {
46
+ l("item-check-change", e.item);
47
+ };
48
+ return (o, t) => {
49
+ const c = p("el-tooltip");
50
+ return r(), m("div", {
51
+ class: a(["y-file-list-item", { checked: h.value }]),
52
+ onClick: y
53
+ }, [
54
+ i("div", w, [
55
+ i("div", A, [
56
+ i("img", {
57
+ src: f.value,
58
+ alt: e.item.name,
59
+ class: a({ "y-file-list-item-icon-image": e.item.thumbnail })
60
+ }, null, 10, E)
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", N, v(e.item.name), 1)
72
+ ]),
73
+ _: 1
74
+ }, 8, ["content"])
75
+ ], 8, B)
76
+ ]),
77
+ s.checkbox ? (r(), m("div", {
78
+ key: 0,
79
+ class: "y-file-list-item-check y-bg-white",
80
+ onClick: C(_, ["stop"])
81
+ }, D, 8, V)) : g("", !0),
82
+ S,
83
+ T,
84
+ i("div", j, [
85
+ x(o.$slots, "leftTop", {
86
+ item: e.item
87
+ })
88
+ ])
89
+ ], 2);
90
+ };
91
+ }
92
+ });
93
+ export {
94
+ G as default
95
+ };
@@ -0,0 +1,81 @@
1
+ import { defineComponent as s, defineAsyncComponent as g, computed as f, resolveComponent as C, openBlock as t, createElementBlock as c, createElementVNode as n, withModifiers as x, normalizeClass as b, toDisplayString as l, createCommentVNode as v, Fragment as A, renderList as B, createBlock as T, unref as S, withCtx as F, renderSlot as N, 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
+ }, j = s({
32
+ name: "YFileGrid"
33
+ }), M = /* @__PURE__ */ s({
34
+ ...j,
35
+ props: G,
36
+ emits: ["check-all-change", "item-check-change", "item-click"],
37
+ setup(r, { emit: i }) {
38
+ const e = r, a = g(() => import("./y-file-grid-item.86903767.js")), h = f(() => [["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, D) => {
46
+ const p = C("el-empty");
47
+ return e.data.length > 0 ? (t(), c("div", I, [
48
+ e.checkbox ? (t(), c("div", V, [
49
+ n("div", {
50
+ class: "y-file-list-check-group",
51
+ onClick: x(d, ["stop"])
52
+ }, [
53
+ n("i", {
54
+ class: b(h.value)
55
+ }, null, 2),
56
+ e.total ? (t(), c("div", w, l(e.totalText.replace(/{total}/g, String(e.total))), 1)) : (t(), c("div", z, l(e.checkAllText), 1))
57
+ ], 8, Y)
58
+ ])) : v("", !0),
59
+ (t(!0), c(A, null, B(e.data, (y, u) => (t(), T(S(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
+ }, {
68
+ leftTop: F(({ item: _ }) => [
69
+ N(o.$slots, "leftTop", { item: _ })
70
+ ]),
71
+ _: 2
72
+ }, 1032, ["item", "icons", "checkbox", "selection"]))), 128))
73
+ ])) : (t(), c("div", E, [
74
+ q(p, { "image-size": 200 })
75
+ ]));
76
+ };
77
+ }
78
+ });
79
+ export {
80
+ M as default
81
+ };
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "y-admin-ui",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "y-admin-ui 基于Element-plus二次封装基础组件文档",
5
5
  "author": "yaochengjian",
6
6
  "license": "MIT",
Binary file
@@ -1,6 +0,0 @@
1
- import "./index.29624317.js";
2
- import { _ as t } from "./index.29624317.js";
3
- import "vue";
4
- export {
5
- t as default
6
- };