act-plus 1.1.68 → 1.1.69
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/act-plus.js +2 -2
- package/act-plus.umd.cjs +47 -47
- package/lib/{dialogAddField-8464a455.js → dialogAddField-50888f78.js} +2 -2
- package/lib/{dialogConfigBtn-6f3155f8.js → dialogConfigBtn-b00c088c.js} +2 -2
- package/lib/{dialogSiteComponentsParams-640c349d.js → dialogSiteComponentsParams-8b3cf16d.js} +1 -1
- package/lib/index-29b2d73c.js +249 -0
- package/lib/{index-dc66e108.js → index-2eafd229.js} +1 -1
- package/lib/{index-dd68417c.js → index-39365eec.js} +1 -1
- package/lib/{index-e8f5d9bc.js → index-7e0022be.js} +2241 -2063
- package/lib/{index-3895516f.js → index-bf11ca50.js} +1 -1
- package/lib/{index-c7a56aee.js → index-cad52b3b.js} +1 -1
- package/lib/{index-623a9365.js → index-ddd16ee1.js} +1 -1
- package/lib/{index-62706177.js → index-eea3cb2d.js} +2 -2
- package/lib/{index-534e552d.js → index-fa69ad05.js} +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/lib/index-6a5a9e19.js +0 -293
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as R, inject as l, watch as j, resolveComponent as y, resolveDirective as q, openBlock as r, createElementBlock as u, Fragment as f, renderList as E, unref as d, createBlock as i, resolveDynamicComponent as H, withCtx as b, withDirectives as C, createCommentVNode as _, createTextVNode as k, toDisplayString as B } from "vue";
|
|
2
|
-
import { _ as M, u as z } from "./index-
|
|
2
|
+
import { _ as M, u as z } from "./index-7e0022be.js";
|
|
3
3
|
import "vue-router";
|
|
4
4
|
import "element-plus";
|
|
5
5
|
const G = { class: "header-operate-container" }, J = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as yd, shallowRef as qn, inject as xd, computed as Jh, toRaw as wd, onMounted as Sd, watch as le, onBeforeUnmount as vd, h as kd, ref as kl, resolveComponent as Qd, resolveDirective as Pd, openBlock as Ql, createElementBlock as $d, withDirectives as Td, createBlock as Zd, withCtx as Cd, createTextVNode as Rd, toDisplayString as Ad, unref as Pl, createVNode as Md, normalizeStyle as Ed } from "vue";
|
|
2
|
-
import { _ as Xd, u as Ld } from "./index-
|
|
2
|
+
import { _ as Xd, u as Ld } from "./index-7e0022be.js";
|
|
3
3
|
import "vue-router";
|
|
4
4
|
import "element-plus";
|
|
5
5
|
let Mr = [], tf = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as p, watch as h, resolveComponent as _, openBlock as r, createElementBlock as m, createVNode as v, unref as u, isRef as w, withCtx as f, createElementVNode as g, createBlock as C, createCommentVNode as N, createTextVNode as $, Fragment as B, renderList as E, normalizeClass as L } from "vue";
|
|
2
|
-
import { _ as P } from "./index-
|
|
2
|
+
import { _ as P } from "./index-7e0022be.js";
|
|
3
3
|
import "vue-router";
|
|
4
4
|
import "element-plus";
|
|
5
5
|
const R = { class: "select-icon-container" }, S = { class: "icon-list" }, j = ["onClick"], z = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineAsyncComponent as O, inject as K, ref as N, watch as Te, resolveComponent as _, resolveDirective as le, openBlock as u, createBlock as y, withCtx as D, createElementVNode as ae, createVNode as te, createTextVNode as J, toDisplayString as A, unref as r, withDirectives as oe, createElementBlock as k, Fragment as q, renderList as Q, mergeProps as F, createCommentVNode as se, resolveDynamicComponent as De, toRaw as Ke } from "vue";
|
|
2
|
-
import { _ as we, u as Ne, P as Pe, a as Ue, b as ke } from "./index-
|
|
2
|
+
import { _ as we, u as Ne, P as Pe, a as Ue, b as ke } from "./index-7e0022be.js";
|
|
3
3
|
import { ElNotification as Se } from "element-plus";
|
|
4
4
|
import "vue-router";
|
|
5
5
|
const Le = { class: "no-config-field" }, Re = { class: "dialog-footer" }, $e = {
|
|
@@ -11,7 +11,7 @@ const Le = { class: "no-config-field" }, Re = { class: "dialog-footer" }, $e = {
|
|
|
11
11
|
},
|
|
12
12
|
emits: ["update:visible", "refresh"],
|
|
13
13
|
setup(P, { emit: ie }) {
|
|
14
|
-
const re = O(() => import("./index-e2f2023d.js")), de = O(() => import("./index-
|
|
14
|
+
const re = O(() => import("./index-e2f2023d.js")), de = O(() => import("./index-ddd16ee1.js")), ne = O(() => import("./index-29b2d73c.js")), ue = O(() => import("./index-7a420913.js")), { t: b } = Ne(), M = K("request"), ce = K("loadComponents"), w = K("formatDataType"), x = K("globalProps"), fe = K("stringToBoolean"), h = K("getFieldUiProps"), pe = K("disposeRequestData"), X = ie, f = P, S = N(!1), L = N(!1), E = N(null), R = N([]), t = N({}), j = N({}), me = (l) => l.formColumnCol == null ? 24 : l.formColumnCol ? l.formColumnCol : 24 / l.formRow, ye = (l) => ["input", "textarea"].includes(l.fieldType) ? "blur" : (["select", "multipleSelect", "datetimerange", "treeSelect", "provinceCascade"].includes(l.fieldType), "change"), be = async ({ node: l, resolve: p }, a) => {
|
|
15
15
|
const i = h(a), { label: m, value: n, children: g, isLeaf: o } = { ...ke, ...i.treeProps || {} };
|
|
16
16
|
if (l[o])
|
|
17
17
|
return p([]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reactive as m, watch as b, resolveComponent as s, openBlock as v, createBlock as g, withCtx as o, createElementVNode as i, createVNode as x, createTextVNode as y, toDisplayString as h, unref as C } from "vue";
|
|
2
|
-
import { _ as k, u as w } from "./index-
|
|
2
|
+
import { _ as k, u as w } from "./index-7e0022be.js";
|
|
3
3
|
import "vue-router";
|
|
4
4
|
import "element-plus";
|
|
5
5
|
const V = ["innerHTML"], B = { class: "dialog-footer" }, D = {
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-card .el-card__header{font-size:16px;font-weight:700}.rotate180{transform:rotate(180deg)}.cp{cursor:pointer}.cp:hover{opacity:.8}.ml12{margin-left:12px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mt24{margin-top:24px}.ml6{margin-left:6px!important}.ml4{margin-left:4px!important}.mr6{margin-right:6px}.mr2{margin-right:2px}.mr4{margin-right:4px}.el-table{font-size:14px}.el-select,.el-cascader,.el-form--inline .el-form-item{display:block;width:100%}.el-card{height:100%;--el-card-padding: 12px}.el-card__body{height:100%;box-sizing:border-box}.el-date-editor{--el-date-editor-width: 100%}.month-range .el-date-range-picker{width:320px}.month-range .el-date-range-picker .el-picker-panel__body{min-width:320px}.month-range .is-left{width:100%}.month-range .el-date-range-picker__header,.month-range .is-right{display:none}.table-link{cursor:pointer;color:#409eff;text-decoration:underline}.a-loading[data-v-048c6c03]{display:flex;align-items:center;justify-content:center;width:100%;height:50px;font-size:32px}.a-loading .dot[data-v-048c6c03]{animation:antRotate-048c6c03 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;width:28px;height:28px;box-sizing:border-box}.a-loading .dot i[data-v-048c6c03]{width:12px;height:12px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove-048c6c03 1s infinite linear alternate}.a-loading .dot i[data-v-048c6c03]:nth-child(1){top:0;left:0}.a-loading .dot i[data-v-048c6c03]:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.a-loading .dot i[data-v-048c6c03]:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.a-loading .dot i[data-v-048c6c03]:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate-048c6c03{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate-048c6c03{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove-048c6c03{to{opacity:1}}@-webkit-keyframes antSpinMove-048c6c03{to{opacity:1}}[data-v-
|
|
1
|
+
.form-card .el-card__header{font-size:16px;font-weight:700}.rotate180{transform:rotate(180deg)}.cp{cursor:pointer}.cp:hover{opacity:.8}.ml12{margin-left:12px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mt24{margin-top:24px}.ml6{margin-left:6px!important}.ml4{margin-left:4px!important}.mr6{margin-right:6px}.mr2{margin-right:2px}.mr4{margin-right:4px}.el-table{font-size:14px}.el-select,.el-cascader,.el-form--inline .el-form-item{display:block;width:100%}.el-card{height:100%;--el-card-padding: 12px}.el-card__body{height:100%;box-sizing:border-box}.el-date-editor{--el-date-editor-width: 100%}.month-range .el-date-range-picker{width:320px}.month-range .el-date-range-picker .el-picker-panel__body{min-width:320px}.month-range .is-left{width:100%}.month-range .el-date-range-picker__header,.month-range .is-right{display:none}.table-link{cursor:pointer;color:#409eff;text-decoration:underline}.a-loading[data-v-048c6c03]{display:flex;align-items:center;justify-content:center;width:100%;height:50px;font-size:32px}.a-loading .dot[data-v-048c6c03]{animation:antRotate-048c6c03 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;width:28px;height:28px;box-sizing:border-box}.a-loading .dot i[data-v-048c6c03]{width:12px;height:12px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove-048c6c03 1s infinite linear alternate}.a-loading .dot i[data-v-048c6c03]:nth-child(1){top:0;left:0}.a-loading .dot i[data-v-048c6c03]:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.a-loading .dot i[data-v-048c6c03]:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.a-loading .dot i[data-v-048c6c03]:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate-048c6c03{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate-048c6c03{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove-048c6c03{to{opacity:1}}@-webkit-keyframes antSpinMove-048c6c03{to{opacity:1}}[data-v-5267d6bd] .el-empty__image{width:100%}.file-image[data-v-5267d6bd]{display:block;width:32px;height:32px;margin:0 auto;border-radius:4px;line-height:32px!important}.no-image[data-v-5267d6bd]{width:100%;height:100%;font-size:12px;background-color:#f5f7fa}.act-module[data-v-5267d6bd]{padding:0;margin:0;border:none}.table-opreate-dropdown[data-v-5267d6bd]{margin:4px 0 0 8px}.table-btn-more[data-v-5267d6bd]{width:16px;height:16px}.table-btn-more[data-v-5267d6bd]:hover{cursor:pointer;opacity:.8}.add-icon-btn[data-v-e0718fb3]{cursor:pointer;width:24px;height:24px;margin-left:6px}.table-post-params[data-v-e0718fb3]{position:relative;margin-bottom:12px}.table-post-params .submit-operate[data-v-e0718fb3]{position:absolute;top:-20px;right:-10px;display:flex;align-items:center}.table-post-params .submit-operate .match-opreate[data-v-e0718fb3]{cursor:pointer;width:12px;height:12px}.card-header[data-v-b9c8f90c]{display:flex;align-items:center}.card-header -operate[data-v-b9c8f90c]{margin-left:auto}.form-list[data-v-b9c8f90c]{margin-bottom:24px;border-bottom:1px solid var(--el-color-primary)}.form-list[data-v-b9c8f90c]:last-child{border:none}.config-list-operate[data-v-b9c8f90c]{display:flex;align-items:center;justify-content:flex-end}.card-header[data-v-75e750d2]{display:flex;align-items:center}.card-header-operate[data-v-75e750d2]{margin-left:auto}.form-list[data-v-75e750d2]{margin-bottom:24px;border-bottom:1px solid var(--el-color-primary)}.form-list[data-v-75e750d2]:last-child{border:none}.config-list-operate[data-v-75e750d2]{display:flex;align-items:center;justify-content:flex-end}[data-v-75e750d2] .el-badge__content.is-fixed{transform:translateY(-50%) translate(100%) scale(.7)}.submit-operate[data-v-8fa48448]{display:flex;align-items:center;height:32px;padding-left:12px}.submit-operate .match-opreate[data-v-8fa48448]{cursor:pointer;width:20px;height:20px}.page-container[data-v-8dfa8a8a]{position:relative}.page-container .header-operate[data-v-8dfa8a8a]{position:sticky;top:0;z-index:999}.page-container .submit-box[data-v-8dfa8a8a]{display:flex;align-items:center;justify-content:space-between}.page-container .submit-box-r[data-v-8dfa8a8a]{display:flex;align-items:center}.page-container .submit-box-r .menu-select[data-v-8dfa8a8a]{width:360px;margin:0 24px}.search-module-container[data-v-c49a11b4] .el-form-item{margin-bottom:8px}.search-module-container[data-v-c49a11b4] .el-select__selection{flex-wrap:nowrap;width:200px}.search-module-container .form-content[data-v-c49a11b4]{display:grid;grid-template-columns:repeat(var(--table-query-row),1fr);gap:6px;padding:6px 6px 0}.search-module-container .form-content .search-form-btn[data-v-c49a11b4]{justify-self:end;align-self:start;grid-column-start:var(--table-query-row);grid-column-end:var(--table-query-row)}.search-module-container .expand[data-v-c49a11b4]{display:flex;margin:0 auto;color:#a4a2a2}.header-operate-container[data-v-6477fb97]{display:flex;align-items:center;justify-content:flex-end}.header-operate-container .el-btn[data-v-6477fb97]{margin:2px}.act-table .table-pagination[data-v-d2da0301]{padding:12px 4px;justify-content:flex-end}.no-config[data-v-c6e7e23b]{line-height:32px;font-weight:700}.no-config-field[data-v-c6e7e23b]{color:red}.card-header[data-v-be1c5be6]{display:flex;align-items:center}.card-header-operate[data-v-be1c5be6]{margin-left:auto}.add-icon-btn[data-v-c38b8a42]{cursor:pointer;width:24px;height:24px;margin-left:6px}.condition-box[data-v-c38b8a42]{display:flex;justify-content:center}.condition-box[data-v-c38b8a42] .el-form-item__content{flex:0;min-width:300px}.submit-operate[data-v-c38b8a42]{display:flex;align-items:center;height:32px;padding-left:12px}.submit-operate .match-opreate[data-v-c38b8a42]{cursor:pointer;width:20px;height:20px}.add-icon-btn[data-v-6b2ebaa8]{cursor:pointer;width:24px;height:24px;margin-left:6px}.submit-operate[data-v-6b2ebaa8]{display:flex;align-items:center;height:32px;padding-left:12px}.submit-operate .match-opreate[data-v-6b2ebaa8]{cursor:pointer;width:20px;height:20px}.select-icon-popover .icon-list{display:grid;grid-template-columns:repeat(8,1fr)}.select-icon-popover .icon-list .icon-item{display:flex;align-items:center;justify-content:center;margin:4px 0;border:1px solid transparent}.select-icon-popover .icon-list .icon-item .icon-svg{cursor:pointer}.select-icon-popover .icon-list .icon-item-checked{border:1px solid #000}.select-icon-container .icon-value[data-v-308d02d4]{display:flex;align-items:center}.select-icon-container .icon-value .icon-btn[data-v-308d02d4]{margin-left:12px}.upload-container[data-v-f839bee6]{width:100%}.upload-container[data-v-f839bee6] .el-upload-list--picture-card{display:flex;flex:1}.upload-container[data-v-f839bee6] .el-upload.is-drag{width:100%;height:100%}.upload-container .tip-text[data-v-f839bee6]{margin:0;padding:0;font-size:12px;color:#999}.upload-container .file-list[data-v-f839bee6]{display:flex;align-items:center;justify-content:space-between;margin:6px 0;padding:6px 12px;font-size:14px;border-radius:4px;border:1px solid #dcdfe6}.upload-container .file-list[data-v-f839bee6]:hover{cursor:pointer;opacity:.8}.upload-container .file-list:hover .el-file-name[data-v-f839bee6]{text-decoration:underline}.upload-container .file-list-l[data-v-f839bee6]{display:flex;align-items:center;flex:1;width:500px}.upload-container .file-list-image[data-v-f839bee6]{flex-shrink:0;width:40px;height:40px;border-radius:4px}.upload-container .file-list-icon[data-v-f839bee6]{flex-shrink:0;width:40px;height:40px}.upload-container .file-list .el-file-name[data-v-f839bee6]{flex:1;padding:0 12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.upload-container .file-list .el-file-operate[data-v-f839bee6]{display:flex;justify-content:flex-end;flex-shrink:0;min-width:82px;margin-left:auto}.upload-container .file-list .el-file-operate>i[data-v-f839bee6]{cursor:pointer;margin-left:12px}.upload-container .file-list .el-file-operate>i[data-v-f839bee6]:hover{opacity:.8}.tox-tinymce-aux{z-index:99999!important}.tinymce.ui.FloatPanel{z-index:99}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks):before{color:#a8abb2}.act-code-mirror[data-v-451d513f]{width:100%}.act-code-mirror .format-code-btn[data-v-451d513f]{margin-bottom:4px}
|
package/lib/index-6a5a9e19.js
DELETED
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
import { defineComponent as L, openBlock as d, createElementBlock as T, createElementVNode as _, ref as D, computed as oe, resolveComponent as F, resolveDirective as ne, withDirectives as ie, createBlock as U, mergeProps as se, unref as p, withCtx as z, renderSlot as j, toDisplayString as I, createCommentVNode as A, createVNode as $, createTextVNode as re, Fragment as ce, renderList as ue, normalizeClass as pe, nextTick as de } from "vue";
|
|
2
|
-
import { ElNotification as E } from "element-plus";
|
|
3
|
-
import { _ as me, u as _e, n as fe } from "./index-e8f5d9bc.js";
|
|
4
|
-
import "vue-router";
|
|
5
|
-
/*! Element Plus Icons Vue v2.3.1 */
|
|
6
|
-
var ge = /* @__PURE__ */ L({
|
|
7
|
-
name: "Delete",
|
|
8
|
-
__name: "delete",
|
|
9
|
-
setup(l) {
|
|
10
|
-
return (a, f) => (d(), T("svg", {
|
|
11
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
-
viewBox: "0 0 1024 1024"
|
|
13
|
-
}, [
|
|
14
|
-
_("path", {
|
|
15
|
-
fill: "currentColor",
|
|
16
|
-
d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
|
|
17
|
-
})
|
|
18
|
-
]));
|
|
19
|
-
}
|
|
20
|
-
}), ve = ge, he = /* @__PURE__ */ L({
|
|
21
|
-
name: "Download",
|
|
22
|
-
__name: "download",
|
|
23
|
-
setup(l) {
|
|
24
|
-
return (a, f) => (d(), T("svg", {
|
|
25
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
26
|
-
viewBox: "0 0 1024 1024"
|
|
27
|
-
}, [
|
|
28
|
-
_("path", {
|
|
29
|
-
fill: "currentColor",
|
|
30
|
-
d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"
|
|
31
|
-
})
|
|
32
|
-
]));
|
|
33
|
-
}
|
|
34
|
-
}), ye = he, we = /* @__PURE__ */ L({
|
|
35
|
-
name: "ZoomIn",
|
|
36
|
-
__name: "zoom-in",
|
|
37
|
-
setup(l) {
|
|
38
|
-
return (a, f) => (d(), T("svg", {
|
|
39
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
-
viewBox: "0 0 1024 1024"
|
|
41
|
-
}, [
|
|
42
|
-
_("path", {
|
|
43
|
-
fill: "currentColor",
|
|
44
|
-
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"
|
|
45
|
-
})
|
|
46
|
-
]));
|
|
47
|
-
}
|
|
48
|
-
}), xe = we;
|
|
49
|
-
let S;
|
|
50
|
-
const Fe = new Uint8Array(16);
|
|
51
|
-
function Te() {
|
|
52
|
-
if (!S && (S = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !S))
|
|
53
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
54
|
-
return S(Fe);
|
|
55
|
-
}
|
|
56
|
-
const n = [];
|
|
57
|
-
for (let l = 0; l < 256; ++l)
|
|
58
|
-
n.push((l + 256).toString(16).slice(1));
|
|
59
|
-
function Ve(l, a = 0) {
|
|
60
|
-
return n[l[a + 0]] + n[l[a + 1]] + n[l[a + 2]] + n[l[a + 3]] + "-" + n[l[a + 4]] + n[l[a + 5]] + "-" + n[l[a + 6]] + n[l[a + 7]] + "-" + n[l[a + 8]] + n[l[a + 9]] + "-" + n[l[a + 10]] + n[l[a + 11]] + n[l[a + 12]] + n[l[a + 13]] + n[l[a + 14]] + n[l[a + 15]];
|
|
61
|
-
}
|
|
62
|
-
const ke = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), H = {
|
|
63
|
-
randomUUID: ke
|
|
64
|
-
};
|
|
65
|
-
function $e(l, a, f) {
|
|
66
|
-
if (H.randomUUID && !a && !l)
|
|
67
|
-
return H.randomUUID();
|
|
68
|
-
l = l || {};
|
|
69
|
-
const g = l.random || (l.rng || Te)();
|
|
70
|
-
if (g[6] = g[6] & 15 | 64, g[8] = g[8] & 63 | 128, a) {
|
|
71
|
-
f = f || 0;
|
|
72
|
-
for (let x = 0; x < 16; ++x)
|
|
73
|
-
a[f + x] = g[x];
|
|
74
|
-
return a;
|
|
75
|
-
}
|
|
76
|
-
return Ve(g);
|
|
77
|
-
}
|
|
78
|
-
const be = { class: "upload-container" }, Ce = { class: "el-upload__text" }, Pe = { class: "tip-text" }, De = { class: "file-list-l" }, Ue = ["onMouseenter", "onMouseleave"], ze = { class: "el-file-operate" }, Ie = {
|
|
79
|
-
__name: "index",
|
|
80
|
-
props: {
|
|
81
|
-
request: { type: Function, required: !0, default: null },
|
|
82
|
-
modelValue: { type: [Array, String], default: [] },
|
|
83
|
-
action: { type: String, default: "/api/v1/utils/uploadFiles" },
|
|
84
|
-
data: { type: Object, default: () => ({ uploadFileType: 1 }) },
|
|
85
|
-
name: { type: String, default: "files" },
|
|
86
|
-
multiple: { type: Boolean, default: !0 },
|
|
87
|
-
limit: { type: Number, default: 9 },
|
|
88
|
-
accept: { type: String, default: "*" },
|
|
89
|
-
tipText: { type: String, default: "" },
|
|
90
|
-
fileMaxSize: { type: Number, default: 100 },
|
|
91
|
-
autoUpload: { type: Boolean, default: !0 }
|
|
92
|
-
},
|
|
93
|
-
emits: ["update:modelValue", "delete"],
|
|
94
|
-
setup(l, { expose: a, emit: f }) {
|
|
95
|
-
const { getAssetsFileName: g, getAssetsFilePath: x, downloadFile: O } = fe(), { t: h } = _e(), b = f, s = l, R = {
|
|
96
|
-
image: /(gif|jpg|jpeg|png|pdf|bmp|webp|GIF|JPG|PDF|PNG|JPEG)$/,
|
|
97
|
-
word: /(doc|docx)$/,
|
|
98
|
-
pdf: /(pdf)$/,
|
|
99
|
-
excel: /(xls|xlsx)$/
|
|
100
|
-
};
|
|
101
|
-
let C = D(!1), M = D({}), B = D(!1), y = D(null), P = null, w = oe({
|
|
102
|
-
get() {
|
|
103
|
-
return J(s.modelValue);
|
|
104
|
-
},
|
|
105
|
-
set(e) {
|
|
106
|
-
b("update:modelValue", e);
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
const q = (e) => {
|
|
110
|
-
const t = (w.value || []).map((c) => c.filePath);
|
|
111
|
-
if (e == 0)
|
|
112
|
-
return t;
|
|
113
|
-
let o = t.splice(e), i = t.splice(0, e);
|
|
114
|
-
return o.concat(i);
|
|
115
|
-
}, G = (e) => {
|
|
116
|
-
const t = e.substring(e.lastIndexOf(".") + 1);
|
|
117
|
-
let o = null;
|
|
118
|
-
return Object.keys(R).some((i) => {
|
|
119
|
-
if (R[i].test(t))
|
|
120
|
-
return o = i, !0;
|
|
121
|
-
}), o === null && (o = "file"), o;
|
|
122
|
-
}, W = (e) => e.map((t) => ({ uid: t.uid ?? $e(), name: g(t), filePath: t, fileType: G(t), status: "success" })), J = (e) => {
|
|
123
|
-
const t = Array.isArray(e) ? e.map((o) => o.filePath) : e ? e.split(";") : [];
|
|
124
|
-
return W(t || []);
|
|
125
|
-
}, Z = ({ name: e }) => {
|
|
126
|
-
const t = e.lastIndexOf("."), o = e.slice(t), i = s.accept.trim().split(",");
|
|
127
|
-
let c = !1;
|
|
128
|
-
return i.includes(o) && (c = !0), c = i.some((m) => m == "image/*" ? R.image.test(o) : m.startsWith(".") ? e.endsWith(m) : m === o), c || E({
|
|
129
|
-
title: `${h("act.tip")}`,
|
|
130
|
-
message: `【${e}】${h("act.uploadErrorTip")}`,
|
|
131
|
-
type: "warning",
|
|
132
|
-
duration: 2500
|
|
133
|
-
}), c;
|
|
134
|
-
}, K = (e, t, o) => {
|
|
135
|
-
P && (clearTimeout(P), P = null), P = setTimeout(() => {
|
|
136
|
-
e.call(this, t);
|
|
137
|
-
}, o);
|
|
138
|
-
}, Q = (e) => s.request({ url: s.action, method: "POST", data: e, headers: { "Content-Type": "application/x-www-form-urlencoded" } }), X = async (e) => {
|
|
139
|
-
try {
|
|
140
|
-
const t = e.filter((r) => r.status == "ready" && Z(r)), o = w.value.length + t.length;
|
|
141
|
-
if (t.length === 0) {
|
|
142
|
-
y.value.clearFiles();
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
if (o > s.limit) {
|
|
146
|
-
E({
|
|
147
|
-
title: `${h("act.tip")}`,
|
|
148
|
-
message: `${h("act.uploadLimitTip")}`,
|
|
149
|
-
type: "warning",
|
|
150
|
-
duration: 2500
|
|
151
|
-
}), y.value.clearFiles();
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
if (!s.autoUpload) {
|
|
155
|
-
const r = t.map((V) => ({ ...V, filePath: null, status: "success" }));
|
|
156
|
-
b("update:modelValue", r), y.value.clearFiles();
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
C.value = !0;
|
|
160
|
-
const i = new FormData();
|
|
161
|
-
Object.keys(s.data).forEach((r) => {
|
|
162
|
-
i.append(r, s.data[r]);
|
|
163
|
-
}), t.forEach((r) => {
|
|
164
|
-
i.append(s.name, r.raw);
|
|
165
|
-
});
|
|
166
|
-
let { data: c } = await Q(i);
|
|
167
|
-
const m = s.multiple ? [...w.value.map((r) => r.filePath), ...c.filePaths || []].join(";") : [...c.filePaths || []].join(";");
|
|
168
|
-
y.value.clearFiles(), b("update:modelValue", m), C.value = !1;
|
|
169
|
-
} catch (t) {
|
|
170
|
-
y.value.clearFiles(), C.value = !1, console.error(t);
|
|
171
|
-
}
|
|
172
|
-
}, Y = (e, t) => {
|
|
173
|
-
K(X, t, 500);
|
|
174
|
-
}, N = (e, t) => {
|
|
175
|
-
const o = M.value[`tooltipRef${t}`];
|
|
176
|
-
B.value = o.scrollWidth <= Math.round(o.getBoundingClientRect().width);
|
|
177
|
-
}, ee = ({ filePath: e, name: t, uid: o }, i) => {
|
|
178
|
-
de(() => {
|
|
179
|
-
document.querySelector(`.previewImage_${o}`).children[0].click();
|
|
180
|
-
});
|
|
181
|
-
}, te = ({ filePath: e, name: t }) => {
|
|
182
|
-
O(s.request, e);
|
|
183
|
-
}, le = (e, t) => {
|
|
184
|
-
w.value = w.value.filter((o, i) => i !== t), b("delete", { data: e });
|
|
185
|
-
};
|
|
186
|
-
return a({ clearFiles: () => {
|
|
187
|
-
w.value = [], y.value.clearFiles();
|
|
188
|
-
} }), (e, t) => {
|
|
189
|
-
const o = F("upload-filled"), i = F("el-icon"), c = F("el-upload"), m = F("el-image"), r = F("el-tooltip"), V = F("el-button"), ae = ne("loading");
|
|
190
|
-
return d(), T("div", be, [
|
|
191
|
-
ie((d(), U(c, se({
|
|
192
|
-
ref_key: "uploadRef",
|
|
193
|
-
ref: y,
|
|
194
|
-
action: "#",
|
|
195
|
-
drag: "",
|
|
196
|
-
accept: s.accept,
|
|
197
|
-
multiple: s.multiple,
|
|
198
|
-
"auto-upload": !1,
|
|
199
|
-
"show-file-list": !1,
|
|
200
|
-
"on-change": Y
|
|
201
|
-
}, e.$attrs, {
|
|
202
|
-
"element-loading-text": p(h)("act.uploadLoading")
|
|
203
|
-
}), {
|
|
204
|
-
tip: z(() => [
|
|
205
|
-
s.tipText ? j(e.$slots, "default", { key: 0 }, () => [
|
|
206
|
-
_("p", Pe, I(s.tipText), 1)
|
|
207
|
-
], !0) : A("", !0)
|
|
208
|
-
]),
|
|
209
|
-
default: z(() => [
|
|
210
|
-
$(i, { class: "el-icon--upload" }, {
|
|
211
|
-
default: z(() => [
|
|
212
|
-
$(o)
|
|
213
|
-
]),
|
|
214
|
-
_: 1
|
|
215
|
-
}),
|
|
216
|
-
_("div", Ce, [
|
|
217
|
-
re(I(p(h)("act.uploadText")), 1),
|
|
218
|
-
_("em", null, I(p(h)("act.clickUpload")), 1)
|
|
219
|
-
])
|
|
220
|
-
]),
|
|
221
|
-
_: 3
|
|
222
|
-
}, 16, ["accept", "multiple", "element-loading-text"])), [
|
|
223
|
-
[ae, p(C)]
|
|
224
|
-
]),
|
|
225
|
-
j(e.$slots, "default", {}, () => [
|
|
226
|
-
(d(!0), T(ce, null, ue(p(w), (u, k) => (d(), T("div", {
|
|
227
|
-
class: "file-list",
|
|
228
|
-
key: u.uid
|
|
229
|
-
}, [
|
|
230
|
-
_("div", De, [
|
|
231
|
-
u.fileType === "image" ? (d(), U(m, {
|
|
232
|
-
key: 0,
|
|
233
|
-
class: pe(["file-list-image", { [`previewImage_${u.uid}`]: !0 }]),
|
|
234
|
-
fit: "cover",
|
|
235
|
-
"preview-src-list": q(k),
|
|
236
|
-
"preview-teleported": "",
|
|
237
|
-
src: u.filePath
|
|
238
|
-
}, null, 8, ["class", "preview-src-list", "src"])) : (d(), U(m, {
|
|
239
|
-
key: 1,
|
|
240
|
-
class: "file-list-icon",
|
|
241
|
-
src: p(x)(`images/upload-${u.fileType}.png`)
|
|
242
|
-
}, null, 8, ["src"])),
|
|
243
|
-
$(r, {
|
|
244
|
-
effect: "dark",
|
|
245
|
-
content: u.name,
|
|
246
|
-
placement: "bottom-start",
|
|
247
|
-
disabled: p(B)
|
|
248
|
-
}, {
|
|
249
|
-
default: z(() => [
|
|
250
|
-
_("div", {
|
|
251
|
-
class: "el-file-name",
|
|
252
|
-
ref_for: !0,
|
|
253
|
-
ref: (v) => p(M)[`tooltipRef${k}`] = v,
|
|
254
|
-
onMouseenter: (v) => N(v, k),
|
|
255
|
-
onMouseleave: (v) => N(v, k)
|
|
256
|
-
}, I(u.name), 41, Ue)
|
|
257
|
-
]),
|
|
258
|
-
_: 2
|
|
259
|
-
}, 1032, ["content", "disabled"])
|
|
260
|
-
]),
|
|
261
|
-
_("div", ze, [
|
|
262
|
-
u.fileType === "image" ? (d(), U(V, {
|
|
263
|
-
key: 0,
|
|
264
|
-
type: "primary",
|
|
265
|
-
size: "small",
|
|
266
|
-
icon: p(xe),
|
|
267
|
-
circle: "",
|
|
268
|
-
onClick: (v) => ee(u)
|
|
269
|
-
}, null, 8, ["icon", "onClick"])) : A("", !0),
|
|
270
|
-
$(V, {
|
|
271
|
-
type: "primary",
|
|
272
|
-
size: "small",
|
|
273
|
-
icon: p(ye),
|
|
274
|
-
circle: "",
|
|
275
|
-
onClick: (v) => te(u)
|
|
276
|
-
}, null, 8, ["icon", "onClick"]),
|
|
277
|
-
$(V, {
|
|
278
|
-
type: "danger",
|
|
279
|
-
size: "small",
|
|
280
|
-
icon: p(ve),
|
|
281
|
-
circle: "",
|
|
282
|
-
onClick: (v) => le(u, k)
|
|
283
|
-
}, null, 8, ["icon", "onClick"])
|
|
284
|
-
])
|
|
285
|
-
]))), 128))
|
|
286
|
-
], !0)
|
|
287
|
-
]);
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
}, Ne = /* @__PURE__ */ me(Ie, [["__scopeId", "data-v-f839bee6"]]);
|
|
291
|
-
export {
|
|
292
|
-
Ne as default
|
|
293
|
-
};
|