@dazhicheng/ui 1.5.202 → 1.5.204
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/dist/_virtual/___vite-browser-external.js +6 -0
- package/dist/_virtual/__vite-browser-external.js +4 -0
- package/dist/_virtual/_commonjs-dynamic-modules.js +6 -0
- package/dist/_virtual/_commonjsHelpers.js +24 -0
- package/dist/_virtual/aes.js +4 -0
- package/dist/_virtual/cipher-core.js +4 -0
- package/dist/_virtual/core.js +4 -0
- package/dist/_virtual/enc-base64.js +4 -0
- package/dist/_virtual/enc-utf8.js +4 -0
- package/dist/_virtual/evpkdf.js +4 -0
- package/dist/_virtual/hmac.js +4 -0
- package/dist/_virtual/md5.js +4 -0
- package/dist/_virtual/mode-ecb.js +4 -0
- package/dist/_virtual/pad-pkcs7.js +4 -0
- package/dist/_virtual/sha1.js +4 -0
- package/dist/components/tt-api-component/index.js +17 -4
- package/dist/components/tt-api-component/index.vue2.js +24 -13
- package/dist/components/tt-area/TtArea.vue3.js +24 -13
- package/dist/components/tt-button/index.js +18 -5
- package/dist/components/tt-button/index.vue2.js +27 -16
- package/dist/components/tt-checkbox/index.js +17 -4
- package/dist/components/tt-checkbox/index.vue.js +38 -28
- package/dist/components/tt-drawer/index.js +17 -7
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +48 -36
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +39 -26
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +23 -10
- package/dist/components/tt-drawer/src/props.js +22 -9
- package/dist/components/tt-drawer/src/utils/drawer-api.js +42 -33
- package/dist/components/tt-empty/index.js +28 -18
- package/dist/components/tt-form/index.js +22 -14
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +23 -14
- package/dist/components/tt-form/src/components/FormActions.vue2.js +42 -32
- package/dist/components/tt-form/src/form/FormDescription.vue.js +19 -10
- package/dist/components/tt-form/src/form/FormItem.vue.js +18 -9
- package/dist/components/tt-form/src/form/FormLabel.vue.js +18 -9
- package/dist/components/tt-form/src/form/RenderContent.vue.js +25 -13
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +62 -55
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +36 -28
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +64 -56
- package/dist/components/tt-form/src/form-render/array-register/utils.js +18 -8
- package/dist/components/tt-form/src/form-render/dependencies.js +36 -24
- package/dist/components/tt-form/src/form-render/form.vue2.js +17 -7
- package/dist/components/tt-form/src/form-render/helper.js +29 -16
- package/dist/components/tt-form/src/form-render/rootWrapperClass.js +17 -7
- package/dist/components/tt-form/src/formApi.js +59 -48
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +17 -4
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +67 -57
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +55 -46
- package/dist/components/tt-form/src/group-form/groupFormApi.js +21 -10
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +27 -17
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +32 -23
- package/dist/components/tt-form/src/index.vue2.js +53 -45
- package/dist/components/tt-form/src/useFormContext.js +74 -62
- package/dist/components/tt-form-item-error-tooltip/index.js +18 -5
- package/dist/components/tt-form-item-error-tooltip/index.vue.js +32 -21
- package/dist/components/tt-icon/index.js +20 -7
- package/dist/components/tt-image/index.js +19 -6
- package/dist/components/tt-image/src/components/ImageViewer.js +27 -17
- package/dist/components/tt-loading/index.js +16 -4
- package/dist/components/tt-loading/src/directive.js +34 -22
- package/dist/components/tt-log/index.js +17 -4
- package/dist/components/tt-log/index.vue.js +21 -8
- package/dist/components/tt-modal/index.js +16 -5
- package/dist/components/tt-modal/src/RenderModal.vue.js +163 -151
- package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +38 -28
- package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +24 -11
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +36 -23
- package/dist/components/tt-modal/src/props.js +22 -9
- package/dist/components/tt-modal/src/utils/modal-api.js +39 -29
- package/dist/components/tt-modal-form/index.vue.js +44 -36
- package/dist/components/tt-nav-anchor/index.js +17 -4
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +69 -57
- package/dist/components/tt-panel-select/index.js +17 -4
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +51 -40
- package/dist/components/tt-panel-select/src/index.vue.js +35 -24
- package/dist/components/tt-select/index.js +17 -4
- package/dist/components/tt-select/src/Select.vue.js +79 -68
- package/dist/components/tt-select/src/components/SelectTable.vue.js +41 -30
- package/dist/components/tt-select/src/components/Table.vue.js +86 -76
- package/dist/components/tt-select/src/hooks/useDataSource.js +59 -49
- package/dist/components/tt-select/src/hooks/useSelect.js +46 -38
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +123 -112
- package/dist/components/tt-table/index.js +19 -12
- package/dist/components/tt-table/src/Table.vue.js +82 -71
- package/dist/components/tt-table/src/TableForm.vue.js +77 -65
- package/dist/components/tt-table/src/components/TableAction.vue.js +49 -39
- package/dist/components/tt-table/src/components/TableButtons.js +73 -60
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +14 -3
- package/dist/components/tt-table/src/components/TableToobalTools.vue.js +36 -25
- package/dist/components/tt-table/src/hooks/useColumns.js +72 -65
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +43 -31
- package/dist/components/tt-table/src/hooks/useDataSource.js +50 -42
- package/dist/components/tt-table/src/hooks/usePagination.js +36 -25
- package/dist/components/tt-table/src/props.js +55 -42
- package/dist/components/tt-table/src/utils/table-api.js +33 -22
- package/dist/components/tt-table/src/utils/table-form-api.js +35 -24
- package/dist/components/tt-text/index.js +17 -4
- package/dist/components/tt-upload/index.js +19 -6
- package/dist/components/tt-upload/src/TtUpload.vue.js +77 -66
- package/dist/directives/disabled-tip/index.js +37 -26
- package/dist/hooks/useFormSchemasLink.js +90 -79
- package/dist/hooks/useScreenshotOss.js +49 -35
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js +64 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.js +545 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js +508 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.js +81 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js +10 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.js +71 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.js +84 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js +72 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js +22 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js +11 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.js +50 -0
- package/dist/node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js +1024 -0
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js +32 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js +11 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js +92 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js +34 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js +52 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js +43 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js +47 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js +122 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js +30 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js +24 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js +106 -0
- package/dist/node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js +16 -0
- package/dist/node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.js +21 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +2922 -0
- package/dist/node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js +93 -0
- package/dist/packages/hooks/src/propTypes.js +17 -0
- package/dist/packages/hooks/src/tools.js +6 -0
- package/dist/packages/hooks/src/useDebounce.js +32 -0
- package/dist/packages/hooks/src/useDesign.js +12 -0
- package/dist/packages/hooks/src/useElementScreenshot.js +136 -0
- package/dist/packages/hooks/src/useIsScroll.js +12 -0
- package/dist/packages/hooks/src/usePriorityValue.js +45 -0
- package/dist/packages/utils/src/calc.js +14 -0
- package/dist/packages/utils/src/check.js +10 -0
- package/dist/packages/utils/src/install.js +11 -0
- package/dist/packages/utils/src/is.js +64 -0
- package/dist/packages/utils/src/merge.js +13 -0
- package/dist/packages/utils/src/stateHandler.js +33 -0
- package/dist/packages/utils/src/string.js +6 -0
- package/dist/packages/utils/src/testid-helper.js +14 -0
- package/dist/packages/utils/src/tool.js +181 -0
- package/dist/plugins/default/renderCellContent.js +39 -28
- package/dist/plugins/vxeTable/switchStatus.js +37 -26
- package/package.json +3 -3
|
@@ -4,16 +4,27 @@ import A from "../../../assets/svg/fileSvg.svg.js";
|
|
|
4
4
|
import { TtButton as $ } from "../../tt-button/index.js";
|
|
5
5
|
import { TtIcon as S } from "../../tt-icon/index.js";
|
|
6
6
|
import "../../tt-modal/index.js";
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
7
|
+
import "../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
8
|
+
import { useDesign as ge } from "../../../packages/hooks/src/useDesign.js";
|
|
9
|
+
import "axios";
|
|
9
10
|
import { ElMessage as f, ElImageViewer as _e, ElUpload as he } from "element-plus";
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
11
|
+
import { isString as ye, isNumber as Ue } from "../../../packages/utils/src/is.js";
|
|
12
|
+
import "xe-utils";
|
|
13
|
+
import "dayjs";
|
|
14
|
+
import "dayjs/plugin/utc";
|
|
15
|
+
import "dayjs/plugin/timezone";
|
|
16
|
+
import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
17
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
18
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
19
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
20
|
+
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
21
|
+
import { omit as be, isFunction as R } from "lodash-es";
|
|
22
|
+
import { TtText as V } from "../../tt-text/index.js";
|
|
12
23
|
/* empty css */
|
|
13
24
|
import { ttUploadProps as $e } from "./typing.js";
|
|
14
25
|
import { GlobalConfig as F } from "../../../hooks/useSetup.js";
|
|
15
26
|
import { useModalRender as Se } from "../../tt-modal/src/hooks/useModalRender.js";
|
|
16
|
-
const
|
|
27
|
+
const Je = /* @__PURE__ */ de({
|
|
17
28
|
name: "TtUpload",
|
|
18
29
|
__name: "TtUpload",
|
|
19
30
|
props: /* @__PURE__ */ z($e, {
|
|
@@ -39,8 +50,8 @@ const De = /* @__PURE__ */ de({
|
|
|
39
50
|
const l = e.includes(".") ? ((u = e.split(".").pop()) == null ? void 0 : u.toLowerCase()) ?? "" : "";
|
|
40
51
|
return t.split(",").map((p) => p.trim()).filter(Boolean).some((p) => p.startsWith(".") ? l === p.slice(1).toLowerCase() : p.endsWith("/*") ? o.startsWith(p.slice(0, -1)) : o === p);
|
|
41
52
|
}
|
|
42
|
-
const
|
|
43
|
-
prefixCls:
|
|
53
|
+
const i = C, c = P, s = ce(C, "modelValue"), d = fe(), {
|
|
54
|
+
prefixCls: n
|
|
44
55
|
} = ge("upload"), x = b(), y = b(!1), k = b([]), [j, v] = Se({
|
|
45
56
|
onOk() {
|
|
46
57
|
c("ok", s.value);
|
|
@@ -60,13 +71,13 @@ const De = /* @__PURE__ */ de({
|
|
|
60
71
|
closeModal: v.closeModal,
|
|
61
72
|
getFileList: W
|
|
62
73
|
});
|
|
63
|
-
const U = m(() => s.value.length >
|
|
74
|
+
const U = m(() => s.value.length > i.gridThreshold), g = m(() => i.limit ?? 0), _ = m(() => i.uploadOssApi ?? F.uploadOssApi), G = m(() => i.uploadOssViewApi ?? F.uploadOssViewApi);
|
|
64
75
|
async function q(e, o) {
|
|
65
|
-
const l = `${
|
|
66
|
-
|
|
76
|
+
const l = `${i.ossDir || o.dir || "notice"}/${Date.now()}_${e.name}`, r = new FormData();
|
|
77
|
+
r.append("key", l), r.append("policy", o.policy), r.append("x-oss-signature-version", o.version), r.append("x-oss-signature", o.signature), r.append("x-oss-credential", o.x_oss_credential), r.append("x-oss-date", o.x_oss_date), r.append("x-oss-security-token", o.security_token), o.callback && r.append("callback", o.callback), r.append("success_action_status", "200"), r.append("file", e);
|
|
67
78
|
const u = await fetch(o.host, {
|
|
68
79
|
method: "POST",
|
|
69
|
-
body:
|
|
80
|
+
body: r
|
|
70
81
|
});
|
|
71
82
|
if (!u.ok && u.status !== 203)
|
|
72
83
|
throw new Error(`OSS 上传失败: ${u.status}`);
|
|
@@ -85,7 +96,7 @@ const De = /* @__PURE__ */ de({
|
|
|
85
96
|
async function X(e) {
|
|
86
97
|
var o;
|
|
87
98
|
try {
|
|
88
|
-
const t = e.file, l = URL.createObjectURL(t),
|
|
99
|
+
const t = e.file, l = URL.createObjectURL(t), r = {
|
|
89
100
|
fileName: t.name,
|
|
90
101
|
fileSize: t.size ?? 0,
|
|
91
102
|
fileSuffix: ((o = t.name.split(".").pop()) == null ? void 0 : o.toLowerCase()) || "",
|
|
@@ -93,7 +104,7 @@ const De = /* @__PURE__ */ de({
|
|
|
93
104
|
uid: t.uid,
|
|
94
105
|
url: l
|
|
95
106
|
};
|
|
96
|
-
return s.value = [...s.value,
|
|
107
|
+
return s.value = [...s.value, r], c("afterUpload", r), e.onSuccess(r), r;
|
|
97
108
|
} catch (t) {
|
|
98
109
|
f.warning((t == null ? void 0 : t.message) ?? "上传失败"), T(t, e);
|
|
99
110
|
}
|
|
@@ -102,10 +113,10 @@ const De = /* @__PURE__ */ de({
|
|
|
102
113
|
var t;
|
|
103
114
|
const o = _.value;
|
|
104
115
|
try {
|
|
105
|
-
const l = await o(e.file),
|
|
116
|
+
const l = await o(e.file), r = await q(e.file, l), u = {
|
|
106
117
|
fileName: e.file.name,
|
|
107
118
|
ossUploadBaseDir: l.dir,
|
|
108
|
-
ossKey:
|
|
119
|
+
ossKey: r,
|
|
109
120
|
fileSize: e.file.size ?? 0,
|
|
110
121
|
fileSuffix: ((t = e.file.name.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "",
|
|
111
122
|
file: e.file,
|
|
@@ -118,10 +129,10 @@ const De = /* @__PURE__ */ de({
|
|
|
118
129
|
}
|
|
119
130
|
function H(e, o, t) {
|
|
120
131
|
var l;
|
|
121
|
-
o.raw && (L(o.raw), c("error", e, o.raw)), (l =
|
|
132
|
+
o.raw && (L(o.raw), c("error", e, o.raw)), (l = i.onError) == null || l.call(i, e, o, t);
|
|
122
133
|
}
|
|
123
134
|
const J = m(() => ({
|
|
124
|
-
...
|
|
135
|
+
...be(i, D),
|
|
125
136
|
showFileList: !1,
|
|
126
137
|
beforeUpload: Q,
|
|
127
138
|
onExceed: Z,
|
|
@@ -131,10 +142,10 @@ const De = /* @__PURE__ */ de({
|
|
|
131
142
|
httpRequest: _.value ? Y : X
|
|
132
143
|
}));
|
|
133
144
|
function Q(e) {
|
|
134
|
-
if (!K(e.name, e.type,
|
|
135
|
-
return f.warning(`文件格式不支持,仅支持:${
|
|
136
|
-
const o = s.value.map((t) =>
|
|
137
|
-
return
|
|
145
|
+
if (!K(e.name, e.type, i.accept))
|
|
146
|
+
return f.warning(`文件格式不支持,仅支持:${i.accept}`), !1;
|
|
147
|
+
const o = s.value.map((t) => ye(t.fileSize) || Ue(t.fileSize) ? +t.fileSize : 0).reduce((t, l) => t + l, 0);
|
|
148
|
+
return i.maxSize && (e.size + o) / 1024 / 1024 > i.maxSize ? (f.warning(`文件大小不能超过 ${i.maxSize}MB`), !1) : g.value > 0 && s.value.length >= g.value ? (f.warning("已超过上传数量"), !1) : R(i.beforeUpload) ? i.beforeUpload(e) : !0;
|
|
138
149
|
}
|
|
139
150
|
function Z() {
|
|
140
151
|
f.warning("已超过上传数量");
|
|
@@ -147,7 +158,7 @@ const De = /* @__PURE__ */ de({
|
|
|
147
158
|
const o = h(e);
|
|
148
159
|
if (!o)
|
|
149
160
|
throw new Error("No OssKey");
|
|
150
|
-
const t = s.value.filter((
|
|
161
|
+
const t = s.value.filter((r) => h(r) !== o);
|
|
151
162
|
t.length !== s.value.length && (s.value = t), e.file && ((l = x.value) == null || l.handleRemove(e.file)), c("delete", e);
|
|
152
163
|
}
|
|
153
164
|
async function E(e) {
|
|
@@ -155,18 +166,18 @@ const De = /* @__PURE__ */ de({
|
|
|
155
166
|
const o = G.value;
|
|
156
167
|
if (!(!o || !e.ossKey))
|
|
157
168
|
try {
|
|
158
|
-
const
|
|
169
|
+
const r = (t = (await o({
|
|
159
170
|
filePath: e.ossKey
|
|
160
171
|
})).find((u) => u.fileName === e.ossKey)) == null ? void 0 : t.fileUrl;
|
|
161
|
-
return e.url =
|
|
172
|
+
return e.url = r, r;
|
|
162
173
|
} catch (l) {
|
|
163
174
|
f.warning((l == null ? void 0 : l.message) ?? "获取文件地址失败");
|
|
164
175
|
return;
|
|
165
176
|
}
|
|
166
177
|
}
|
|
167
178
|
async function oe(e, o) {
|
|
168
|
-
const l = await (await fetch(e)).blob(),
|
|
169
|
-
u.href =
|
|
179
|
+
const l = await (await fetch(e)).blob(), r = URL.createObjectURL(l), u = document.createElement("a");
|
|
180
|
+
u.href = r, u.download = o, u.click(), URL.revokeObjectURL(r);
|
|
170
181
|
}
|
|
171
182
|
async function te(e) {
|
|
172
183
|
c("preview", e);
|
|
@@ -175,7 +186,7 @@ const De = /* @__PURE__ */ de({
|
|
|
175
186
|
}
|
|
176
187
|
async function le(e) {
|
|
177
188
|
let o = !1;
|
|
178
|
-
if (o =
|
|
189
|
+
if (o = R(i.beforeDownload) ? !!await i.beforeDownload(e) : i.beforeDownload, !o) {
|
|
179
190
|
c("download", e);
|
|
180
191
|
return;
|
|
181
192
|
}
|
|
@@ -183,124 +194,124 @@ const De = /* @__PURE__ */ de({
|
|
|
183
194
|
_.value ? t = await E(e) : t = URL.createObjectURL(e.file), t && oe(t, e.fileName);
|
|
184
195
|
}
|
|
185
196
|
const ae = () => a("div", {
|
|
186
|
-
class: `${
|
|
197
|
+
class: `${n}-area`
|
|
187
198
|
}, [a(he, we({
|
|
188
199
|
ref: x
|
|
189
200
|
}, J.value), {
|
|
190
201
|
default: () => {
|
|
191
202
|
var e, o;
|
|
192
203
|
return [((e = d.uploadContent) == null ? void 0 : e.call(d)) || a("div", {
|
|
193
|
-
class: `${
|
|
204
|
+
class: `${n}-dragger`
|
|
194
205
|
}, [a(S, {
|
|
195
206
|
icon: ve,
|
|
196
207
|
size: 32,
|
|
197
208
|
isCustomSvg: !0
|
|
198
209
|
}, null), a("div", {
|
|
199
|
-
class: `${
|
|
210
|
+
class: `${n}-dragger__text`
|
|
200
211
|
}, [w("上传附件")]), a("div", {
|
|
201
|
-
class: `${
|
|
202
|
-
}, [((o = d.uploadTip) == null ? void 0 : o.call(d)) ||
|
|
203
|
-
class: `${
|
|
212
|
+
class: `${n}-dragger__tip`
|
|
213
|
+
}, [((o = d.uploadTip) == null ? void 0 : o.call(d)) || i.uploadTip]), i.showTemplateDownload && a("div", {
|
|
214
|
+
class: `${n}-dragger__template`,
|
|
204
215
|
onClick: (t) => {
|
|
205
216
|
t.stopPropagation(), c("templateDownload");
|
|
206
217
|
}
|
|
207
|
-
}, [
|
|
218
|
+
}, [i.templateText])])];
|
|
208
219
|
}
|
|
209
220
|
})]), O = (e, o) => d.fileActions ? d.fileActions({
|
|
210
221
|
file: e,
|
|
211
222
|
index: o
|
|
212
223
|
}) : a("div", {
|
|
213
|
-
class: `${
|
|
214
|
-
}, [
|
|
224
|
+
class: `${n}-file__actions`
|
|
225
|
+
}, [i.showPreview && a($, {
|
|
215
226
|
type: "primary",
|
|
216
227
|
link: !0,
|
|
217
228
|
onClick: () => te(e)
|
|
218
229
|
}, {
|
|
219
230
|
default: () => [w("查看")]
|
|
220
|
-
}),
|
|
231
|
+
}), i.showDownload && a($, {
|
|
221
232
|
type: "primary",
|
|
222
233
|
link: !0,
|
|
223
234
|
onClick: () => le(e)
|
|
224
235
|
}, {
|
|
225
236
|
default: () => [w("下载")]
|
|
226
|
-
}),
|
|
237
|
+
}), i.showDelete && a($, {
|
|
227
238
|
type: "danger",
|
|
228
239
|
link: !0,
|
|
229
240
|
onClick: () => ee(e)
|
|
230
241
|
}, {
|
|
231
242
|
default: () => [w("删除")]
|
|
232
|
-
})]),
|
|
233
|
-
class: `${
|
|
243
|
+
})]), ie = (e, o) => a("div", {
|
|
244
|
+
class: `${n}-file__card`,
|
|
234
245
|
key: h(e)
|
|
235
246
|
}, [a("div", {
|
|
236
|
-
class: `${
|
|
247
|
+
class: `${n}-file__card-header`
|
|
237
248
|
}, [a("div", {
|
|
238
|
-
class: `${
|
|
249
|
+
class: `${n}-file__card-icon`
|
|
239
250
|
}, [a(S, {
|
|
240
251
|
icon: A,
|
|
241
252
|
size: 28,
|
|
242
253
|
isCustomSvg: !0
|
|
243
254
|
}, null)]), a("div", {
|
|
244
|
-
class: `${
|
|
245
|
-
}, [a(
|
|
246
|
-
class: `${
|
|
255
|
+
class: `${n}-file__card-info`
|
|
256
|
+
}, [a(V, {
|
|
257
|
+
class: `${n}-file__card-name`
|
|
247
258
|
}, {
|
|
248
259
|
default: () => [e.fileName]
|
|
249
260
|
})])]), a("div", {
|
|
250
|
-
class: `${
|
|
251
|
-
}, [O(e, o)])]),
|
|
252
|
-
class: `${
|
|
261
|
+
class: `${n}-file__card-footer`
|
|
262
|
+
}, [O(e, o)])]), re = (e, o) => a("div", {
|
|
263
|
+
class: `${n}-file__row`,
|
|
253
264
|
key: h(e)
|
|
254
265
|
}, [a("div", {
|
|
255
|
-
class: `${
|
|
266
|
+
class: `${n}-file__row-icon`
|
|
256
267
|
}, [a(S, {
|
|
257
268
|
icon: A,
|
|
258
269
|
size: 28,
|
|
259
270
|
isCustomSvg: !0
|
|
260
271
|
}, null)]), a("div", {
|
|
261
|
-
class: `${
|
|
262
|
-
}, [a(
|
|
263
|
-
class: `${
|
|
272
|
+
class: `${n}-file__row-info`
|
|
273
|
+
}, [a(V, {
|
|
274
|
+
class: `${n}-file__row-name`
|
|
264
275
|
}, {
|
|
265
276
|
default: () => [e.fileName]
|
|
266
277
|
})]), a("div", {
|
|
267
|
-
class: `${
|
|
268
|
-
}, [O(e, o)])]),
|
|
278
|
+
class: `${n}-file__row-actions`
|
|
279
|
+
}, [O(e, o)])]), ne = (e, o) => d.fileItem ? d.fileItem({
|
|
269
280
|
file: e,
|
|
270
281
|
index: o
|
|
271
|
-
}) : U.value ?
|
|
272
|
-
if (!
|
|
273
|
-
const e = s.value.map((l,
|
|
274
|
-
gridTemplateColumns: `repeat(${
|
|
282
|
+
}) : U.value ? ie(e, o) : re(e, o), se = () => {
|
|
283
|
+
if (!i.showFileList || s.value.length === 0) return null;
|
|
284
|
+
const e = s.value.map((l, r) => ne(l, r)), o = U.value ? `${n}-filelist__grid` : `${n}-filelist__list`, t = U.value ? {
|
|
285
|
+
gridTemplateColumns: `repeat(${i.gridColumns}, 1fr)`
|
|
275
286
|
} : void 0;
|
|
276
287
|
return a("div", {
|
|
277
|
-
class: `${
|
|
288
|
+
class: `${n}-filelist`
|
|
278
289
|
}, [a("div", {
|
|
279
290
|
class: o,
|
|
280
291
|
style: t
|
|
281
|
-
}, [e]),
|
|
282
|
-
class: `${
|
|
292
|
+
}, [e]), i.showCount && g.value > 0 && a("div", {
|
|
293
|
+
class: `${n}-filelist__count`
|
|
283
294
|
}, [a("span", {
|
|
284
|
-
class: `${
|
|
295
|
+
class: `${n}-filelist__count-current-number`
|
|
285
296
|
}, [s.value.length]), a("span", null, [w(" / ")]), a("span", {
|
|
286
|
-
class: `${
|
|
297
|
+
class: `${n}-filelist__count-total-number`
|
|
287
298
|
}, [g.value])])]);
|
|
288
299
|
}, M = () => {
|
|
289
300
|
var e;
|
|
290
301
|
return a("div", {
|
|
291
|
-
class:
|
|
302
|
+
class: n
|
|
292
303
|
}, [ae(), se(), (e = d.footer) == null ? void 0 : e.call(d), y.value && a(_e, {
|
|
293
304
|
urlList: k.value,
|
|
294
305
|
hideOnClickModal: !0,
|
|
295
306
|
teleported: !0,
|
|
296
307
|
onClose: () => y.value = !1
|
|
297
308
|
}, null)]);
|
|
298
|
-
}, ue = () =>
|
|
309
|
+
}, ue = () => i.modal ? a(j, null, {
|
|
299
310
|
default: () => M()
|
|
300
311
|
}) : M();
|
|
301
312
|
return (e, o) => (me(), pe(ue));
|
|
302
313
|
}
|
|
303
314
|
});
|
|
304
315
|
export {
|
|
305
|
-
|
|
316
|
+
Je as default
|
|
306
317
|
};
|
|
@@ -1,22 +1,33 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "axios";
|
|
2
2
|
import { ElTooltip as b } from "element-plus";
|
|
3
|
-
import {
|
|
3
|
+
import { isArray as l, isObject as m } from "../../packages/utils/src/is.js";
|
|
4
|
+
import { shallowRef as v, toValue as s, h as p, createVNode as g, render as h } from "vue";
|
|
5
|
+
import "xe-utils";
|
|
6
|
+
import "dayjs";
|
|
7
|
+
import "dayjs/plugin/utc";
|
|
8
|
+
import "dayjs/plugin/timezone";
|
|
9
|
+
import "../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
10
|
+
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
11
|
+
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
12
|
+
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
13
|
+
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
14
|
+
import "lodash-es";
|
|
4
15
|
let n;
|
|
5
|
-
const
|
|
16
|
+
const d = v();
|
|
6
17
|
function V(e) {
|
|
7
|
-
if (
|
|
8
|
-
return e.filter((t) =>
|
|
9
|
-
if (
|
|
18
|
+
if (l(e) && e.length > 0)
|
|
19
|
+
return e.filter((t) => s(t.condition) ?? !0).map((t) => t.message);
|
|
20
|
+
if (m(e)) {
|
|
10
21
|
const t = e;
|
|
11
|
-
return !!
|
|
22
|
+
return !!s(t.condition) ? t.message : null;
|
|
12
23
|
}
|
|
13
24
|
return typeof e == "string" ? e : null;
|
|
14
25
|
}
|
|
15
26
|
function x(e) {
|
|
16
|
-
return
|
|
27
|
+
return l(e) && e.length > 0 ? e[0].placement || "bottom" : m(e) && e.placement || "bottom";
|
|
17
28
|
}
|
|
18
29
|
function y(e, t, o = "bottom") {
|
|
19
|
-
if (
|
|
30
|
+
if (d.value = Array.isArray(t) ? t.map((r) => p("div", {}, r)) : t, n)
|
|
20
31
|
n.props.trigger = "hover", n.props.virtualRef = e, n.props.placement = o, n.exposed.updatePopper(), n.exposed.onOpen();
|
|
21
32
|
else {
|
|
22
33
|
const r = g(
|
|
@@ -33,7 +44,7 @@ function y(e, t, o = "bottom") {
|
|
|
33
44
|
popperClass: "!z-[9999]"
|
|
34
45
|
},
|
|
35
46
|
{
|
|
36
|
-
content: () =>
|
|
47
|
+
content: () => p(
|
|
37
48
|
"div",
|
|
38
49
|
{
|
|
39
50
|
style: {
|
|
@@ -41,38 +52,38 @@ function y(e, t, o = "bottom") {
|
|
|
41
52
|
},
|
|
42
53
|
class: "tt-disabled-popper-content"
|
|
43
54
|
},
|
|
44
|
-
|
|
55
|
+
d.value
|
|
45
56
|
)
|
|
46
57
|
}
|
|
47
|
-
),
|
|
48
|
-
h(r,
|
|
58
|
+
), i = document.createElement("div");
|
|
59
|
+
h(r, i), n = r.component, document.body.appendChild(i), n == null || n.exposed.onOpen();
|
|
49
60
|
}
|
|
50
61
|
}
|
|
51
|
-
async function
|
|
52
|
-
var
|
|
62
|
+
async function c(e) {
|
|
63
|
+
var i, u;
|
|
53
64
|
n && (n.props.trigger = "manual");
|
|
54
65
|
const t = e.currentTarget;
|
|
55
66
|
if (!t) return;
|
|
56
|
-
const o = (
|
|
67
|
+
const o = (i = t.boundingValue) == null ? void 0 : i.messages, r = ((u = t.boundingValue) == null ? void 0 : u.placement) || "bottom";
|
|
57
68
|
o != null && o.length && t && y(t, o, r);
|
|
58
69
|
}
|
|
59
70
|
function f() {
|
|
60
71
|
n && n.exposed.onClose();
|
|
61
72
|
}
|
|
62
|
-
async function
|
|
63
|
-
var
|
|
64
|
-
const o = t.value, r = V(o),
|
|
65
|
-
e.boundingValue = e.boundingValue || { listened: !1, messages: r, placement:
|
|
73
|
+
async function a(e, t) {
|
|
74
|
+
var u;
|
|
75
|
+
const o = t.value, r = V(o), i = x(o);
|
|
76
|
+
e.boundingValue = e.boundingValue || { listened: !1, messages: r, placement: i }, e.boundingValue.messages = r, e.boundingValue.placement = i, !((u = e.boundingValue) != null && u.listened) && (r != null && r.length) && (e.addEventListener("mouseenter", c), e.addEventListener("mouseleave", f), e.boundingValue.listened = !0);
|
|
66
77
|
}
|
|
67
|
-
const
|
|
68
|
-
created:
|
|
69
|
-
beforeMount:
|
|
70
|
-
updated:
|
|
78
|
+
const N = {
|
|
79
|
+
created: a,
|
|
80
|
+
beforeMount: a,
|
|
81
|
+
updated: a,
|
|
71
82
|
unmounted(e) {
|
|
72
83
|
var t, o;
|
|
73
|
-
(t = e.boundingValue) != null && t.listened && (e.removeEventListener("mouseenter",
|
|
84
|
+
(t = e.boundingValue) != null && t.listened && (e.removeEventListener("mouseenter", c), e.removeEventListener("mouseleave", f), (o = n == null ? void 0 : n.exposed) == null || o.onClose());
|
|
74
85
|
}
|
|
75
86
|
};
|
|
76
87
|
export {
|
|
77
|
-
|
|
88
|
+
N as default
|
|
78
89
|
};
|