ling-yun-custom-components 0.0.34 → 0.0.36

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.
Files changed (107) hide show
  1. package/es/BatchImport.mjs +1 -1
  2. package/es/BuildComponents.mjs +1 -1
  3. package/es/CustomDialog.mjs +1 -1
  4. package/es/CustomDropdown.mjs +10 -10
  5. package/es/CustomTab.mjs +7 -7
  6. package/es/CustomTitle.mjs +1 -1
  7. package/es/FileList.mjs +1 -1
  8. package/es/GradientButton.mjs +7 -7
  9. package/es/IconEmpty.mjs +1 -1
  10. package/es/IconRenderer.mjs +62 -13
  11. package/es/IconSelect.mjs +3 -3
  12. package/es/PageNotFound.mjs +42 -0
  13. package/es/PaginationTable.mjs +1 -1
  14. package/es/SearchBar.mjs +1 -1
  15. package/es/TreeSelect.mjs +2 -2
  16. package/es/TreeShowSelect.mjs +1 -1
  17. package/es/UpdatePasswordDialog.mjs +3 -3
  18. package/es/UploadFile.mjs +1 -1
  19. package/es/assets/BuildComponents.css +1 -1
  20. package/es/assets/CustomDropdown.css +1 -1
  21. package/es/assets/CustomTab.css +1 -1
  22. package/es/assets/GradientButton.css +1 -1
  23. package/es/assets/IconSelect.css +1 -1
  24. package/es/assets/PageNotFound.css +0 -0
  25. package/es/assets/PaginationTable.css +1 -1
  26. package/es/assets/TreeSelect.css +1 -1
  27. package/es/assets/TreeShowSelect.css +1 -1
  28. package/es/assets/UpdatePasswordDialog.css +1 -1
  29. package/es/assets/layout2.css +1 -1
  30. package/es/assets/layout3.css +1 -1
  31. package/es/assets/layout4.css +1 -1
  32. package/es/assets/layout5.css +1 -1
  33. package/es/assets/layout6.css +1 -1
  34. package/es/chunks/global.BoqYDmws.js +8387 -0
  35. package/es/chunks/global.DBatr4rf.js +15746 -0
  36. package/es/chunks/global.DLyUBjAm.js +8080 -0
  37. package/es/chunks/{global.DYRS55FP.js → global.DpSgdQXX.js} +1839 -1761
  38. package/es/chunks/{layout.DJVruWAW.js → layout.9WADm5Lv.js} +90 -88
  39. package/es/chunks/{layout.CHE7L3Br.js → layout.BHroZ9U9.js} +12 -12
  40. package/es/chunks/{layout.B0thq8O1.js → layout.BKJPyxR8.js} +5 -5
  41. package/es/chunks/layout.BgtHhnxJ.js +66 -0
  42. package/es/chunks/{layout.kfyyRIKp.js → layout.C9yoozRN.js} +113 -107
  43. package/es/chunks/layout.CRtj9xK9.js +230 -0
  44. package/es/chunks/layout.CYgILBXq.js +592 -0
  45. package/es/chunks/{layout.z1w9j_0V.js → layout.DBgjqaxe.js} +2 -2
  46. package/es/chunks/layout.DTDMwNO7.js +231 -0
  47. package/es/chunks/{layout.CiNClIOK.js → layout.DXw3haOP.js} +1 -1
  48. package/es/chunks/layout.D_fCzVf0.js +39 -0
  49. package/es/chunks/layout.DdM4MaRr.js +149 -0
  50. package/es/chunks/{layout.ksXFwQhz.js → layout.vvR_4ki7.js} +9 -9
  51. package/es/index.mjs +49 -44
  52. package/lib/BatchImport.js +1 -1
  53. package/lib/BuildComponents.js +1 -1
  54. package/lib/CustomDialog.js +1 -1
  55. package/lib/CustomDropdown.js +1 -1
  56. package/lib/CustomTab.js +1 -1
  57. package/lib/CustomTitle.js +1 -1
  58. package/lib/FileList.js +1 -1
  59. package/lib/GradientButton.js +1 -1
  60. package/lib/IconEmpty.js +1 -1
  61. package/lib/IconRenderer.js +1 -1
  62. package/lib/IconSelect.js +1 -1
  63. package/lib/PageNotFound.js +1 -0
  64. package/lib/PaginationTable.js +1 -1
  65. package/lib/SearchBar.js +1 -1
  66. package/lib/TreeSelect.js +1 -1
  67. package/lib/TreeShowSelect.js +1 -1
  68. package/lib/UpdatePasswordDialog.js +1 -1
  69. package/lib/UploadFile.js +1 -1
  70. package/lib/assets/BuildComponents.css +1 -1
  71. package/lib/assets/CustomDropdown.css +1 -1
  72. package/lib/assets/CustomTab.css +1 -1
  73. package/lib/assets/GradientButton.css +1 -1
  74. package/lib/assets/IconSelect.css +1 -1
  75. package/lib/assets/PageNotFound.css +0 -0
  76. package/lib/assets/PaginationTable.css +1 -1
  77. package/lib/assets/TreeSelect.css +1 -1
  78. package/lib/assets/TreeShowSelect.css +1 -1
  79. package/lib/assets/UpdatePasswordDialog.css +1 -1
  80. package/lib/assets/layout2.css +1 -1
  81. package/lib/assets/layout3.css +1 -1
  82. package/lib/assets/layout4.css +1 -1
  83. package/lib/assets/layout5.css +1 -1
  84. package/lib/assets/layout6.css +1 -1
  85. package/lib/chunks/global.3UE6pLnj.js +1 -0
  86. package/lib/chunks/global.BNCddmRI.js +1 -0
  87. package/lib/chunks/global.Cmc2k3td.js +1 -0
  88. package/lib/chunks/global.DUq6tY9B.js +1 -0
  89. package/lib/chunks/{layout.TNSpahDr.js → layout.B-T_NE6r.js} +1 -1
  90. package/lib/chunks/{layout.BX7XTp-7.js → layout.B8d4J538.js} +1 -1
  91. package/lib/chunks/{layout.CKQTUDQH.js → layout.B9EVVV-O.js} +1 -1
  92. package/lib/chunks/layout.BCsKDB9S.js +1 -0
  93. package/lib/chunks/layout.BbWwZ-k5.js +1 -0
  94. package/lib/chunks/layout.BlY_nSey.js +1 -0
  95. package/lib/chunks/layout.CsWdFS5P.js +1 -0
  96. package/lib/chunks/layout.D0p4CwoO.js +1 -0
  97. package/lib/chunks/layout.D4arET4r.js +1 -0
  98. package/lib/chunks/layout.DE2mqrz_.js +1 -0
  99. package/lib/chunks/{layout.2cqUIJaF.js → layout.DWbm8gXV.js} +1 -1
  100. package/lib/chunks/layout.Js61I3wA.js +1 -0
  101. package/lib/chunks/layout.YVnsUDl7.js +1 -0
  102. package/lib/index.js +1 -1
  103. package/package.json +5 -4
  104. package/lib/chunks/global.CSN_bdu1.js +0 -1
  105. package/lib/chunks/layout.BemBeSDu.js +0 -1
  106. package/lib/chunks/layout.CBrqQREH.js +0 -1
  107. package/lib/chunks/layout.DfE3Jkpv.js +0 -1
@@ -0,0 +1,231 @@
1
+ import { useAttrs as $, computed as d, onMounted as L, createBlock as p, openBlock as c, unref as a, mergeProps as U, withCtx as r, createElementBlock as y, renderSlot as g, 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 x, ElIcon as z } from "element-plus";
3
+ import { IconClose as H, IconBack as J } from "color-message-lingyun-vue";
4
+ import { emitsMap as e } from "ling-yun-methods";
5
+ import { _ as K } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
+ import '../assets/layout.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(u, { emit: M }) {
91
+ const P = {
92
+ showCancel: !0,
93
+ showConfirm: !0,
94
+ cancelText: "取消",
95
+ confirmText: "确认",
96
+ onCancel: null,
97
+ onConfirm: null
98
+ }, o = u, m = $(), n = M, b = d(() => o.dialogMode === t.PAGE ? {
99
+ marginLeft: "250px",
100
+ borderRadius: "24px",
101
+ boxShadow: "none"
102
+ } : {}), _ = d(() => o.dialogMode === t.PAGE ? !1 : m.modal ? m.modal : !0), B = d(() => o.dialogMode === t.PAGE ? !0 : m.modalPenetrable ? m.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: (s) => {
105
+ n(e.updateModelValue, s);
106
+ }
107
+ }), l = d(() => ({
108
+ ...P,
109
+ ...o.buttons
110
+ })), G = d(() => {
111
+ const { modelValue: s, ...f } = o;
112
+ return f;
113
+ }), O = () => {
114
+ n(e.open);
115
+ }, T = () => {
116
+ n(e.opened);
117
+ }, S = () => {
118
+ n(e.close);
119
+ }, j = () => {
120
+ n(e.closed);
121
+ }, N = () => {
122
+ n(e.openAutoFocus);
123
+ }, D = () => {
124
+ n(e.closeAutoFocus);
125
+ }, I = () => {
126
+ l.value.onCancel ? l.value.onCancel() : i.value = !1, n(e.cancel);
127
+ }, k = 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
+ n(e.confirm);
136
+ };
137
+ return L(() => {
138
+ o.dialogMode === t.PAGE && (document.querySelector(".el-overlay-dialog").style.overflow = "hidden");
139
+ }), (s, f) => (c(), p(a(q), U({
140
+ ref: "dialogRef",
141
+ modelValue: i.value,
142
+ "onUpdate:modelValue": f[1] || (f[1] = (w) => i.value = w)
143
+ }, G.value, {
144
+ width: V.value,
145
+ top: F.value,
146
+ style: b.value,
147
+ modal: _.value,
148
+ "modal-penetrable": B.value,
149
+ onOpen: O,
150
+ onOpened: T,
151
+ onClose: S,
152
+ onClosed: j,
153
+ onOpenAutoFocus: N,
154
+ onCloseAutoFocus: D,
155
+ "append-to-body": u.appendToBody,
156
+ class: {
157
+ "custom-dialog-page": u.dialogMode === a(t).PAGE
158
+ }
159
+ }), {
160
+ header: r(() => [
161
+ u.dialogMode === a(t).PAGE ? (c(), y("div", X, [
162
+ E(a(z), {
163
+ size: 20,
164
+ color: "var(--text-color-1)",
165
+ class: "mg-r-6 pointer",
166
+ onClick: f[0] || (f[0] = (w) => i.value = !1)
167
+ }, {
168
+ default: r(() => [
169
+ E(a(J))
170
+ ]),
171
+ _: 1
172
+ }),
173
+ h(" " + C(u.titleName), 1)
174
+ ])) : g(s.$slots, "header", { key: 1 }, void 0, !0)
175
+ ]),
176
+ footer: r(() => [
177
+ g(s.$slots, "footer", {}, () => [
178
+ v("div", Y, [
179
+ u.dialogMode === a(t).PAGE ? (c(), y("div", Z, [
180
+ v("div", ee, [
181
+ v("div", oe, [
182
+ l.value.showConfirm ? (c(), p(a(x), {
183
+ key: 0,
184
+ type: "primary",
185
+ onClick: k
186
+ }, {
187
+ default: r(() => [
188
+ h(C(l.value.confirmText), 1)
189
+ ]),
190
+ _: 1
191
+ })) : A("", !0)
192
+ ])
193
+ ])
194
+ ])) : (c(), y(R, { key: 1 }, [
195
+ l.value.showCancel ? (c(), p(a(x), {
196
+ key: 0,
197
+ onClick: I
198
+ }, {
199
+ default: r(() => [
200
+ h(C(l.value.cancelText), 1)
201
+ ]),
202
+ _: 1
203
+ })) : A("", !0),
204
+ l.value.showConfirm ? (c(), p(a(x), {
205
+ key: 1,
206
+ type: "primary",
207
+ onClick: k
208
+ }, {
209
+ default: r(() => [
210
+ h(C(l.value.confirmText), 1)
211
+ ]),
212
+ _: 1
213
+ })) : A("", !0)
214
+ ], 64))
215
+ ])
216
+ ], !0)
217
+ ]),
218
+ default: r(() => [
219
+ u.dialogMode === a(t).PAGE ? (c(), y("div", Q, [
220
+ v("div", W, [
221
+ g(s.$slots, "default", {}, void 0, !0)
222
+ ])
223
+ ])) : g(s.$slots, "default", { key: 1 }, void 0, !0)
224
+ ]),
225
+ _: 3
226
+ }, 16, ["modelValue", "width", "top", "style", "modal", "modal-penetrable", "append-to-body", "class"]));
227
+ }
228
+ }), ce = /* @__PURE__ */ K(te, [["__scopeId", "data-v-9fa594c0"]]);
229
+ export {
230
+ ce as C
231
+ };
@@ -225,7 +225,7 @@ import '../assets/layout2.css';const t = {
225
225
  _: 3
226
226
  }, 16, ["modelValue", "width", "top", "style", "modal", "modal-penetrable", "append-to-body", "class"]));
227
227
  }
228
- }), ce = /* @__PURE__ */ K(te, [["__scopeId", "data-v-7a7a1332"]]);
228
+ }), ce = /* @__PURE__ */ K(te, [["__scopeId", "data-v-9fa594c0"]]);
229
229
  export {
230
230
  ce as C
231
231
  };
@@ -0,0 +1,39 @@
1
+ import { useCssVars as o, createElementBlock as c, openBlock as n, toDisplayString as a } from "vue";
2
+ import { _ as s } from "./_plugin-vue_export-helper.CHgC5LLL.js";
3
+ import '../assets/layout3.css';const r = { class: "custom-title" }, i = /* @__PURE__ */ Object.assign({
4
+ name: "CustomTitle"
5
+ }, {
6
+ __name: "layout",
7
+ props: {
8
+ // 标题内容
9
+ content: {
10
+ type: String,
11
+ default: "自定义标题"
12
+ },
13
+ // 字体大小
14
+ fontSize: {
15
+ type: Number,
16
+ default: 18
17
+ },
18
+ // 字体颜色
19
+ color: {
20
+ type: String,
21
+ default: "var(--text-color-1)"
22
+ },
23
+ // 字体粗细
24
+ fontWeight: {
25
+ type: Number,
26
+ default: 700
27
+ }
28
+ },
29
+ setup(t) {
30
+ return o((e) => ({
31
+ v47d985ee: t.fontWeight,
32
+ v6d50a5d6: t.fontSize + "px",
33
+ v4b029cbc: t.color
34
+ })), (e, l) => (n(), c("div", r, a(t.content), 1));
35
+ }
36
+ }), d = /* @__PURE__ */ s(i, [["__scopeId", "data-v-4d572364"]]);
37
+ export {
38
+ d as C
39
+ };
@@ -0,0 +1,149 @@
1
+ import { useCssVars as L, ref as N, watch as U, createElementBlock as u, createCommentVNode as v, openBlock as r, Fragment as x, renderList as j, normalizeClass as z, unref as o, createElementVNode as m, createBlock as f, normalizeStyle as O, withCtx as S, resolveDynamicComponent as T, toDisplayString as k, renderSlot as M, createVNode as E } from "vue";
2
+ import { ElImage as R, ElIcon as w } from "element-plus";
3
+ import { emitsMap as c, uploadFileTypeMap as P, uploadFileType as a } from "ling-yun-methods";
4
+ import { IconTxt as A, IconPpt as F, IconXls as I, IconDoc as b, IconPdf as G, IconDelete as K } from "color-message-lingyun-vue";
5
+ import { _ as X } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
+ import '../assets/layout5.css';const i = {
7
+ uploading: "uploading",
8
+ success: "success",
9
+ error: "error"
10
+ }, q = {
11
+ key: 0,
12
+ class: "file-list display-grid pd-t-12 pd-b-12"
13
+ }, H = { class: "flex overflow-hidden flex-1 pd-r-10" }, J = { class: "pd-l-8 flex-1 overflow-hidden" }, Q = ["title"], W = { 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(l, { emit: _ }) {
51
+ L((e) => ({
52
+ v247946fe: l.rowCount
53
+ }));
54
+ const p = l, y = _, n = N(p.modelValue), B = Object.fromEntries(
55
+ Object.entries(P).map(([e, s]) => [s, e])
56
+ ), g = (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) : "", C = {
57
+ [a.pdf]: G,
58
+ [a.doc]: b,
59
+ [a.docx]: b,
60
+ [a.xls]: I,
61
+ [a.xlsx]: I,
62
+ [a.ppt]: F,
63
+ [a.pptx]: F,
64
+ [a.txt]: A
65
+ }, V = (e) => e?.includes("image"), $ = (e) => {
66
+ const s = B[e];
67
+ return C[s];
68
+ }, h = (e) => {
69
+ if (!e || e === 0) return "0 B";
70
+ const s = 1024, t = ["B", "KB", "MB", "GB"], d = Math.floor(Math.log(e) / Math.log(s));
71
+ return `${parseFloat((e / Math.pow(s, d)).toFixed(2))} ${t[d]}`;
72
+ }, D = (e, s) => {
73
+ n.value.splice(s, 1), y(c.delete, e), y(c.updateModelValue, n.value), y(c.change, n.value);
74
+ };
75
+ return U(
76
+ () => p.modelValue,
77
+ (e) => {
78
+ n.value = e;
79
+ },
80
+ { immediate: !0 }
81
+ ), (e, s) => n.value?.length ? (r(), u("div", q, [
82
+ (r(!0), u(x, null, j(n.value, (t, d) => (r(), u("div", {
83
+ key: d,
84
+ class: z(["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 === o(i).uploading,
86
+ "bg-fcfdff": t.fileStatus !== o(i).uploading,
87
+ "border-error": t.fileStatus === o(i).error,
88
+ "border-normal": t.fileStatus !== o(i).error
89
+ }])
90
+ }, [
91
+ m("div", H, [
92
+ V(t?.type) && g(t) ? (r(), f(o(R), {
93
+ key: 0,
94
+ src: g(t),
95
+ class: "radius-4",
96
+ fit: "cover",
97
+ style: O({ width: `${l.iconSize}px`, height: `${l.iconSize}px` })
98
+ }, null, 8, ["src", "style"])) : (r(), f(o(w), {
99
+ key: 1,
100
+ size: l.iconSize,
101
+ class: "pointer"
102
+ }, {
103
+ default: S(() => [
104
+ (r(), f(T($(t?.type))))
105
+ ]),
106
+ _: 2
107
+ }, 1032, ["size"])),
108
+ m("div", J, [
109
+ m("div", {
110
+ class: z(["fz-14 text-ellipsis lh-20 flex-1", {
111
+ "text-ec0e13": t.fileStatus === o(i).error,
112
+ "text-262626": t.fileStatus !== o(i).error
113
+ }]),
114
+ title: t[l.fieldMapping.fileName]
115
+ }, k(t[l.fieldMapping.fileName]), 11, Q),
116
+ m("div", W, [
117
+ e.$slots.status ? M(e.$slots, "status", {
118
+ key: 0,
119
+ file: t
120
+ }, void 0, !0) : (r(), u(x, { key: 1 }, [
121
+ e.$slots.size ? M(e.$slots, "size", {
122
+ key: 0,
123
+ file: t,
124
+ size: h(t.size)
125
+ }, void 0, !0) : (r(), u("span", Y, k(h(t.size)), 1))
126
+ ], 64))
127
+ ])
128
+ ])
129
+ ]),
130
+ l.showDelete ? (r(), f(o(w), {
131
+ key: 0,
132
+ size: 16,
133
+ color: t.fileStatus === o(i).error ? "var(--error-color-1)" : "var(--text-color-4)",
134
+ class: "pointer",
135
+ onClick: (ee) => D(t, d)
136
+ }, {
137
+ default: S(() => [
138
+ E(o(K))
139
+ ]),
140
+ _: 1
141
+ }, 8, ["color", "onClick"])) : v("", !0)
142
+ ], 2))), 128))
143
+ ])) : v("", !0);
144
+ }
145
+ }), ae = /* @__PURE__ */ X(Z, [["__scopeId", "data-v-0980a743"]]);
146
+ export {
147
+ ae as _,
148
+ i as u
149
+ };
@@ -1,7 +1,7 @@
1
1
  import { useCssVars as L, ref as N, watch as U, createElementBlock as u, createCommentVNode as v, openBlock as r, Fragment as x, renderList as j, normalizeClass as z, unref as o, createElementVNode as m, createBlock as f, normalizeStyle as O, withCtx as S, resolveDynamicComponent as T, toDisplayString as k, renderSlot as M, createVNode as E } from "vue";
2
2
  import { ElImage as R, ElIcon as w } from "element-plus";
3
3
  import { emitsMap as c, uploadFileTypeMap as P, uploadFileType as a } from "ling-yun-methods";
4
- import { IconTxt as A, IconPpt as b, IconXls as F, IconDoc as I, IconPdf as G, IconDelete as K } from "color-message-lingyun-vue";
4
+ import { IconTxt as A, IconPpt as F, IconXls as I, IconDoc as b, IconPdf as G, IconDelete as K } from "color-message-lingyun-vue";
5
5
  import { _ as X } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
6
  import '../assets/layout6.css';const i = {
7
7
  uploading: "uploading",
@@ -49,18 +49,18 @@ import '../assets/layout6.css';const i = {
49
49
  emits: [c.delete, c.change, c.updateModelValue],
50
50
  setup(l, { emit: _ }) {
51
51
  L((e) => ({
52
- e6fad506: l.rowCount
52
+ v247946fe: l.rowCount
53
53
  }));
54
54
  const p = l, y = _, n = N(p.modelValue), B = Object.fromEntries(
55
55
  Object.entries(P).map(([e, s]) => [s, e])
56
56
  ), g = (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) : "", C = {
57
57
  [a.pdf]: G,
58
- [a.doc]: I,
59
- [a.docx]: I,
60
- [a.xls]: F,
61
- [a.xlsx]: F,
62
- [a.ppt]: b,
63
- [a.pptx]: b,
58
+ [a.doc]: b,
59
+ [a.docx]: b,
60
+ [a.xls]: I,
61
+ [a.xlsx]: I,
62
+ [a.ppt]: F,
63
+ [a.pptx]: F,
64
64
  [a.txt]: A
65
65
  }, V = (e) => e?.includes("image"), $ = (e) => {
66
66
  const s = B[e];
@@ -142,7 +142,7 @@ import '../assets/layout6.css';const i = {
142
142
  ], 2))), 128))
143
143
  ])) : v("", !0);
144
144
  }
145
- }), ae = /* @__PURE__ */ X(Z, [["__scopeId", "data-v-baab285a"]]);
145
+ }), ae = /* @__PURE__ */ X(Z, [["__scopeId", "data-v-0980a743"]]);
146
146
  export {
147
147
  ae as _,
148
148
  i as u
package/es/index.mjs CHANGED
@@ -3,79 +3,84 @@ import { SearchBar as e } from "./SearchBar.mjs";
3
3
  import { PaginationTable as i } from "./PaginationTable.mjs";
4
4
  import { UploadFile as p } from "./UploadFile.mjs";
5
5
  import { FileList as n } from "./FileList.mjs";
6
- import { BatchImport as f } from "./BatchImport.mjs";
7
- import { GradientButton as a } from "./GradientButton.mjs";
6
+ import { BatchImport as a } from "./BatchImport.mjs";
7
+ import { GradientButton as f } from "./GradientButton.mjs";
8
8
  import { CustomDialog as l } from "./CustomDialog.mjs";
9
9
  import { CustomPagination as s } from "./CustomPagination.mjs";
10
10
  import { CustomTitle as c } from "./CustomTitle.mjs";
11
11
  import { CustomDropdown as S } from "./CustomDropdown.mjs";
12
12
  import { TreeSelect as u } from "./TreeSelect.mjs";
13
- import { TreeShowSelect as T } from "./TreeShowSelect.mjs";
14
- import { IconEmpty as d } from "./IconEmpty.mjs";
15
- import { IconRenderer as I } from "./IconRenderer.mjs";
16
- import { IconSelect as _ } from "./IconSelect.mjs";
17
- import { UpdatePasswordDialog as B } from "./UpdatePasswordDialog.mjs";
18
- import { BUILD_BIG_TITLES as C, BUILD_STEPS as D, BUILD_TITLES as E, BUILD_TYPES as L, BuildComponents as P, STEP_ARROW_IMAGE as g } from "./BuildComponents.mjs";
19
- import { CustomTab as U } from "./CustomTab.mjs";
20
- import { dayjs as b } from "element-plus";
13
+ import { TreeShowSelect as d } from "./TreeShowSelect.mjs";
14
+ import { IconEmpty as T } from "./IconEmpty.mjs";
15
+ import { IconRenderer as I, iconLibraryMap as _ } from "./IconRenderer.mjs";
16
+ import { IconSelect as B } from "./IconSelect.mjs";
17
+ import { PageNotFound as L } from "./PageNotFound.mjs";
18
+ import { UpdatePasswordDialog as P } from "./UpdatePasswordDialog.mjs";
19
+ import { BUILD_BIG_TITLES as g, BUILD_STEPS as C, BUILD_TITLES as D, BUILD_TYPES as E, BuildComponents as b, STEP_ARROW_IMAGE as U } from "./BuildComponents.mjs";
20
+ import { CustomTab as y } from "./CustomTab.mjs";
21
+ import { dayjs as w } from "element-plus";
21
22
  const o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22
23
  __proto__: null,
23
- BUILD_BIG_TITLES: C,
24
- BUILD_STEPS: D,
25
- BUILD_TITLES: E,
26
- BUILD_TYPES: L,
27
- BatchImport: f,
28
- BuildComponents: P,
24
+ BUILD_BIG_TITLES: g,
25
+ BUILD_STEPS: C,
26
+ BUILD_TITLES: D,
27
+ BUILD_TYPES: E,
28
+ BatchImport: a,
29
+ BuildComponents: b,
29
30
  CustomDialog: l,
30
31
  CustomDropdown: S,
31
32
  CustomPagination: s,
32
33
  CustomSelect: m,
33
- CustomTab: U,
34
+ CustomTab: y,
34
35
  CustomTitle: c,
35
36
  FileList: n,
36
- GradientButton: a,
37
- IconEmpty: d,
37
+ GradientButton: f,
38
+ IconEmpty: T,
38
39
  IconRenderer: I,
39
- IconSelect: _,
40
+ IconSelect: B,
41
+ PageNotFound: L,
40
42
  PaginationTable: i,
41
- STEP_ARROW_IMAGE: g,
43
+ STEP_ARROW_IMAGE: U,
42
44
  SearchBar: e,
43
45
  TreeSelect: u,
44
- TreeShowSelect: T,
45
- UpdatePasswordDialog: B,
46
- UploadFile: p
46
+ TreeShowSelect: d,
47
+ UpdatePasswordDialog: P,
48
+ UploadFile: p,
49
+ iconLibraryMap: _
47
50
  }, Symbol.toStringTag, { value: "Module" }));
48
- b.en.weekStart = 1;
49
- const w = (r) => {
50
- for (const t in o)
51
- o[t].install && r.use(o[t]);
52
- }, Q = {
53
- install: w
51
+ w.en.weekStart = 1;
52
+ const h = (t) => {
53
+ for (const r in o)
54
+ o[r].install && t.use(o[r]);
55
+ }, Z = {
56
+ install: h
54
57
  };
55
58
  export {
56
- C as BUILD_BIG_TITLES,
57
- D as BUILD_STEPS,
58
- E as BUILD_TITLES,
59
- L as BUILD_TYPES,
60
- f as BatchImport,
61
- P as BuildComponents,
59
+ g as BUILD_BIG_TITLES,
60
+ C as BUILD_STEPS,
61
+ D as BUILD_TITLES,
62
+ E as BUILD_TYPES,
63
+ a as BatchImport,
64
+ b as BuildComponents,
62
65
  l as CustomDialog,
63
66
  S as CustomDropdown,
64
67
  s as CustomPagination,
65
68
  m as CustomSelect,
66
- U as CustomTab,
69
+ y as CustomTab,
67
70
  c as CustomTitle,
68
71
  n as FileList,
69
- a as GradientButton,
70
- d as IconEmpty,
72
+ f as GradientButton,
73
+ T as IconEmpty,
71
74
  I as IconRenderer,
72
- _ as IconSelect,
75
+ B as IconSelect,
76
+ L as PageNotFound,
73
77
  i as PaginationTable,
74
- g as STEP_ARROW_IMAGE,
78
+ U as STEP_ARROW_IMAGE,
75
79
  e as SearchBar,
76
80
  u as TreeSelect,
77
- T as TreeShowSelect,
78
- B as UpdatePasswordDialog,
81
+ d as TreeShowSelect,
82
+ P as UpdatePasswordDialog,
79
83
  p as UploadFile,
80
- Q as default
84
+ Z as default,
85
+ _ as iconLibraryMap
81
86
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const D=require("./chunks/index.CkihWzK6.js"),e=require("vue"),c=require("element-plus"),s=require("ling-yun-methods"),h=require("./chunks/layout.2cqUIJaF.js"),S=require("color-message-lingyun-vue"),b={__name:"ImportResultContent",props:{uploadResData:{type:Object,default:()=>({})},templateConfig:{type:Object,default:()=>({})}},setup(n){const r=n,f=()=>{const{ossUrl:p,fileName:l}=r.uploadResData;r.templateConfig.downloadErrorFile(l,p,r.templateConfig.isNeedTransform)};return(p,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("p",null," 共"+e.toDisplayString(n.uploadResData.total||0)+"条数据,其中"+e.toDisplayString(n.uploadResData.successTotal||0)+"条数据成功,"+e.toDisplayString(n.uploadResData.failureTotal||0)+"条失败 ",1),e.createElementVNode("p",{style:{color:"var(--text-color-4)"}},[l[0]||(l[0]=e.createElementVNode("span",null,"失败原因请下载",-1)),e.createElementVNode("span",{class:"pointer",style:{color:"var(--error-color-1)"},onClick:f}," 错误报告 ")])],64))}},M={key:0,class:"flex items-center"},R={key:0,class:"flex items-center flex-1 fz-12"},q={key:1},I=Object.assign({name:"BatchImport"},{__name:"layout",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:"导入"},templateName:{type:String,default:"导入"},width:{type:Number,default:520},templateConfig:{type:Object,default:()=>({})},uploadFileConfig:{type:Object,default:()=>{}}},emits:[s.emitsMap.updateModelValue,"success","error","cancel","uploadSuccess"],setup(n,{emit:r}){const f={templateFileName:"导入模板.xlsx"},p={uploadFileType:[s.uploadFileType.xlsx,s.uploadFileType.xls],isCustomRequest:!0,multiple:!1,rowCount:1,maxCount:1},l=n,v=r,i=e.ref([]),d=e.computed({get(){return l.modelValue},set(o){v(s.emitsMap.updateModelValue,o)}}),k=e.computed(()=>u.value==="result"?"导入结果":l.title),C=e.computed(()=>({...p,...l.uploadFileConfig})),m=e.computed(()=>({...f,...l.templateConfig})),w=()=>{m.value.downloadTemplate({},m.value.templateFileName)},u=e.ref("upload"),y=e.ref({}),B=()=>{d.value=!1};function T(o,t){const a=o.name.split(".").pop(),g=`${t}.${a}`;return new File([o],g,{type:o.type,lastModified:o.lastModified})}const E=e.ref(null),F=async()=>{const o=l.uploadFileConfig?.fileName||i.value?.[0]?.raw?.name;C.value?.apiConfig({...C.value?.params,file:T(i.value?.[0]?.raw,o)}).then(t=>{const{data:a}=t;E.value=a;const{failureTotal:g,successTotal:N}=a;t.code===s.codeMap.success&&(g?(u.value="result",y.value=a,N&&v("uploadSuccess")):(s.messageSuccess(`文件导入成功,共导入数据:${N}条`),v("uploadSuccess"),d.value=!1))})},V=()=>{d.value=!1};return(o,t)=>(e.openBlock(),e.createBlock(e.unref(c.ElDialog),{modelValue:d.value,"onUpdate:modelValue":t[1]||(t[1]=a=>d.value=a),title:k.value,width:n.width,"close-on-click-modal":!1,"close-on-press-escape":!1,onClose:V},{footer:e.withCtx(()=>[u.value==="upload"?(e.openBlock(),e.createElementBlock("div",M,[m.value?.downloadTemplate?(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(e.unref(c.ElIcon),{size:14,color:"var(--text-color-4)"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.IconQuery))]),_:1}),t[2]||(t[2]=e.createElementVNode("div",{class:"text-74798c pd-l-4"},"还没有模板?点击下载",-1)),e.createElementVNode("div",{class:"text-3b64ff pointer",onClick:w}," 《"+e.toDisplayString(n.templateName)+"模板》 ",1)])):e.createCommentVNode("",!0),e.createVNode(e.unref(c.ElButton),{onClick:V},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:F,disabled:!i.value?.length},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" 确认 ",-1)])]),_:1},8,["disabled"])])):e.createCommentVNode("",!0),u.value==="result"?(e.openBlock(),e.createElementBlock("div",q,[e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:B},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode("我知道了",-1)])]),_:1})])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[u.value==="upload"?(e.openBlock(),e.createBlock(h.default,e.mergeProps({key:0,modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=a=>i.value=a)},C.value),null,16,["modelValue"])):e.createCommentVNode("",!0),u.value==="result"?(e.openBlock(),e.createBlock(b,{key:1,templateConfig:m.value,uploadResData:y.value},null,8,["templateConfig","uploadResData"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","title","width"]))}}),x=D.withInstall(I);exports.BatchImport=x;exports.default=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const D=require("./chunks/index.CkihWzK6.js"),e=require("vue"),c=require("element-plus"),s=require("ling-yun-methods"),h=require("./chunks/layout.DWbm8gXV.js"),S=require("color-message-lingyun-vue"),b={__name:"ImportResultContent",props:{uploadResData:{type:Object,default:()=>({})},templateConfig:{type:Object,default:()=>({})}},setup(n){const r=n,f=()=>{const{ossUrl:p,fileName:l}=r.uploadResData;r.templateConfig.downloadErrorFile(l,p,r.templateConfig.isNeedTransform)};return(p,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("p",null," 共"+e.toDisplayString(n.uploadResData.total||0)+"条数据,其中"+e.toDisplayString(n.uploadResData.successTotal||0)+"条数据成功,"+e.toDisplayString(n.uploadResData.failureTotal||0)+"条失败 ",1),e.createElementVNode("p",{style:{color:"var(--text-color-4)"}},[l[0]||(l[0]=e.createElementVNode("span",null,"失败原因请下载",-1)),e.createElementVNode("span",{class:"pointer",style:{color:"var(--error-color-1)"},onClick:f}," 错误报告 ")])],64))}},M={key:0,class:"flex items-center"},R={key:0,class:"flex items-center flex-1 fz-12"},q={key:1},I=Object.assign({name:"BatchImport"},{__name:"layout",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:"导入"},templateName:{type:String,default:"导入"},width:{type:Number,default:520},templateConfig:{type:Object,default:()=>({})},uploadFileConfig:{type:Object,default:()=>{}}},emits:[s.emitsMap.updateModelValue,"success","error","cancel","uploadSuccess"],setup(n,{emit:r}){const f={templateFileName:"导入模板.xlsx"},p={uploadFileType:[s.uploadFileType.xlsx,s.uploadFileType.xls],isCustomRequest:!0,multiple:!1,rowCount:1,maxCount:1},l=n,v=r,i=e.ref([]),d=e.computed({get(){return l.modelValue},set(o){v(s.emitsMap.updateModelValue,o)}}),k=e.computed(()=>u.value==="result"?"导入结果":l.title),C=e.computed(()=>({...p,...l.uploadFileConfig})),m=e.computed(()=>({...f,...l.templateConfig})),w=()=>{m.value.downloadTemplate({},m.value.templateFileName)},u=e.ref("upload"),y=e.ref({}),B=()=>{d.value=!1};function T(o,t){const a=o.name.split(".").pop(),g=`${t}.${a}`;return new File([o],g,{type:o.type,lastModified:o.lastModified})}const E=e.ref(null),F=async()=>{const o=l.uploadFileConfig?.fileName||i.value?.[0]?.raw?.name;C.value?.apiConfig({...C.value?.params,file:T(i.value?.[0]?.raw,o)}).then(t=>{const{data:a}=t;E.value=a;const{failureTotal:g,successTotal:N}=a;t.code===s.codeMap.success&&(g?(u.value="result",y.value=a,N&&v("uploadSuccess")):(s.messageSuccess(`文件导入成功,共导入数据:${N}条`),v("uploadSuccess"),d.value=!1))})},V=()=>{d.value=!1};return(o,t)=>(e.openBlock(),e.createBlock(e.unref(c.ElDialog),{modelValue:d.value,"onUpdate:modelValue":t[1]||(t[1]=a=>d.value=a),title:k.value,width:n.width,"close-on-click-modal":!1,"close-on-press-escape":!1,onClose:V},{footer:e.withCtx(()=>[u.value==="upload"?(e.openBlock(),e.createElementBlock("div",M,[m.value?.downloadTemplate?(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(e.unref(c.ElIcon),{size:14,color:"var(--text-color-4)"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.IconQuery))]),_:1}),t[2]||(t[2]=e.createElementVNode("div",{class:"text-74798c pd-l-4"},"还没有模板?点击下载",-1)),e.createElementVNode("div",{class:"text-3b64ff pointer",onClick:w}," 《"+e.toDisplayString(n.templateName)+"模板》 ",1)])):e.createCommentVNode("",!0),e.createVNode(e.unref(c.ElButton),{onClick:V},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:F,disabled:!i.value?.length},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" 确认 ",-1)])]),_:1},8,["disabled"])])):e.createCommentVNode("",!0),u.value==="result"?(e.openBlock(),e.createElementBlock("div",q,[e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:B},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode("我知道了",-1)])]),_:1})])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[u.value==="upload"?(e.openBlock(),e.createBlock(h.default,e.mergeProps({key:0,modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=a=>i.value=a)},C.value),null,16,["modelValue"])):e.createCommentVNode("",!0),u.value==="result"?(e.openBlock(),e.createBlock(b,{key:1,templateConfig:m.value,uploadResData:y.value},null,8,["templateConfig","uploadResData"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","title","width"]))}}),x=D.withInstall(I);exports.BatchImport=x;exports.default=x;