ling-yun-custom-components 0.0.29 → 0.0.32
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/es/CustomDialog.mjs +1 -1
- package/es/PaginationTable.mjs +167 -151
- package/es/SearchBar.mjs +1 -1
- package/es/UpdatePasswordDialog.mjs +2 -2
- package/es/assets/PaginationTable.css +1 -1
- package/es/assets/layout2.css +1 -1
- package/es/assets/layout3.css +1 -1
- package/es/chunks/{layout.Bg387XYI.js → layout.Cops0Vah.js} +17 -15
- package/es/chunks/{layout.BSdpu71J.js → layout.DXw3haOP.js} +48 -51
- package/lib/CustomDialog.js +1 -1
- package/lib/PaginationTable.js +1 -1
- package/lib/SearchBar.js +1 -1
- package/lib/UpdatePasswordDialog.js +1 -1
- package/lib/assets/PaginationTable.css +1 -1
- package/lib/assets/layout2.css +1 -1
- package/lib/assets/layout3.css +1 -1
- package/lib/chunks/layout.B9EVVV-O.js +1 -0
- package/lib/chunks/layout.OHsMvEtb.js +1 -0
- package/package.json +2 -2
- package/es/chunks/index.CRROL-C7.js +0 -8991
- package/es/chunks/index.DfOANPhX.js +0 -1729
- package/es/chunks/index._uj6b1Kd.js +0 -8946
- package/es/chunks/layout.3r4JjCjq.js +0 -98
- package/es/chunks/layout.B8mwOOqx.js +0 -149
- package/es/chunks/layout.BZ373u9D.js +0 -584
- package/es/chunks/layout.BsiNPYtX.js +0 -149
- package/es/chunks/layout.CSYJ22Ac.js +0 -234
- package/es/chunks/layout.CUOtHOHG.js +0 -66
- package/es/chunks/layout.CmH2-6H-.js +0 -121
- package/es/chunks/layout.D7cg-xRZ.js +0 -230
- package/es/chunks/layout.DLUJzpco.js +0 -121
- package/es/chunks/layout.Epzao23T.js +0 -234
- package/es/chunks/layout.dhOtQkoC.js +0 -98
- package/es/chunks/layout.iUFnoCjZ.js +0 -230
- package/es/chunks/layout.o_B8gly4.js +0 -584
- package/lib/chunks/index.BKVX0AJJ.js +0 -23
- package/lib/chunks/index.Cm0zRaZN.js +0 -23
- package/lib/chunks/index.DJKAT9lI.js +0 -1
- package/lib/chunks/layout.-2KgXQBu.js +0 -1
- package/lib/chunks/layout.7-8MCU-f.js +0 -1
- package/lib/chunks/layout.9Q_gwznp.js +0 -1
- package/lib/chunks/layout.B8EsRYB6.js +0 -1
- package/lib/chunks/layout.BeQpU6RU.js +0 -1
- package/lib/chunks/layout.BqWe_qix.js +0 -1
- package/lib/chunks/layout.C2BGVUSH.js +0 -1
- package/lib/chunks/layout.D3OyheOl.js +0 -1
- package/lib/chunks/layout.DYKJPi9L.js +0 -1
- package/lib/chunks/layout.DYnlhiPO.js +0 -1
- package/lib/chunks/layout.Dt0IRZ49.js +0 -1
- package/lib/chunks/layout.XtG7xOYE.js +0 -1
- package/lib/chunks/layout.gqpUcAHO.js +0 -1
- package/lib/chunks/layout.s-xNK0r5.js +0 -1
- package/lib/chunks/layout.vff7gZ3-.js +0 -1
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { useCssVars as U, ref as j, watch as D, createElementBlock as u, createCommentVNode as v, openBlock as a, Fragment as x, renderList as I, normalizeClass as _, unref as s, createElementVNode as f, createBlock as m, normalizeStyle as O, withCtx as z, resolveDynamicComponent as E, toDisplayString as S, renderSlot as k, createVNode as R } from "vue";
|
|
2
|
-
import { ElImage as T, ElIcon as w } from "element-plus";
|
|
3
|
-
import { b as c, i as q, m as l } from "./index.CRROL-C7.js";
|
|
4
|
-
import { f as A, p as G, q as b, r as M, s as F, t as K } from "./index.DfOANPhX.js";
|
|
5
|
-
import { _ as H } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
-
import '../assets/layout6.css';const i = {
|
|
7
|
-
uploading: "uploading",
|
|
8
|
-
success: "success",
|
|
9
|
-
error: "error"
|
|
10
|
-
}, J = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "file-list display-grid pd-t-12 pd-b-12"
|
|
13
|
-
}, P = { class: "flex overflow-hidden flex-1 pd-r-10" }, Q = { class: "pd-l-8 flex-1 overflow-hidden" }, W = ["title"], X = { class: "fz-12 text-ellipsis lh-16" }, Y = {
|
|
14
|
-
key: 1,
|
|
15
|
-
class: "text-74798c"
|
|
16
|
-
}, Z = /* @__PURE__ */ Object.assign({
|
|
17
|
-
name: "FileList"
|
|
18
|
-
}, {
|
|
19
|
-
__name: "layout",
|
|
20
|
-
props: {
|
|
21
|
-
// 文件列表数据
|
|
22
|
-
modelValue: {
|
|
23
|
-
type: Array,
|
|
24
|
-
default: () => []
|
|
25
|
-
},
|
|
26
|
-
// 是否显示删除按钮
|
|
27
|
-
showDelete: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: !0
|
|
30
|
-
},
|
|
31
|
-
// 字段映射配置
|
|
32
|
-
fieldMapping: {
|
|
33
|
-
type: Object,
|
|
34
|
-
default: () => ({
|
|
35
|
-
// fileName: 'fileName',
|
|
36
|
-
// fileUrl: 'fileUrl',
|
|
37
|
-
})
|
|
38
|
-
},
|
|
39
|
-
rowCount: {
|
|
40
|
-
type: Number,
|
|
41
|
-
default: 2
|
|
42
|
-
},
|
|
43
|
-
// 图标大小
|
|
44
|
-
iconSize: {
|
|
45
|
-
type: Number,
|
|
46
|
-
default: 36
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
emits: [c.delete, c.change, c.updateModelValue],
|
|
50
|
-
setup(r, { emit: B }) {
|
|
51
|
-
U((e) => ({
|
|
52
|
-
v247946fe: r.rowCount
|
|
53
|
-
}));
|
|
54
|
-
const p = r, g = B, n = j(p.modelValue), C = Object.fromEntries(
|
|
55
|
-
Object.entries(q).map(([e, o]) => [o, e])
|
|
56
|
-
), h = (e) => e[p.fieldMapping.fileUrl] ? e[p.fieldMapping.fileUrl] : e.raw && e.raw instanceof File ? URL.createObjectURL(e.raw) : e instanceof File ? URL.createObjectURL(e) : "", V = {
|
|
57
|
-
[l.pdf]: K,
|
|
58
|
-
[l.doc]: F,
|
|
59
|
-
[l.docx]: F,
|
|
60
|
-
[l.xls]: M,
|
|
61
|
-
[l.xlsx]: M,
|
|
62
|
-
[l.ppt]: b,
|
|
63
|
-
[l.pptx]: b,
|
|
64
|
-
[l.txt]: G
|
|
65
|
-
}, $ = (e) => e?.includes("image"), L = (e) => {
|
|
66
|
-
const o = C[e];
|
|
67
|
-
return V[o];
|
|
68
|
-
}, y = (e) => {
|
|
69
|
-
if (!e || e === 0) return "0 B";
|
|
70
|
-
const o = 1024, t = ["B", "KB", "MB", "GB"], d = Math.floor(Math.log(e) / Math.log(o));
|
|
71
|
-
return `${parseFloat((e / Math.pow(o, d)).toFixed(2))} ${t[d]}`;
|
|
72
|
-
}, N = (e, o) => {
|
|
73
|
-
n.value.splice(o, 1), g(c.delete, e), g(c.updateModelValue, n.value), g(c.change, n.value);
|
|
74
|
-
};
|
|
75
|
-
return D(
|
|
76
|
-
() => p.modelValue,
|
|
77
|
-
(e) => {
|
|
78
|
-
n.value = e;
|
|
79
|
-
},
|
|
80
|
-
{ immediate: !0 }
|
|
81
|
-
), (e, o) => n.value?.length ? (a(), u("div", J, [
|
|
82
|
-
(a(!0), u(x, null, I(n.value, (t, d) => (a(), u("div", {
|
|
83
|
-
key: d,
|
|
84
|
-
class: _(["pd-l-8 pd-r-8 pd-t-6 pd-b-6 radius-8 file-item overflow-hidden flex items-center", {
|
|
85
|
-
"bg-uploading": t.fileStatus === s(i).uploading,
|
|
86
|
-
"bg-fcfdff": t.fileStatus !== s(i).uploading,
|
|
87
|
-
"border-error": t.fileStatus === s(i).error,
|
|
88
|
-
"border-normal": t.fileStatus !== s(i).error
|
|
89
|
-
}])
|
|
90
|
-
}, [
|
|
91
|
-
f("div", P, [
|
|
92
|
-
$(t?.type) && h(t) ? (a(), m(s(T), {
|
|
93
|
-
key: 0,
|
|
94
|
-
src: h(t),
|
|
95
|
-
class: "radius-4",
|
|
96
|
-
fit: "cover",
|
|
97
|
-
style: O({ width: `${r.iconSize}px`, height: `${r.iconSize}px` })
|
|
98
|
-
}, null, 8, ["src", "style"])) : (a(), m(s(w), {
|
|
99
|
-
key: 1,
|
|
100
|
-
size: r.iconSize,
|
|
101
|
-
class: "pointer"
|
|
102
|
-
}, {
|
|
103
|
-
default: z(() => [
|
|
104
|
-
(a(), m(E(L(t?.type))))
|
|
105
|
-
]),
|
|
106
|
-
_: 2
|
|
107
|
-
}, 1032, ["size"])),
|
|
108
|
-
f("div", Q, [
|
|
109
|
-
f("div", {
|
|
110
|
-
class: _(["fz-14 text-ellipsis lh-20 flex-1", {
|
|
111
|
-
"text-ec0e13": t.fileStatus === s(i).error,
|
|
112
|
-
"text-262626": t.fileStatus !== s(i).error
|
|
113
|
-
}]),
|
|
114
|
-
title: t[r.fieldMapping.fileName]
|
|
115
|
-
}, S(t[r.fieldMapping.fileName]), 11, W),
|
|
116
|
-
f("div", X, [
|
|
117
|
-
e.$slots.status ? k(e.$slots, "status", {
|
|
118
|
-
key: 0,
|
|
119
|
-
file: t
|
|
120
|
-
}, void 0, !0) : (a(), u(x, { key: 1 }, [
|
|
121
|
-
e.$slots.size ? k(e.$slots, "size", {
|
|
122
|
-
key: 0,
|
|
123
|
-
file: t,
|
|
124
|
-
size: y(t.size)
|
|
125
|
-
}, void 0, !0) : (a(), u("span", Y, S(y(t.size)), 1))
|
|
126
|
-
], 64))
|
|
127
|
-
])
|
|
128
|
-
])
|
|
129
|
-
]),
|
|
130
|
-
r.showDelete ? (a(), m(s(w), {
|
|
131
|
-
key: 0,
|
|
132
|
-
size: 16,
|
|
133
|
-
color: t.fileStatus === s(i).error ? "var(--error-color-1)" : "var(--text-color-4)",
|
|
134
|
-
class: "pointer",
|
|
135
|
-
onClick: (ee) => N(t, d)
|
|
136
|
-
}, {
|
|
137
|
-
default: z(() => [
|
|
138
|
-
R(s(A))
|
|
139
|
-
]),
|
|
140
|
-
_: 1
|
|
141
|
-
}, 8, ["color", "onClick"])) : v("", !0)
|
|
142
|
-
], 2))), 128))
|
|
143
|
-
])) : v("", !0);
|
|
144
|
-
}
|
|
145
|
-
}), le = /* @__PURE__ */ H(Z, [["__scopeId", "data-v-0980a743"]]);
|
|
146
|
-
export {
|
|
147
|
-
le as _,
|
|
148
|
-
i as u
|
|
149
|
-
};
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import { useAttrs as I, computed as d, onMounted as L, createBlock as y, openBlock as u, unref as n, mergeProps as U, withCtx as c, createElementBlock as g, renderSlot as m, createElementVNode as v, createCommentVNode as A, createTextVNode as h, toDisplayString as C, Fragment as R, createVNode as E } from "vue";
|
|
2
|
-
import { ElDialog as q, ElButton as k, ElIcon as z } from "element-plus";
|
|
3
|
-
import { IconClose as H, IconBack as J } from "color-message-lingyun-vue";
|
|
4
|
-
import { f as e } from "./index._uj6b1Kd.js";
|
|
5
|
-
import { _ as K } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
-
import '../assets/layout2.css';const t = {
|
|
7
|
-
DEFAULT: "default",
|
|
8
|
-
PAGE: "page"
|
|
9
|
-
}, Q = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "flex justify-center w-full"
|
|
12
|
-
}, W = {
|
|
13
|
-
class: "dialog-content flex flex-col",
|
|
14
|
-
style: { width: "60%" }
|
|
15
|
-
}, X = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "title-name flex items-center"
|
|
18
|
-
}, Y = { class: "dialog-footer" }, Z = {
|
|
19
|
-
key: 0,
|
|
20
|
-
class: "flex justify-center items-center w-full"
|
|
21
|
-
}, ee = {
|
|
22
|
-
class: "flex justify-center items-center",
|
|
23
|
-
style: { width: "60%" }
|
|
24
|
-
}, oe = { class: "flex justify-end items-center w-full" }, te = /* @__PURE__ */ Object.assign({
|
|
25
|
-
name: "CustomDialog"
|
|
26
|
-
}, {
|
|
27
|
-
__name: "layout",
|
|
28
|
-
props: {
|
|
29
|
-
// 绑定值
|
|
30
|
-
modelValue: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: !1
|
|
33
|
-
},
|
|
34
|
-
// 对话框宽度
|
|
35
|
-
width: {
|
|
36
|
-
type: [String, Number],
|
|
37
|
-
default: "50%"
|
|
38
|
-
},
|
|
39
|
-
// 是否可以通过点击 modal 关闭对话框
|
|
40
|
-
closeOnClickModal: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: !1
|
|
43
|
-
},
|
|
44
|
-
// 是否可以通过按下 ESC 关闭对话框
|
|
45
|
-
closeOnPressEscape: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
default: !1
|
|
48
|
-
},
|
|
49
|
-
// 是否在对话框出现时将 body 滚动锁定
|
|
50
|
-
lockScroll: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: !0
|
|
53
|
-
},
|
|
54
|
-
// 关闭图标
|
|
55
|
-
closeIcon: {
|
|
56
|
-
type: Object,
|
|
57
|
-
default: H
|
|
58
|
-
},
|
|
59
|
-
// 按钮配置对象
|
|
60
|
-
buttons: {
|
|
61
|
-
type: Object,
|
|
62
|
-
default: () => ({})
|
|
63
|
-
},
|
|
64
|
-
appendToBody: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: !0
|
|
67
|
-
},
|
|
68
|
-
// 弹窗覆盖的模式 default|page
|
|
69
|
-
dialogMode: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: t.DEFAULT
|
|
72
|
-
},
|
|
73
|
-
// route模式下标题值
|
|
74
|
-
titleName: {
|
|
75
|
-
type: String,
|
|
76
|
-
default: "默认标题"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
emits: [
|
|
80
|
-
e.updateModelValue,
|
|
81
|
-
e.open,
|
|
82
|
-
e.opened,
|
|
83
|
-
e.close,
|
|
84
|
-
e.closed,
|
|
85
|
-
e.openAutoFocus,
|
|
86
|
-
e.closeAutoFocus,
|
|
87
|
-
e.cancel,
|
|
88
|
-
e.confirm
|
|
89
|
-
],
|
|
90
|
-
setup(r, { emit: P }) {
|
|
91
|
-
const b = {
|
|
92
|
-
showCancel: !0,
|
|
93
|
-
showConfirm: !0,
|
|
94
|
-
cancelText: "取消",
|
|
95
|
-
confirmText: "确认",
|
|
96
|
-
onCancel: null,
|
|
97
|
-
onConfirm: null
|
|
98
|
-
}, o = r, p = I(), s = P, M = d(() => o.dialogMode === t.PAGE ? {
|
|
99
|
-
marginLeft: "250px",
|
|
100
|
-
borderRadius: "24px",
|
|
101
|
-
boxShadow: "none"
|
|
102
|
-
} : {}), B = d(() => o.dialogMode === t.PAGE ? !1 : p.modal ? p.modal : !0), _ = d(() => o.dialogMode === t.PAGE ? !0 : p.modalPenetrable ? p.modalPenetrable : !1), V = d(() => o.dialogMode === t.PAGE ? "calc(100% - 250px - 12px)" : o.width), F = d(() => o.dialogMode === t.PAGE ? "66px" : o.top || "15vh"), i = d({
|
|
103
|
-
get: () => o.modelValue,
|
|
104
|
-
set: (a) => {
|
|
105
|
-
s(e.updateModelValue, a);
|
|
106
|
-
}
|
|
107
|
-
}), l = d(() => ({
|
|
108
|
-
...b,
|
|
109
|
-
...o.buttons
|
|
110
|
-
})), G = d(() => {
|
|
111
|
-
const { modelValue: a, ...f } = o;
|
|
112
|
-
return f;
|
|
113
|
-
}), O = () => {
|
|
114
|
-
s(e.open);
|
|
115
|
-
}, T = () => {
|
|
116
|
-
s(e.opened);
|
|
117
|
-
}, S = () => {
|
|
118
|
-
s(e.close);
|
|
119
|
-
}, j = () => {
|
|
120
|
-
s(e.closed);
|
|
121
|
-
}, N = () => {
|
|
122
|
-
s(e.openAutoFocus);
|
|
123
|
-
}, D = () => {
|
|
124
|
-
s(e.closeAutoFocus);
|
|
125
|
-
}, $ = () => {
|
|
126
|
-
l.value.onCancel ? l.value.onCancel() : i.value = !1, s(e.cancel);
|
|
127
|
-
}, w = async () => {
|
|
128
|
-
if (l.value.onConfirm)
|
|
129
|
-
try {
|
|
130
|
-
await l.value.onConfirm() !== !1 && (i.value = !1);
|
|
131
|
-
} catch {
|
|
132
|
-
}
|
|
133
|
-
else
|
|
134
|
-
i.value = !1;
|
|
135
|
-
s(e.confirm);
|
|
136
|
-
};
|
|
137
|
-
return L(() => {
|
|
138
|
-
o.dialogMode === t.PAGE && (document.querySelector(".el-overlay-dialog").style.overflow = "hidden");
|
|
139
|
-
}), (a, f) => (u(), y(n(q), U({
|
|
140
|
-
ref: "dialogRef",
|
|
141
|
-
modelValue: i.value,
|
|
142
|
-
"onUpdate:modelValue": f[1] || (f[1] = (x) => i.value = x)
|
|
143
|
-
}, G.value, {
|
|
144
|
-
width: V.value,
|
|
145
|
-
top: F.value,
|
|
146
|
-
style: M.value,
|
|
147
|
-
modal: B.value,
|
|
148
|
-
"modal-penetrable": _.value,
|
|
149
|
-
onOpen: O,
|
|
150
|
-
onOpened: T,
|
|
151
|
-
onClose: S,
|
|
152
|
-
onClosed: j,
|
|
153
|
-
onOpenAutoFocus: N,
|
|
154
|
-
onCloseAutoFocus: D,
|
|
155
|
-
"append-to-body": r.appendToBody,
|
|
156
|
-
class: {
|
|
157
|
-
"custom-dialog-page": r.dialogMode === n(t).PAGE
|
|
158
|
-
}
|
|
159
|
-
}), {
|
|
160
|
-
header: c(() => [
|
|
161
|
-
m(a.$slots, "header", {}, void 0, !0)
|
|
162
|
-
]),
|
|
163
|
-
title: c(() => [
|
|
164
|
-
r.dialogMode === n(t).PAGE ? (u(), g("div", X, [
|
|
165
|
-
E(n(z), {
|
|
166
|
-
size: 20,
|
|
167
|
-
color: "var(--text-color-1)",
|
|
168
|
-
class: "mg-r-6 pointer",
|
|
169
|
-
onClick: f[0] || (f[0] = (x) => i.value = !1)
|
|
170
|
-
}, {
|
|
171
|
-
default: c(() => [
|
|
172
|
-
E(n(J))
|
|
173
|
-
]),
|
|
174
|
-
_: 1
|
|
175
|
-
}),
|
|
176
|
-
h(" " + C(r.titleName), 1)
|
|
177
|
-
])) : m(a.$slots, "title", { key: 1 }, void 0, !0)
|
|
178
|
-
]),
|
|
179
|
-
footer: c(() => [
|
|
180
|
-
m(a.$slots, "footer", {}, () => [
|
|
181
|
-
v("div", Y, [
|
|
182
|
-
r.dialogMode === n(t).PAGE ? (u(), g("div", Z, [
|
|
183
|
-
v("div", ee, [
|
|
184
|
-
v("div", oe, [
|
|
185
|
-
l.value.showConfirm ? (u(), y(n(k), {
|
|
186
|
-
key: 0,
|
|
187
|
-
type: "primary",
|
|
188
|
-
onClick: w
|
|
189
|
-
}, {
|
|
190
|
-
default: c(() => [
|
|
191
|
-
h(C(l.value.confirmText), 1)
|
|
192
|
-
]),
|
|
193
|
-
_: 1
|
|
194
|
-
})) : A("", !0)
|
|
195
|
-
])
|
|
196
|
-
])
|
|
197
|
-
])) : (u(), g(R, { key: 1 }, [
|
|
198
|
-
l.value.showCancel ? (u(), y(n(k), {
|
|
199
|
-
key: 0,
|
|
200
|
-
onClick: $
|
|
201
|
-
}, {
|
|
202
|
-
default: c(() => [
|
|
203
|
-
h(C(l.value.cancelText), 1)
|
|
204
|
-
]),
|
|
205
|
-
_: 1
|
|
206
|
-
})) : A("", !0),
|
|
207
|
-
l.value.showConfirm ? (u(), y(n(k), {
|
|
208
|
-
key: 1,
|
|
209
|
-
type: "primary",
|
|
210
|
-
onClick: w
|
|
211
|
-
}, {
|
|
212
|
-
default: c(() => [
|
|
213
|
-
h(C(l.value.confirmText), 1)
|
|
214
|
-
]),
|
|
215
|
-
_: 1
|
|
216
|
-
})) : A("", !0)
|
|
217
|
-
], 64))
|
|
218
|
-
])
|
|
219
|
-
], !0)
|
|
220
|
-
]),
|
|
221
|
-
default: c(() => [
|
|
222
|
-
r.dialogMode === n(t).PAGE ? (u(), g("div", Q, [
|
|
223
|
-
v("div", W, [
|
|
224
|
-
m(a.$slots, "default", {}, void 0, !0)
|
|
225
|
-
])
|
|
226
|
-
])) : m(a.$slots, "default", { key: 1 }, void 0, !0)
|
|
227
|
-
]),
|
|
228
|
-
_: 3
|
|
229
|
-
}, 16, ["modelValue", "width", "top", "style", "modal", "modal-penetrable", "append-to-body", "class"]));
|
|
230
|
-
}
|
|
231
|
-
}), ue = /* @__PURE__ */ K(te, [["__scopeId", "data-v-425ba25d"]]);
|
|
232
|
-
export {
|
|
233
|
-
ue as C
|
|
234
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { computed as n, createElementBlock as i, openBlock as o, createVNode as r, createElementVNode as l, unref as a, withCtx as m, createBlock as s, resolveDynamicComponent as p, normalizeStyle as f, toDisplayString as u } from "vue";
|
|
2
|
-
import { h as y } from "./index.DfOANPhX.js";
|
|
3
|
-
import { ElIcon as d } from "element-plus";
|
|
4
|
-
import { _ as x } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
|
-
import '../assets/layout.css';const S = { class: "icon-empty flex flex-col items-center justify-center" }, z = /* @__PURE__ */ Object.assign({
|
|
6
|
-
name: "IconEmpty"
|
|
7
|
-
}, {
|
|
8
|
-
__name: "layout",
|
|
9
|
-
props: {
|
|
10
|
-
// 图标组件
|
|
11
|
-
icon: {
|
|
12
|
-
type: Object,
|
|
13
|
-
default: y
|
|
14
|
-
},
|
|
15
|
-
// 图标大小
|
|
16
|
-
iconSize: {
|
|
17
|
-
type: Number,
|
|
18
|
-
default: 64
|
|
19
|
-
},
|
|
20
|
-
// 图标颜色
|
|
21
|
-
iconColor: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: "#c0c4cc"
|
|
24
|
-
},
|
|
25
|
-
// 显示文字
|
|
26
|
-
text: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: "暂无数据"
|
|
29
|
-
},
|
|
30
|
-
// 文字颜色
|
|
31
|
-
textColor: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: "#909399"
|
|
34
|
-
},
|
|
35
|
-
// 文字字号
|
|
36
|
-
textSize: {
|
|
37
|
-
type: Number,
|
|
38
|
-
default: 14
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
setup(e) {
|
|
42
|
-
const t = e, c = n(() => ({
|
|
43
|
-
color: t.textColor,
|
|
44
|
-
fontSize: `${t.textSize}px`
|
|
45
|
-
}));
|
|
46
|
-
return (_, C) => (o(), i("div", S, [
|
|
47
|
-
r(a(d), {
|
|
48
|
-
size: e.iconSize,
|
|
49
|
-
color: e.iconColor,
|
|
50
|
-
class: "icon-empty-icon"
|
|
51
|
-
}, {
|
|
52
|
-
default: m(() => [
|
|
53
|
-
(o(), s(p(e.icon)))
|
|
54
|
-
]),
|
|
55
|
-
_: 1
|
|
56
|
-
}, 8, ["size", "color"]),
|
|
57
|
-
l("div", {
|
|
58
|
-
class: "icon-empty-text",
|
|
59
|
-
style: f(c.value)
|
|
60
|
-
}, u(e.text), 5)
|
|
61
|
-
]));
|
|
62
|
-
}
|
|
63
|
-
}), b = /* @__PURE__ */ x(z, [["__scopeId", "data-v-c69a2cce"]]);
|
|
64
|
-
export {
|
|
65
|
-
b as I
|
|
66
|
-
};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { ref as b, computed as o, onMounted as S, nextTick as C, watch as k, createBlock as j, openBlock as D, resolveDynamicComponent as F, unref as g, mergeProps as M } from "vue";
|
|
2
|
-
import { ElTreeSelect as x, ElSelectV2 as E } from "element-plus";
|
|
3
|
-
import { b as r } from "./index.CRROL-C7.js";
|
|
4
|
-
const q = /* @__PURE__ */ Object.assign({
|
|
5
|
-
name: "CustomSelect"
|
|
6
|
-
}, {
|
|
7
|
-
__name: "layout",
|
|
8
|
-
props: {
|
|
9
|
-
// 绑定值
|
|
10
|
-
modelValue: {
|
|
11
|
-
type: [String, Number, Array, Object],
|
|
12
|
-
default: () => null
|
|
13
|
-
},
|
|
14
|
-
// 是否可清空
|
|
15
|
-
clearable: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: !0
|
|
18
|
-
},
|
|
19
|
-
// 是否可搜索
|
|
20
|
-
filterable: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: !0
|
|
23
|
-
},
|
|
24
|
-
// 多选时是否将选中值按文字的形式展示
|
|
25
|
-
collapseTags: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: !0
|
|
28
|
-
},
|
|
29
|
-
// 多选
|
|
30
|
-
multiple: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: !1
|
|
33
|
-
},
|
|
34
|
-
// 接口配置
|
|
35
|
-
apiConfig: {
|
|
36
|
-
type: Function
|
|
37
|
-
},
|
|
38
|
-
// 数据映射配置
|
|
39
|
-
mapping: {
|
|
40
|
-
type: Object,
|
|
41
|
-
default: () => ({
|
|
42
|
-
label: "label",
|
|
43
|
-
value: "value",
|
|
44
|
-
disabled: "disabled",
|
|
45
|
-
children: "children"
|
|
46
|
-
})
|
|
47
|
-
},
|
|
48
|
-
// 静态数据
|
|
49
|
-
staticOptions: {
|
|
50
|
-
type: Array,
|
|
51
|
-
default: () => []
|
|
52
|
-
},
|
|
53
|
-
// 是否在组件挂载时自动加载数据
|
|
54
|
-
autoLoad: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: !0
|
|
57
|
-
},
|
|
58
|
-
// 请求参数
|
|
59
|
-
params: {
|
|
60
|
-
type: Object,
|
|
61
|
-
default: () => ({})
|
|
62
|
-
},
|
|
63
|
-
// 是否为树形选择器
|
|
64
|
-
isTreeSelect: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: !1
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
emits: [r.updateModelValue, r.change],
|
|
70
|
-
setup(l, { expose: v, emit: y }) {
|
|
71
|
-
const e = l, s = y, n = b(e.modelValue), i = b([]), c = o(() => typeof e.apiConfig == "function"), h = o(() => e.staticOptions.length > 0 ? e.staticOptions : i.value), V = o(() => e.isTreeSelect ? "data" : "options"), T = o(() => e.isTreeSelect ? "children" : "options"), B = o(() => ({
|
|
72
|
-
...e.mapping,
|
|
73
|
-
[T.value]: e.mapping.children
|
|
74
|
-
})), p = async () => {
|
|
75
|
-
c.value && e.apiConfig(e.params)?.then((a) => {
|
|
76
|
-
i.value = d(a?.data || []);
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
function d(a, u = !1) {
|
|
80
|
-
return a.map((t) => {
|
|
81
|
-
const m = u || t.isEnabled === 0, f = {
|
|
82
|
-
...t,
|
|
83
|
-
disabled: m
|
|
84
|
-
};
|
|
85
|
-
return t.children && t.children.length > 0 && (f.children = d(t.children, m)), f;
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
const O = () => {
|
|
89
|
-
s(r.updateModelValue, n.value), s(r.change, n.value);
|
|
90
|
-
};
|
|
91
|
-
return v({
|
|
92
|
-
clear: () => {
|
|
93
|
-
i.value = [], n.value = e.multiple ? [] : null;
|
|
94
|
-
},
|
|
95
|
-
loadData: p
|
|
96
|
-
}), S(() => {
|
|
97
|
-
e.autoLoad && c.value && C(() => {
|
|
98
|
-
p();
|
|
99
|
-
});
|
|
100
|
-
}), k(
|
|
101
|
-
() => e.modelValue,
|
|
102
|
-
(a) => {
|
|
103
|
-
n.value = a;
|
|
104
|
-
},
|
|
105
|
-
{ immediate: !0 }
|
|
106
|
-
), (a, u) => (D(), j(F(l.isTreeSelect ? g(x) : g(E)), M({
|
|
107
|
-
modelValue: n.value,
|
|
108
|
-
"onUpdate:modelValue": u[0] || (u[0] = (t) => n.value = t),
|
|
109
|
-
props: B.value,
|
|
110
|
-
multiple: l.multiple,
|
|
111
|
-
"collapse-tags": l.collapseTags,
|
|
112
|
-
filterable: l.filterable,
|
|
113
|
-
clearable: l.clearable,
|
|
114
|
-
[V.value || ""]: h.value,
|
|
115
|
-
"node-key": l.mapping.value
|
|
116
|
-
}, a.$attrs, { onChange: O }), null, 16, ["modelValue", "props", "multiple", "collapse-tags", "filterable", "clearable", "node-key"]));
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
export {
|
|
120
|
-
q as default
|
|
121
|
-
};
|