@dt-frames/ui 2.0.15 → 2.0.17
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/assets/imgs/tree/forder-open.svg +1 -0
- package/es/assets/imgs/tree/forder.svg +1 -0
- package/es/assets/locales/zh.ts +1 -1
- package/es/components/curd/index.js +28 -8
- package/es/components/curd/src/components/Curd.d.ts +10 -0
- package/es/components/curd/src/hooks/useCurd.d.ts +2 -4
- package/es/components/curd/src/props.d.ts +5 -1
- package/es/components/drawer/index.js +25 -24
- package/es/components/form/index.js +75 -40
- package/es/components/form/index.less +16 -0
- package/es/components/form/src/props.d.ts +3 -3
- package/es/components/modal/index.js +8 -143
- package/es/components/modal/index.less +23 -0
- package/es/components/modal/src/index.d.ts +2 -84
- package/es/components/table/index.js +61 -134
- package/es/components/table/index.less +25 -0
- package/es/components/table/src/components/editTable/EditTableCell.d.ts +1 -0
- package/es/components/table/src/index.d.ts +0 -10
- package/es/components/table/src/props.d.ts +0 -4
- package/es/components/table/src/types/table.type.d.ts +8 -0
- package/es/components/tree/index.js +203 -89
- package/es/components/tree/index.less +88 -13
- package/es/components/tree/src/basicProps.d.ts +55 -11
- package/es/components/tree/src/components/ContextMenu.d.ts +6 -0
- package/es/components/tree/src/components/TreeHeader.d.ts +2 -2
- package/es/components/tree/src/hooks/useTree.d.ts +3 -2
- package/es/components/tree/src/index.d.ts +131 -40
- package/es/components/tree/src/type/menu.d.ts +3 -0
- package/es/components/tree/src/type/tree.d.ts +0 -1
- package/es/components/upload/index.js +112 -65
- package/es/components/upload/index.less +17 -1
- package/es/components/upload/src/components/WordView.d.ts +1 -0
- package/es/components/upload/src/index.d.ts +2 -1
- package/es/components/upload/src/utils/upload.d.ts +1 -1
- package/es/theme/index.js +314 -309
- package/es/theme/index.less +1 -0
- package/es/theme/src/components/header/components/size.d.ts +5 -5
- package/es/theme/src/components/header/index.d.ts +5 -5
- package/es/theme/src/components/header/multiple-header.d.ts +5 -5
- package/es/theme/src/index.d.ts +10 -10
- package/manualContentPath.js +10 -0
- package/package.json +1 -1
- package/tsconfig.json +1 -1
- package/es/packages/ui/src/assets/locales/en.d.ts +0 -103
- package/es/packages/ui/src/assets/locales/index.d.ts +0 -2
- package/es/packages/ui/src/assets/locales/zh.d.ts +0 -104
- package/es/packages/ui/src/components/form/index.d.ts +0 -7
- package/es/packages/ui/src/components/form/src/components/FormButtons.d.ts +0 -105
- package/es/packages/ui/src/components/form/src/components/FormItem.d.ts +0 -159
- package/es/packages/ui/src/components/form/src/components/componentMap.d.ts +0 -4
- package/es/packages/ui/src/components/form/src/components/formIcon.d.ts +0 -1223
- package/es/packages/ui/src/components/form/src/components/formInputUseDialog.d.ts +0 -911
- package/es/packages/ui/src/components/form/src/components/index.d.ts +0 -4
- package/es/packages/ui/src/components/form/src/components/radioButton.d.ts +0 -34
- package/es/packages/ui/src/components/form/src/enums/index.d.ts +0 -7
- package/es/packages/ui/src/components/form/src/hooks/helper.d.ts +0 -14
- package/es/packages/ui/src/components/form/src/hooks/useForm.d.ts +0 -6
- package/es/packages/ui/src/components/form/src/hooks/useFormActions.d.ts +0 -12
- package/es/packages/ui/src/components/form/src/hooks/useFormEvent.d.ts +0 -25
- package/es/packages/ui/src/components/form/src/hooks/useFormValue.d.ts +0 -3
- package/es/packages/ui/src/components/form/src/hooks/useFormValues.d.ts +0 -11
- package/es/packages/ui/src/components/form/src/hooks/useLabelWidth.d.ts +0 -6
- package/es/packages/ui/src/components/form/src/props.d.ts +0 -127
- package/es/packages/ui/src/components/form/src/types/actions.type.d.ts +0 -15
- package/es/packages/ui/src/components/form/src/types/form.type.d.ts +0 -79
- package/es/packages/ui/src/components/form/src/types/items.type.d.ts +0 -409
- package/es/packages/ui/src/components/iframe/index.d.ts +0 -2
- package/es/packages/ui/src/components/modal/index.d.ts +0 -4
- package/es/packages/ui/src/components/modal/src/hooks/useModal.d.ts +0 -5
- package/es/packages/ui/src/components/modal/src/props.d.ts +0 -101
- package/es/packages/ui/src/components/modal/src/types/modal.type.d.ts +0 -17
- package/es/packages/ui/src/components/upload/index.d.ts +0 -4
- package/es/packages/ui/src/components/upload/src/basicProps.d.ts +0 -87
- package/es/packages/ui/src/components/upload/src/components/PdfView.d.ts +0 -9
- package/es/packages/ui/src/components/upload/src/components/WordView.d.ts +0 -6
- package/es/packages/ui/src/components/upload/src/hooks/useFile.d.ts +0 -16
- package/es/packages/ui/src/components/upload/src/index.d.ts +0 -242
- package/es/packages/ui/src/components/upload/src/type/file.d.ts +0 -10
- package/es/packages/ui/src/components/upload/src/utils/upload.d.ts +0 -2
- package/es/packages/ui/src/global.d.ts +0 -7
- package/es/packages/ui/src/theme/index.d.ts +0 -12
- package/es/packages/ui/src/theme/src/components/header/helper/menu-tree.d.ts +0 -4
- package/es/packages/ui/src/theme/src/enums/index.d.ts +0 -1
- package/es/packages/ui/src/theme/src/enums/theme.enum.d.ts +0 -34
- package/es/packages/ui/src/theme/src/hooks/index.d.ts +0 -6
- package/es/packages/ui/src/theme/src/hooks/useDragLine.d.ts +0 -2
- package/es/packages/ui/src/theme/src/hooks/useHeader.d.ts +0 -25
- package/es/packages/ui/src/theme/src/hooks/useMenu.d.ts +0 -29
- package/es/packages/ui/src/theme/src/hooks/useMultifyTab.d.ts +0 -8
- package/es/packages/ui/src/theme/src/hooks/useOpenKeys.d.ts +0 -7
- package/es/packages/ui/src/theme/src/hooks/useTheme.d.ts +0 -9
- package/es/packages/ui/src/theme/src/setting/theme.setting.d.ts +0 -2
- package/es/packages/ui/src/theme/src/stores/index.d.ts +0 -3
- package/es/packages/ui/src/theme/src/stores/routeReuse.store.d.ts +0 -25
- package/es/packages/ui/src/theme/src/stores/theme.store.d.ts +0 -19
- package/es/packages/ui/src/theme/src/types/index.d.ts +0 -3
- package/es/packages/ui/src/theme/src/types/menu.type.d.ts +0 -15
- package/es/packages/ui/src/theme/src/types/theme.type.d.ts +0 -62
- package/es/packages/ui/src/utils/withInstall.d.ts +0 -4
|
@@ -2,12 +2,11 @@ import { Button, Upload, Image } from "ant-design-vue/es";
|
|
|
2
2
|
import "ant-design-vue/es/image/style";
|
|
3
3
|
import "ant-design-vue/es/upload/style";
|
|
4
4
|
import "ant-design-vue/es/button/style";
|
|
5
|
-
import { computed, unref, ref, watch, defineComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, toRefs, createElementBlock, mergeProps, isRef, createSlots, toDisplayString,
|
|
5
|
+
import { computed, unref, ref, watch, defineComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, toRefs, createElementBlock, mergeProps, isRef, createSlots, normalizeClass, toDisplayString, createCommentVNode, normalizeStyle, Fragment, renderList, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
6
6
|
import { takeRight, omit } from "lodash-es";
|
|
7
7
|
import { useAppStore, useMessage, isString, dispatchResize, isFunction, http, HttpContentTypeEnum } from "@dt-frames/core";
|
|
8
8
|
import { useModal, DtModal, useModalOut } from "../modal";
|
|
9
9
|
import { DtIframe } from "../iframe";
|
|
10
|
-
import { renderAsync } from "docx-preview";
|
|
11
10
|
const basicProps = {
|
|
12
11
|
uploadUrl: {
|
|
13
12
|
type: Object
|
|
@@ -61,7 +60,7 @@ const basicProps = {
|
|
|
61
60
|
},
|
|
62
61
|
maxSize: {
|
|
63
62
|
type: Number,
|
|
64
|
-
default:
|
|
63
|
+
default: Infinity
|
|
65
64
|
},
|
|
66
65
|
helpText: {
|
|
67
66
|
type: String,
|
|
@@ -124,7 +123,7 @@ function useFile({
|
|
|
124
123
|
helpTexts.push(`\u652F\u6301${accept.join("\u3001").replaceAll(".", "")}\u683C\u5F0F`);
|
|
125
124
|
}
|
|
126
125
|
const maxSize = unref(maxSizeRef);
|
|
127
|
-
if (maxSize) {
|
|
126
|
+
if (maxSize && maxSize !== Infinity) {
|
|
128
127
|
helpTexts.push(`\u4E0D\u8D85\u8FC7${maxSize}M`);
|
|
129
128
|
}
|
|
130
129
|
const maxNumber = unref(maxCountRef);
|
|
@@ -177,34 +176,34 @@ const getFileThumb = (fileType) => {
|
|
|
177
176
|
switch (fileType) {
|
|
178
177
|
case "pptx":
|
|
179
178
|
case "ppt":
|
|
180
|
-
return "
|
|
179
|
+
return "imgs/fu_ppt.gif";
|
|
181
180
|
case "docx":
|
|
182
181
|
case "doc":
|
|
183
|
-
return "
|
|
182
|
+
return "imgs/fu_doc.gif";
|
|
184
183
|
case "pdf":
|
|
185
|
-
return "
|
|
184
|
+
return "imgs/fu_pdf.gif";
|
|
186
185
|
case "jpg":
|
|
187
186
|
case "jpeg":
|
|
188
187
|
case "png":
|
|
189
188
|
case "bmp":
|
|
190
189
|
case "ofd":
|
|
191
190
|
case "gif":
|
|
192
|
-
return "
|
|
191
|
+
return "imgs/fu_bmp.gif";
|
|
193
192
|
case "xls":
|
|
194
193
|
case "xlsx":
|
|
195
|
-
return "
|
|
194
|
+
return "imgs/fu_exl.gif";
|
|
196
195
|
case "csv":
|
|
197
|
-
return "
|
|
196
|
+
return "imgs/fu_txt.gif";
|
|
198
197
|
case "txt":
|
|
199
|
-
return "
|
|
198
|
+
return "imgs/fu_txt.gif";
|
|
200
199
|
case "rar":
|
|
201
200
|
case "zip":
|
|
202
201
|
case "7z":
|
|
203
202
|
case "tar":
|
|
204
203
|
case "gz":
|
|
205
|
-
return "
|
|
204
|
+
return "imgs/fu_rar.gif";
|
|
206
205
|
default:
|
|
207
|
-
return "
|
|
206
|
+
return "imgs/fu_blank.gif";
|
|
208
207
|
}
|
|
209
208
|
};
|
|
210
209
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
@@ -215,7 +214,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
215
214
|
const [register] = useModal({
|
|
216
215
|
width: "70%",
|
|
217
216
|
title: (data) => `\u9644\u4EF6\u9884\u89C8 - ${data.fileName}`,
|
|
218
|
-
|
|
217
|
+
bodyStyle: {
|
|
218
|
+
padding: 0
|
|
219
|
+
},
|
|
219
220
|
wrapClassName: "dt-pdf",
|
|
220
221
|
maskClosable: false,
|
|
221
222
|
footer: null
|
|
@@ -241,64 +242,90 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
241
242
|
};
|
|
242
243
|
}
|
|
243
244
|
});
|
|
245
|
+
const _export_sfc = (sfc, props) => {
|
|
246
|
+
const target = sfc.__vccOpts || sfc;
|
|
247
|
+
for (const [key, val] of props) {
|
|
248
|
+
target[key] = val;
|
|
249
|
+
}
|
|
250
|
+
return target;
|
|
251
|
+
};
|
|
252
|
+
const PdfView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/upload/src/components/PdfView.vue"]]);
|
|
244
253
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
245
254
|
__name: "WordView",
|
|
246
255
|
setup(__props) {
|
|
247
256
|
const ID = `word-view-${Math.ceil(Math.random() * 1e6)}`;
|
|
257
|
+
const domRef = ref(null);
|
|
248
258
|
const [register] = useModal({
|
|
249
259
|
width: "900px",
|
|
250
260
|
title: (data) => `\u9644\u4EF6\u9884\u89C8 - ${data.fileName}`,
|
|
251
|
-
|
|
261
|
+
bodyStyle: {
|
|
262
|
+
padding: 0
|
|
263
|
+
},
|
|
252
264
|
wrapClassName: "dt-word",
|
|
253
265
|
maskClosable: false,
|
|
254
266
|
footer: null
|
|
255
|
-
}, (data) => {
|
|
267
|
+
}, async (data) => {
|
|
256
268
|
const fileReader = new FileReader();
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
if (typeof window !== "undefined") {
|
|
270
|
+
let { renderAsync } = await import("docx-preview");
|
|
271
|
+
fileReader.addEventListener("load", (event) => {
|
|
272
|
+
const arrayBuffer = event.target.result;
|
|
273
|
+
renderAsync(arrayBuffer, unref(domRef), null, {
|
|
274
|
+
className: "docx",
|
|
275
|
+
inWrapper: true,
|
|
276
|
+
ignoreWidth: false,
|
|
277
|
+
ignoreHeight: false,
|
|
278
|
+
ignoreFonts: false,
|
|
279
|
+
breakPages: true,
|
|
280
|
+
ignoreLastRenderedPageBreak: true,
|
|
281
|
+
experimental: false,
|
|
282
|
+
trimXmlDeclaration: true,
|
|
283
|
+
debug: false
|
|
284
|
+
}).then((rsp) => {
|
|
285
|
+
dispatchResize();
|
|
286
|
+
});
|
|
272
287
|
});
|
|
273
|
-
|
|
274
|
-
|
|
288
|
+
fileReader.readAsArrayBuffer(data.data);
|
|
289
|
+
}
|
|
275
290
|
});
|
|
276
291
|
return (_ctx, _cache) => {
|
|
277
292
|
return openBlock(), createBlock(unref(DtModal), { onRegister: unref(register) }, {
|
|
278
293
|
default: withCtx(() => [
|
|
279
294
|
createElementVNode("div", {
|
|
295
|
+
ref_key: "domRef",
|
|
296
|
+
ref: domRef,
|
|
280
297
|
id: ID,
|
|
281
298
|
class: "word-view"
|
|
282
|
-
})
|
|
299
|
+
}, null, 512)
|
|
283
300
|
]),
|
|
284
301
|
_: 1
|
|
285
302
|
}, 8, ["onRegister"]);
|
|
286
303
|
};
|
|
287
304
|
}
|
|
288
305
|
});
|
|
289
|
-
const
|
|
306
|
+
const DocxView = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/upload/src/components/WordView.vue"]]);
|
|
307
|
+
const _hoisted_1 = {
|
|
308
|
+
key: 0,
|
|
309
|
+
class: "flex items-center"
|
|
310
|
+
};
|
|
290
311
|
const _hoisted_2 = { class: "pl-3" };
|
|
291
|
-
const _hoisted_3 = { class: "flex
|
|
292
|
-
const _hoisted_4 =
|
|
293
|
-
const _hoisted_5 =
|
|
294
|
-
const _hoisted_6 = {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
const
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
|
|
312
|
+
const _hoisted_3 = { class: "flex items-center flex-1" };
|
|
313
|
+
const _hoisted_4 = ["src"];
|
|
314
|
+
const _hoisted_5 = { class: "flex-1 pr-4" };
|
|
315
|
+
const _hoisted_6 = {
|
|
316
|
+
key: 0,
|
|
317
|
+
class: "ant-progress ant-progress-line ant-progress-default ant-progress-status-normal"
|
|
318
|
+
};
|
|
319
|
+
const _hoisted_7 = { class: "ant-progress-outer" };
|
|
320
|
+
const _hoisted_8 = { class: "ant-progress-inner" };
|
|
321
|
+
const _hoisted_9 = { class: "flex items-center" };
|
|
322
|
+
const _hoisted_10 = ["onClick"];
|
|
323
|
+
const _hoisted_11 = { key: 0 };
|
|
324
|
+
const _hoisted_12 = /* @__PURE__ */ createElementVNode("i", { class: "i ic:baseline-file-upload" }, null, -1);
|
|
325
|
+
const _hoisted_13 = /* @__PURE__ */ createElementVNode("div", null, "\u6587\u4EF6\u4E0A\u4F20", -1);
|
|
326
|
+
const _hoisted_14 = [
|
|
327
|
+
_hoisted_12,
|
|
328
|
+
_hoisted_13
|
|
302
329
|
];
|
|
303
330
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
304
331
|
__name: "index",
|
|
@@ -341,7 +368,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
341
368
|
},
|
|
342
369
|
{
|
|
343
370
|
class: "mdi:delete-outline",
|
|
344
|
-
show: () => props.showDelete,
|
|
371
|
+
show: () => !unref(getBind).disabled && props.showDelete,
|
|
345
372
|
click: (file) => {
|
|
346
373
|
fileList.value = unref(fileList).filter((f) => f.fileId !== file.fileId);
|
|
347
374
|
}
|
|
@@ -418,12 +445,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
418
445
|
const { getAppConf } = useAppStore();
|
|
419
446
|
const { downloadUrl = getAppConf.pages.downloadUrl } = props;
|
|
420
447
|
let _downloadUrl = isString(downloadUrl) ? downloadUrl : downloadUrl.api;
|
|
448
|
+
let _downloadType = isString(downloadUrl) ? "get" : downloadUrl.type;
|
|
421
449
|
if (["jpg", "jpeg", "png", "bmp", "gif"].includes(file.fileType)) {
|
|
422
|
-
imgSrcRef.value = `${_downloadUrl}?id=${file.fileId}`;
|
|
450
|
+
imgSrcRef.value = `${getAppConf.http?.baseUrl}${_downloadUrl}?id=${file.fileId}`;
|
|
423
451
|
imgVisable.value = true;
|
|
424
452
|
return;
|
|
425
453
|
}
|
|
426
|
-
let result = await http
|
|
454
|
+
let result = await http[_downloadType](_downloadUrl, { id: file.fileId }, {
|
|
427
455
|
onlyData: false,
|
|
428
456
|
responseType: "blob",
|
|
429
457
|
isTransformResponse: false,
|
|
@@ -476,15 +504,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
476
504
|
"onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => isRef(fileList) ? fileList.value = $event : null)
|
|
477
505
|
}), createSlots({
|
|
478
506
|
itemRender: withCtx(({ file, actions }) => [
|
|
479
|
-
createElementVNode("div",
|
|
480
|
-
|
|
507
|
+
createElementVNode("div", {
|
|
508
|
+
class: normalizeClass(["flex justify-between border border-solid border-gray-300 p-1 mt-2", file?.status === "error" ? "ant-upload-list-item-error" : ""])
|
|
509
|
+
}, [
|
|
510
|
+
createElementVNode("div", _hoisted_3, [
|
|
481
511
|
createElementVNode("img", {
|
|
482
512
|
src: unref(getFileThumb)(file.fileType),
|
|
483
513
|
class: "w-9 h-9 mr-2 p-1"
|
|
484
|
-
}, null, 8,
|
|
485
|
-
createElementVNode("
|
|
514
|
+
}, null, 8, _hoisted_4),
|
|
515
|
+
createElementVNode("div", _hoisted_5, [
|
|
516
|
+
createElementVNode("span", null, toDisplayString(file.fileName || file.name), 1),
|
|
517
|
+
createCommentVNode(" \u8BBE\u7F6E\u8FDB\u5EA6 "),
|
|
518
|
+
file.percent < 100 && file.percent > 0 ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
519
|
+
createElementVNode("div", _hoisted_7, [
|
|
520
|
+
createElementVNode("div", _hoisted_8, [
|
|
521
|
+
createElementVNode("div", {
|
|
522
|
+
class: "ant-progress-bg",
|
|
523
|
+
style: normalizeStyle({
|
|
524
|
+
width: `${file.percent}%`,
|
|
525
|
+
height: "2px"
|
|
526
|
+
})
|
|
527
|
+
}, null, 4)
|
|
528
|
+
])
|
|
529
|
+
])
|
|
530
|
+
])) : createCommentVNode("v-if", true)
|
|
531
|
+
])
|
|
486
532
|
]),
|
|
487
|
-
createElementVNode("div",
|
|
533
|
+
createElementVNode("div", _hoisted_9, [
|
|
488
534
|
(openBlock(), createElementBlock(Fragment, null, renderList(btns, (btn) => {
|
|
489
535
|
return openBlock(), createElementBlock(Fragment, {
|
|
490
536
|
key: btn.class
|
|
@@ -493,14 +539,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
493
539
|
key: 0,
|
|
494
540
|
class: normalizeClass(["i w-7 h-7 !text-base text-center leading-7 text-gray-600 cursor-pointer hover:bg-gray-200 hover:bg-opacity-50 transition-all duration-300", btn.class]),
|
|
495
541
|
onClick: ($event) => btn.click(file)
|
|
496
|
-
}, null, 10,
|
|
542
|
+
}, null, 10, _hoisted_10)) : createCommentVNode("v-if", true)
|
|
497
543
|
], 64);
|
|
498
544
|
}), 64))
|
|
499
545
|
])
|
|
500
|
-
])
|
|
546
|
+
], 2)
|
|
501
547
|
]),
|
|
502
548
|
default: withCtx(() => [
|
|
503
|
-
|
|
549
|
+
!unref(getBind).disabled ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
504
550
|
createVNode(_component_AButton, null, {
|
|
505
551
|
default: withCtx(() => [
|
|
506
552
|
createElementVNode("i", {
|
|
@@ -511,9 +557,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
511
557
|
_: 1
|
|
512
558
|
}),
|
|
513
559
|
createElementVNode("p", _hoisted_2, toDisplayString(unref(getHelpText)), 1)
|
|
514
|
-
]),
|
|
515
|
-
createVNode(
|
|
516
|
-
createVNode(
|
|
560
|
+
])) : createCommentVNode("v-if", true),
|
|
561
|
+
createVNode(PdfView, { onRegister: unref(registerPdf) }, null, 8, ["onRegister"]),
|
|
562
|
+
createVNode(DocxView, { onRegister: unref(registerDocx) }, null, 8, ["onRegister"])
|
|
517
563
|
]),
|
|
518
564
|
_: 2
|
|
519
565
|
}, [
|
|
@@ -525,22 +571,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
525
571
|
])
|
|
526
572
|
};
|
|
527
573
|
})
|
|
528
|
-
]), 1040, ["fileList"])) : createCommentVNode("", true),
|
|
574
|
+
]), 1040, ["fileList"])) : createCommentVNode("v-if", true),
|
|
529
575
|
unref(getBind).listType === "picture-card" ? (openBlock(), createBlock(_component_AUpload, mergeProps({ key: 1 }, unref(getBind), {
|
|
530
576
|
fileList: unref(fileList),
|
|
531
577
|
"onUpdate:fileList": _cache[1] || (_cache[1] = ($event) => isRef(fileList) ? fileList.value = $event : null),
|
|
532
578
|
onPreview: handlePreview
|
|
533
579
|
}), {
|
|
534
580
|
default: withCtx(() => [
|
|
535
|
-
!_ctx.maxCount || !unref(fileList).length || unref(fileList).length < _ctx.maxCount ? (openBlock(), createElementBlock("div",
|
|
581
|
+
!unref(getBind).disabled && (!_ctx.maxCount || !unref(fileList).length || unref(fileList).length < _ctx.maxCount) ? (openBlock(), createElementBlock("div", _hoisted_11, _hoisted_14)) : createCommentVNode("v-if", true)
|
|
536
582
|
]),
|
|
537
583
|
_: 1
|
|
538
|
-
}, 16, ["fileList"])) : createCommentVNode("", true),
|
|
539
|
-
unref(bindImg).src ? (openBlock(), createBlock(_component_AImage, mergeProps({ key: 2 }, unref(bindImg), { style: { display: "none" } }), null, 16)) : createCommentVNode("", true)
|
|
584
|
+
}, 16, ["fileList"])) : createCommentVNode("v-if", true),
|
|
585
|
+
unref(bindImg).src ? (openBlock(), createBlock(_component_AImage, mergeProps({ key: 2 }, unref(bindImg), { style: { display: "none" } }), null, 16)) : createCommentVNode("v-if", true)
|
|
540
586
|
]);
|
|
541
587
|
};
|
|
542
588
|
}
|
|
543
589
|
});
|
|
590
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/upload/src/index.vue"]]);
|
|
544
591
|
export {
|
|
545
|
-
|
|
592
|
+
index as DtUpload
|
|
546
593
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import '../iframe/index.less';
|
|
2
|
+
@import '../modal/index.less';
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
.ant-image-preview-img {
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
top: 0 !important;
|
|
18
19
|
.ant-modal-content{
|
|
19
20
|
height: 100%;
|
|
20
|
-
|
|
21
|
+
|
|
21
22
|
.ant-modal-body{
|
|
22
23
|
height: calc(100% - 55px);
|
|
23
24
|
}
|
|
@@ -32,6 +33,10 @@
|
|
|
32
33
|
width: 100%;
|
|
33
34
|
}
|
|
34
35
|
}
|
|
36
|
+
|
|
37
|
+
.ant-modal-body{
|
|
38
|
+
overflow-x: hidden;
|
|
39
|
+
}
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
.word-view{
|
|
@@ -59,9 +64,20 @@
|
|
|
59
64
|
width: 104px !important;
|
|
60
65
|
}
|
|
61
66
|
}
|
|
67
|
+
|
|
68
|
+
.ant-upload-disabled{
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
62
71
|
|
|
63
72
|
.ant-upload-list-item-actions{
|
|
64
73
|
display: flex;
|
|
65
74
|
}
|
|
75
|
+
|
|
76
|
+
.ant-upload-list-item-error{
|
|
77
|
+
border-color: #ED6F6F;
|
|
78
|
+
i{
|
|
79
|
+
color: #ED6F6F;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
66
82
|
|
|
67
83
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
2
2
|
ID: string;
|
|
3
|
+
domRef: any;
|
|
3
4
|
register: import("../../../modal/src/types/modal.type").RegisterFn;
|
|
4
5
|
readonly DtModal: import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
5
6
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
@@ -123,7 +123,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
123
123
|
uploadFile: ({ file, onSuccess, onError, onProgress }: UploadRequestOption) => Promise<void>;
|
|
124
124
|
fileView: (file: UploadFile) => Promise<void>;
|
|
125
125
|
download: (file: UploadFile) => void;
|
|
126
|
-
readonly getFileThumb: (fileType: string) => "
|
|
126
|
+
readonly getFileThumb: (fileType: string) => "imgs/fu_ppt.gif" | "imgs/fu_doc.gif" | "imgs/fu_pdf.gif" | "imgs/fu_bmp.gif" | "imgs/fu_exl.gif" | "imgs/fu_txt.gif" | "imgs/fu_rar.gif" | "imgs/fu_blank.gif";
|
|
127
127
|
PdfView: import("vue").DefineComponent<{}, {
|
|
128
128
|
exeReduce: import("vue").Ref<number>;
|
|
129
129
|
pdfUrlRef: import("vue").Ref<any>;
|
|
@@ -134,6 +134,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
134
134
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
135
135
|
DocxView: import("vue").DefineComponent<{}, {
|
|
136
136
|
ID: string;
|
|
137
|
+
domRef: any;
|
|
137
138
|
register: import("../../modal/src/types/modal.type").RegisterFn;
|
|
138
139
|
readonly DtModal: import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
139
140
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const getFileType: (type: string) => any;
|
|
2
|
-
export declare const getFileThumb: (fileType: string) => "
|
|
2
|
+
export declare const getFileThumb: (fileType: string) => "imgs/fu_ppt.gif" | "imgs/fu_doc.gif" | "imgs/fu_pdf.gif" | "imgs/fu_bmp.gif" | "imgs/fu_exl.gif" | "imgs/fu_txt.gif" | "imgs/fu_rar.gif" | "imgs/fu_blank.gif";
|