vue-element-ui-x 1.1.1 → 1.2.0-beta.1
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/README.md +140 -140
- package/components.json +12 -12
- package/lib/components/Attachments/index.js +254 -280
- package/lib/components/Bubble/index.js +7392 -7383
- package/lib/components/BubbleList/index.js +7731 -7724
- package/lib/components/Conversations/index.js +108 -134
- package/lib/components/EditorSender/index.js +56 -60
- package/lib/components/FilesCard/index.js +150 -164
- package/lib/components/Prompts/index.js +55 -61
- package/lib/components/Sender/index.js +85 -91
- package/lib/components/Thinking/index.js +47 -57
- package/lib/components/ThoughtChain/index.js +20715 -20708
- package/lib/components/Typewriter/index.js +58 -49
- package/lib/components/Welcome/index.js +39 -43
- package/lib/index.common.js +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.js +29159 -29236
- package/lib/index.umd.js +1 -1
- package/lib/locale/index.js +97 -97
- package/lib/locale/lang/ar.js +18 -18
- package/lib/locale/lang/ar.umd.js +17 -17
- package/lib/locale/lang/de.js +18 -18
- package/lib/locale/lang/de.umd.js +17 -17
- package/lib/locale/lang/en.js +18 -18
- package/lib/locale/lang/en.umd.js +17 -17
- package/lib/locale/lang/es.js +18 -18
- package/lib/locale/lang/es.umd.js +17 -17
- package/lib/locale/lang/fr.js +18 -18
- package/lib/locale/lang/fr.umd.js +17 -17
- package/lib/locale/lang/it.js +18 -18
- package/lib/locale/lang/it.umd.js +17 -17
- package/lib/locale/lang/ja.js +18 -18
- package/lib/locale/lang/ja.umd.js +17 -17
- package/lib/locale/lang/ko.js +18 -18
- package/lib/locale/lang/ko.umd.js +17 -17
- package/lib/locale/lang/pt-br.js +18 -18
- package/lib/locale/lang/pt-br.umd.js +17 -17
- package/lib/locale/lang/ru-RU.js +18 -18
- package/lib/locale/lang/ru-RU.umd.js +17 -17
- package/lib/locale/lang/zh-CN.js +18 -18
- package/lib/locale/lang/zh-CN.umd.js +17 -17
- package/lib/locale/lang/zh-TW.js +18 -18
- package/lib/locale/lang/zh-TW.umd.js +17 -17
- package/lib/locale/mixin.js +9 -9
- package/lib/mixins/index.js +250 -250
- package/package.json +77 -77
|
@@ -2,25 +2,6 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/ 4444:
|
|
6
|
-
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
7
|
-
|
|
8
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9
|
-
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10
|
-
/* harmony export */ });
|
|
11
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6314);
|
|
12
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
13
|
-
// Imports
|
|
14
|
-
|
|
15
|
-
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
16
|
-
// Module
|
|
17
|
-
___CSS_LOADER_EXPORT___.push([module.id, "[data-v-eaf958fa]:root{--color-primary: #409eff;--color-success: #67c23a;--color-warning: #e6a23c;--color-danger: #f56c6c;--color-info: #909399}.el-x-filescard[data-v-eaf958fa]{width:fit-content;padding:12px;display:flex;flex-wrap:nowrap;gap:8px;align-items:center;border-radius:8px;position:relative;background:rgba(0,0,0,.06);max-width:var(--elx-files-card-max-width)}.el-x-filescard .el-x-filescard-progress[data-v-eaf958fa]{position:absolute;top:0;left:0;bottom:0;background:rgba(0,0,0,.08);border-radius:8px;transition:width .2s ease}.el-x-filescard .el-x-filescard-delete-icon[data-v-eaf958fa]{position:absolute;top:-8px;right:-6px;cursor:pointer;color:rgba(0,0,0,.4);display:none}.el-x-filescard .el-x-filescard-delete-icon[data-v-eaf958fa]:hover{color:#ff4d4f}.el-x-filescard:hover .el-x-filescard-delete-icon[data-v-eaf958fa]{display:block}.el-x-filescard-square[data-v-eaf958fa]{padding:0;margin:0}.el-x-filescard-icon[data-v-eaf958fa]{flex:none;font-size:var(--elx-files-card-icon-size)}.el-x-filescard-img[data-v-eaf958fa]{flex:none;width:var(--elx-files-card-icon-size);height:var(--elx-files-card-icon-size);border-radius:8px;object-fit:cover}.el-x-filescard-content[data-v-eaf958fa]{flex:auto;min-width:0;display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;height:100%}.el-x-filescard-content .el-x-filescard-name[data-v-eaf958fa]{display:flex;flex-wrap:nowrap;max-width:100%;font-size:14px}.el-x-filescard-content .el-x-filescard-name .el-x-filescard-name-prefix[data-v-eaf958fa]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.el-x-filescard-content .el-x-filescard-name .el-x-filescard-name-suffix[data-v-eaf958fa]{flex:none}.el-x-filescard-content .el-x-filescard-description[data-v-eaf958fa]{flex:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:rgba(0,0,0,.4);font-size:12px}.el-x-filescard-content .el-x-filescard-description-error[data-v-eaf958fa]{color:#ff4d4f}.image-preview-container[data-v-eaf958fa]{position:relative;padding:0px;width:var(--elx-files-card-icon-size);height:var(--elx-files-card-icon-size);display:inline-block;border-radius:8px;transition:all .3s}.image-preview-container .preview-mask[data-v-eaf958fa]{position:absolute;inset:0;width:100%;display:flex;justify-content:center;align-items:center;opacity:0;background:rgba(0,0,0,.65);color:#fff;font-size:10px;transition:opacity .3s}.image-preview-container .preview-mask .el-icon-view[data-v-eaf958fa]{font-size:10px;margin-right:2px;display:flex;align-items:center;height:100%;margin-top:2px}.image-preview-container .preview-mask[data-v-eaf958fa]:hover{opacity:1;transition:opacity .3s;cursor:pointer}.image-preview-container-square .preview-mask[data-v-eaf958fa]{font-size:14px}.image-preview-container-square .preview-mask .el-icon-view[data-v-eaf958fa]{font-size:12px}.preview-mask-loading[data-v-eaf958fa]{position:absolute;inset:0;width:100%;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,.65);color:#fff;transition:all .3s}.preview-mask-loading .circle-progress[data-v-eaf958fa]{width:100% !important;height:100% !important;display:flex;justify-content:center;align-items:center}.preview-mask-loading .circle-progress .el-progress-circle[data-v-eaf958fa]{width:calc(100% - 12px) !important;height:calc(100% - 12px) !important}.preview-mask-loading .circle-progress .el-progress-circle svg>path[data-v-eaf958fa]:nth-child(1){stroke:hsla(0,0%,100%,.2);stroke-width:8px}.preview-mask-loading .circle-progress .el-progress__text[data-v-eaf958fa]{color:#fff;font-size:14px}.preview-mask-error[data-v-eaf958fa]{position:absolute;inset:0;width:100%;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,.5);font-size:12px;transition:all .3s;color:#ff4d4f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.el-image-viewer__progress[data-v-eaf958fa]{display:none}.fade-enter-active[data-v-eaf958fa],.fade-leave-active[data-v-eaf958fa]{transition:opacity .3s}.fade-enter[data-v-eaf958fa],.fade-leave-to[data-v-eaf958fa]{opacity:0}", ""]);
|
|
18
|
-
// Exports
|
|
19
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/***/ }),
|
|
23
|
-
|
|
24
5
|
/***/ 4486:
|
|
25
6
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
26
7
|
|
|
@@ -472,6 +453,25 @@ module.exports = function (cssWithMappingToString) {
|
|
|
472
453
|
return list;
|
|
473
454
|
};
|
|
474
455
|
|
|
456
|
+
/***/ }),
|
|
457
|
+
|
|
458
|
+
/***/ 7492:
|
|
459
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
460
|
+
|
|
461
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
462
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
463
|
+
/* harmony export */ });
|
|
464
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6314);
|
|
465
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
466
|
+
// Imports
|
|
467
|
+
|
|
468
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
469
|
+
// Module
|
|
470
|
+
___CSS_LOADER_EXPORT___.push([module.id, "[data-v-6808a5a6]:root{--color-primary: #409eff;--color-success: #67c23a;--color-warning: #e6a23c;--color-danger: #f56c6c;--color-info: #909399}.el-x-filescard[data-v-6808a5a6]{width:fit-content;padding:12px;display:flex;flex-wrap:nowrap;gap:8px;align-items:center;border-radius:8px;position:relative;background:rgba(0,0,0,.06);max-width:var(--elx-files-card-max-width)}.el-x-filescard .el-x-filescard-progress[data-v-6808a5a6]{position:absolute;top:0;left:0;bottom:0;background:rgba(0,0,0,.08);border-radius:8px;transition:width .2s ease}.el-x-filescard .el-x-filescard-delete-icon[data-v-6808a5a6]{position:absolute;top:-8px;right:-6px;cursor:pointer;color:rgba(0,0,0,.4);display:none}.el-x-filescard .el-x-filescard-delete-icon[data-v-6808a5a6]:hover{color:#ff4d4f}.el-x-filescard:hover .el-x-filescard-delete-icon[data-v-6808a5a6]{display:block}.el-x-filescard-square[data-v-6808a5a6]{padding:0;margin:0}.el-x-filescard-icon[data-v-6808a5a6]{flex:none;font-size:var(--elx-files-card-icon-size)}.el-x-filescard-img[data-v-6808a5a6]{flex:none;width:var(--elx-files-card-icon-size);height:var(--elx-files-card-icon-size);border-radius:8px;object-fit:cover}.el-x-filescard-content[data-v-6808a5a6]{flex:auto;min-width:0;display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;height:100%}.el-x-filescard-content .el-x-filescard-name[data-v-6808a5a6]{display:flex;flex-wrap:nowrap;max-width:100%;font-size:14px}.el-x-filescard-content .el-x-filescard-name .el-x-filescard-name-prefix[data-v-6808a5a6]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.el-x-filescard-content .el-x-filescard-name .el-x-filescard-name-suffix[data-v-6808a5a6]{flex:none}.el-x-filescard-content .el-x-filescard-description[data-v-6808a5a6]{flex:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:rgba(0,0,0,.4);font-size:12px}.el-x-filescard-content .el-x-filescard-description-error[data-v-6808a5a6]{color:#ff4d4f}.image-preview-container[data-v-6808a5a6]{position:relative;padding:0px;width:var(--elx-files-card-icon-size);height:var(--elx-files-card-icon-size);display:inline-block;border-radius:8px;transition:all .3s}.image-preview-container .preview-mask[data-v-6808a5a6]{position:absolute;inset:0;width:100%;display:flex;justify-content:center;align-items:center;opacity:0;background:rgba(0,0,0,.65);color:#fff;font-size:10px;transition:opacity .3s}.image-preview-container .preview-mask .el-icon-view[data-v-6808a5a6]{font-size:10px;margin-right:2px;display:flex;align-items:center;height:100%;margin-top:2px}.image-preview-container .preview-mask[data-v-6808a5a6]:hover{opacity:1;transition:opacity .3s;cursor:pointer}.image-preview-container-square .preview-mask[data-v-6808a5a6]{font-size:14px}.image-preview-container-square .preview-mask .el-icon-view[data-v-6808a5a6]{font-size:12px}.preview-mask-loading[data-v-6808a5a6]{position:absolute;inset:0;width:100%;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,.65);color:#fff;transition:all .3s}.preview-mask-loading .circle-progress[data-v-6808a5a6]{width:100% !important;height:100% !important;display:flex;justify-content:center;align-items:center}.preview-mask-loading .circle-progress .el-progress-circle[data-v-6808a5a6]{width:calc(100% - 12px) !important;height:calc(100% - 12px) !important}.preview-mask-loading .circle-progress .el-progress-circle svg>path[data-v-6808a5a6]:nth-child(1){stroke:hsla(0,0%,100%,.2);stroke-width:8px}.preview-mask-loading .circle-progress .el-progress__text[data-v-6808a5a6]{color:#fff;font-size:14px}.preview-mask-error[data-v-6808a5a6]{position:absolute;inset:0;width:100%;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,.5);font-size:12px;transition:all .3s;color:#ff4d4f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.el-image-viewer__progress[data-v-6808a5a6]{display:none}.fade-enter-active[data-v-6808a5a6],.fade-leave-active[data-v-6808a5a6]{transition:opacity .3s}.fade-enter[data-v-6808a5a6],.fade-leave-to[data-v-6808a5a6]{opacity:0}", ""]);
|
|
471
|
+
// Exports
|
|
472
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
473
|
+
|
|
474
|
+
|
|
475
475
|
/***/ })
|
|
476
476
|
|
|
477
477
|
/******/ });
|
|
@@ -556,7 +556,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
556
556
|
"default": () => (/* binding */ FilesCard)
|
|
557
557
|
});
|
|
558
558
|
|
|
559
|
-
;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/FilesCard/src/main.vue?vue&type=template&id=
|
|
559
|
+
;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/FilesCard/src/main.vue?vue&type=template&id=6808a5a6&scoped=true
|
|
560
560
|
var render = function render() {
|
|
561
561
|
var _vm = this,
|
|
562
562
|
_c = _vm._self._c;
|
|
@@ -588,156 +588,142 @@ var render = function render() {
|
|
|
588
588
|
style: {
|
|
589
589
|
width: `${_vm.percent || 0}%`
|
|
590
590
|
}
|
|
591
|
-
}) : _vm._e(), _vm._v(" "), _vm.$slots.icon || _vm._fileType ? _vm._t("icon",
|
|
592
|
-
return [!_vm.isImageFile ? _c(_vm.svgIconMap[_vm._fileType], {
|
|
593
|
-
tag: "component",
|
|
594
|
-
staticClass: "el-x-filescard-icon",
|
|
595
|
-
attrs: {
|
|
596
|
-
color: _vm.iconColor || _vm.colorMap[_vm._fileType]
|
|
597
|
-
}
|
|
598
|
-
}) : _vm._e(), _vm._v(" "), _vm.isImageFile ? [_c("div", {
|
|
599
|
-
staticClass: "image-preview-container",
|
|
600
|
-
class: {
|
|
601
|
-
"image-preview-container-square": _vm.isSquareVariant && _vm.isImageFile
|
|
602
|
-
},
|
|
603
|
-
on: {
|
|
604
|
-
mouseenter: function ($event) {
|
|
605
|
-
_vm.imageHovered = true;
|
|
606
|
-
},
|
|
607
|
-
mouseleave: function ($event) {
|
|
608
|
-
_vm.imageHovered = false;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
}, [_vm._previewImgUrl ? _c("el-image", {
|
|
612
|
-
ref: "imgRef",
|
|
613
|
-
staticClass: "el-x-filescard-img",
|
|
614
|
-
attrs: {
|
|
615
|
-
src: _vm._previewImgUrl,
|
|
616
|
-
"preview-src-list": _vm.imgPreview && _vm._previewImgUrl ? [_vm._previewImgUrl] : [],
|
|
617
|
-
fit: "cover"
|
|
618
|
-
},
|
|
619
|
-
on: {
|
|
620
|
-
click: function ($event) {
|
|
621
|
-
_vm.imgPreview ? _vm.handlePreviewAction("self") : null;
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
}) : _c(_vm.svgIconMap[_vm._fileType], {
|
|
625
|
-
tag: "component",
|
|
626
|
-
staticClass: "el-x-filescard-img",
|
|
627
|
-
attrs: {
|
|
628
|
-
color: _vm.iconColor || _vm.colorMap[_vm._fileType]
|
|
629
|
-
}
|
|
630
|
-
}), _vm._v(" "), _c("transition", {
|
|
631
|
-
attrs: {
|
|
632
|
-
name: "fade"
|
|
633
|
-
}
|
|
634
|
-
}, [_vm.imageHovered && _vm._previewImgUrl && _vm.imgPreviewMask && _vm.imgPreview ? _vm._t("image-preview-actions", function () {
|
|
635
|
-
return [_c("div", {
|
|
636
|
-
staticClass: "preview-mask",
|
|
637
|
-
on: {
|
|
638
|
-
click: function ($event) {
|
|
639
|
-
return _vm.handlePreviewAction("mask");
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
}, [_c("i", {
|
|
643
|
-
staticClass: "el-icon-view"
|
|
644
|
-
}), _vm._v(" "), _c("span", [_vm._v("预览")])])];
|
|
645
|
-
}, {
|
|
646
|
-
item: {
|
|
647
|
-
..._vm.propsData,
|
|
648
|
-
prefix: _vm.namePrefix,
|
|
649
|
-
suffix: _vm.nameSuffix
|
|
650
|
-
}
|
|
651
|
-
}) : _vm._e()], 2), _vm._v(" "), _vm.status === "uploading" && _vm.isSquareVariant ? _c("div", {
|
|
652
|
-
staticClass: "preview-mask-loading"
|
|
653
|
-
}, [_c("el-progress", {
|
|
654
|
-
staticClass: "circle-progress",
|
|
655
|
-
attrs: {
|
|
656
|
-
color: "#fff",
|
|
657
|
-
type: "circle",
|
|
658
|
-
percentage: _vm.percent
|
|
659
|
-
}
|
|
660
|
-
})], 1) : _vm.status === "error" && _vm.isSquareVariant ? _c("div", {
|
|
661
|
-
staticClass: "preview-mask-error"
|
|
662
|
-
}, [_c("span", {
|
|
663
|
-
staticClass: "error-text"
|
|
664
|
-
}, [_vm._v(_vm._s(_vm.errorTip || "上传失败"))])]) : _vm._e()], 1)] : _vm._e()];
|
|
665
|
-
}, {
|
|
591
|
+
}) : _vm._e(), _vm._v(" "), _vm.$slots.icon || _vm._fileType ? [_vm.$scopedSlots.icon ? _vm._t("icon", null, {
|
|
666
592
|
item: _vm.propsData
|
|
667
|
-
}) : _vm.
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
593
|
+
}) : [!_vm.isImageFile ? _c(_vm.svgIconMap[_vm._fileType], {
|
|
594
|
+
tag: "component",
|
|
595
|
+
staticClass: "el-x-filescard-icon",
|
|
596
|
+
attrs: {
|
|
597
|
+
color: _vm.iconColor || _vm.colorMap[_vm._fileType]
|
|
598
|
+
}
|
|
599
|
+
}) : _vm._e(), _vm._v(" "), _vm.isImageFile ? [_c("div", {
|
|
600
|
+
staticClass: "image-preview-container",
|
|
601
|
+
class: {
|
|
602
|
+
"image-preview-container-square": _vm.isSquareVariant && _vm.isImageFile
|
|
603
|
+
},
|
|
604
|
+
on: {
|
|
605
|
+
mouseenter: function ($event) {
|
|
606
|
+
_vm.imageHovered = true;
|
|
607
|
+
},
|
|
608
|
+
mouseleave: function ($event) {
|
|
609
|
+
_vm.imageHovered = false;
|
|
681
610
|
}
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
611
|
+
}
|
|
612
|
+
}, [_vm._previewImgUrl ? _c("el-image", {
|
|
613
|
+
ref: "imgRef",
|
|
614
|
+
staticClass: "el-x-filescard-img",
|
|
615
|
+
attrs: {
|
|
616
|
+
src: _vm._previewImgUrl,
|
|
617
|
+
"preview-src-list": _vm.imgPreview && _vm._previewImgUrl ? [_vm._previewImgUrl] : [],
|
|
618
|
+
fit: "cover"
|
|
619
|
+
},
|
|
620
|
+
on: {
|
|
621
|
+
click: function ($event) {
|
|
622
|
+
_vm.imgPreview ? _vm.handlePreviewAction("self") : null;
|
|
691
623
|
}
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
624
|
+
}
|
|
625
|
+
}) : _c(_vm.svgIconMap[_vm._fileType], {
|
|
626
|
+
tag: "component",
|
|
627
|
+
staticClass: "el-x-filescard-img",
|
|
628
|
+
attrs: {
|
|
629
|
+
color: _vm.iconColor || _vm.colorMap[_vm._fileType]
|
|
630
|
+
}
|
|
631
|
+
}), _vm._v(" "), _c("transition", {
|
|
632
|
+
attrs: {
|
|
633
|
+
name: "fade"
|
|
634
|
+
}
|
|
635
|
+
}, [_vm.imageHovered && _vm._previewImgUrl && _vm.imgPreviewMask && _vm.imgPreview ? [_vm.$scopedSlots["image-preview-actions"] ? _vm._t("image-preview-actions", null, {
|
|
636
|
+
item: {
|
|
637
|
+
..._vm.propsData,
|
|
638
|
+
prefix: _vm.namePrefix,
|
|
639
|
+
suffix: _vm.nameSuffix
|
|
640
|
+
}
|
|
641
|
+
}) : _c("div", {
|
|
642
|
+
staticClass: "preview-mask",
|
|
643
|
+
on: {
|
|
644
|
+
click: function ($event) {
|
|
645
|
+
return _vm.handlePreviewAction("mask");
|
|
706
646
|
}
|
|
707
|
-
}
|
|
708
|
-
}, {
|
|
647
|
+
}
|
|
648
|
+
}, [_c("i", {
|
|
649
|
+
staticClass: "el-icon-view"
|
|
650
|
+
}), _vm._v(" "), _c("span", [_vm._v("预览")])])] : _vm._e()], 2), _vm._v(" "), _vm.status === "uploading" && _vm.isSquareVariant ? _c("div", {
|
|
651
|
+
staticClass: "preview-mask-loading"
|
|
652
|
+
}, [_c("el-progress", {
|
|
653
|
+
staticClass: "circle-progress",
|
|
654
|
+
attrs: {
|
|
655
|
+
color: "#fff",
|
|
656
|
+
type: "circle",
|
|
657
|
+
percentage: _vm.percent
|
|
658
|
+
}
|
|
659
|
+
})], 1) : _vm.status === "error" && _vm.isSquareVariant ? _c("div", {
|
|
660
|
+
staticClass: "preview-mask-error"
|
|
661
|
+
}, [_c("span", {
|
|
662
|
+
staticClass: "error-text"
|
|
663
|
+
}, [_vm._v(_vm._s(_vm.errorTip || "上传失败"))])]) : _vm._e()], 1)] : _vm._e()]] : _vm._e(), _vm._v(" "), (_vm.$slots.content || _vm.name || _vm.description) && !(_vm.isSquareVariant && _vm.isImageFile) ? [_vm.$scopedSlots.content ? _vm._t("content", null, {
|
|
709
664
|
item: _vm.propsData
|
|
710
|
-
}) :
|
|
665
|
+
}) : _c("div", {
|
|
666
|
+
staticClass: "el-x-filescard-content"
|
|
667
|
+
}, [_vm.name ? _c("div", {
|
|
668
|
+
staticClass: "el-x-filescard-name"
|
|
669
|
+
}, [_vm.$scopedSlots["name-prefix"] ? _vm._t("name-prefix", null, {
|
|
670
|
+
item: {
|
|
671
|
+
..._vm.propsData,
|
|
672
|
+
prefix: _vm.namePrefix,
|
|
673
|
+
suffix: _vm.nameSuffix
|
|
674
|
+
}
|
|
675
|
+
}) : _c("div", {
|
|
676
|
+
staticClass: "el-x-filescard-name-prefix"
|
|
677
|
+
}, [_vm._v("\n " + _vm._s(_vm.namePrefix) + "\n ")]), _vm._v(" "), _vm.$scopedSlots["name-suffix"] ? _vm._t("name-suffix", null, {
|
|
678
|
+
item: {
|
|
679
|
+
..._vm.propsData,
|
|
680
|
+
prefix: _vm.namePrefix,
|
|
681
|
+
suffix: _vm.nameSuffix
|
|
682
|
+
}
|
|
683
|
+
}) : _c("div", {
|
|
684
|
+
staticClass: "el-x-filescard-name-suffix"
|
|
685
|
+
}, [_vm._v("\n " + _vm._s(_vm.nameSuffix) + "\n ")])], 2) : _vm._e(), _vm._v(" "), _vm.$scopedSlots.description ? _vm._t("description", null, {
|
|
686
|
+
item: {
|
|
687
|
+
..._vm.propsData,
|
|
688
|
+
prefix: _vm.namePrefix,
|
|
689
|
+
suffix: _vm.nameSuffix
|
|
690
|
+
}
|
|
691
|
+
}) : _c("div", {
|
|
692
|
+
staticClass: "el-x-filescard-description",
|
|
693
|
+
class: {
|
|
694
|
+
"el-x-filescard-description-error": _vm.status === "error",
|
|
695
|
+
"el-x-filescard-description-done": _vm.status === "done",
|
|
696
|
+
"el-x-filescard-description-uploading": _vm.status === "uploading"
|
|
697
|
+
}
|
|
698
|
+
}, [_vm._v("\n " + _vm._s(_vm._description) + "\n ")])], 2)] : _vm._e(), _vm._v(" "), _vm.showDelIcon && _vm.isHovered ? _c("div", {
|
|
711
699
|
staticClass: "el-x-filescard-delete-icon",
|
|
712
700
|
on: {
|
|
713
701
|
click: _vm.handleDelete
|
|
714
702
|
}
|
|
715
|
-
}, [_vm._t("del-icon",
|
|
716
|
-
return [_c("i", {
|
|
717
|
-
staticClass: "el-icon-error"
|
|
718
|
-
})];
|
|
719
|
-
}, {
|
|
703
|
+
}, [_vm.$scopedSlots["del-icon"] ? _vm._t("del-icon", null, {
|
|
720
704
|
item: _vm.propsData
|
|
705
|
+
}) : _c("i", {
|
|
706
|
+
staticClass: "el-icon-error"
|
|
721
707
|
})], 2) : _vm._e()], 2);
|
|
722
708
|
};
|
|
723
709
|
var staticRenderFns = [];
|
|
724
710
|
render._withStripped = true;
|
|
725
711
|
|
|
726
|
-
;// ./src/components/FilesCard/src/main.vue?vue&type=template&id=
|
|
712
|
+
;// ./src/components/FilesCard/src/main.vue?vue&type=template&id=6808a5a6&scoped=true
|
|
727
713
|
|
|
728
714
|
;// ./src/utils/index.js
|
|
729
|
-
/**
|
|
730
|
-
* 判断文件类型是否为图片
|
|
731
|
-
* @param {string} type 文件类型
|
|
732
|
-
* @returns {boolean} 是否为图片类型
|
|
715
|
+
/**
|
|
716
|
+
* 判断文件类型是否为图片
|
|
717
|
+
* @param {string} type 文件类型
|
|
718
|
+
* @returns {boolean} 是否为图片类型
|
|
733
719
|
*/
|
|
734
720
|
const isImageFileType = type => type.indexOf('image/') === 0;
|
|
735
721
|
const MEASURE_SIZE = 200;
|
|
736
722
|
|
|
737
|
-
/**
|
|
738
|
-
* 预览图片文件并生成预览URL
|
|
739
|
-
* @param {File|Blob} file 图片文件对象
|
|
740
|
-
* @returns {Promise<string>} 返回图片预览URL的Promise
|
|
723
|
+
/**
|
|
724
|
+
* 预览图片文件并生成预览URL
|
|
725
|
+
* @param {File|Blob} file 图片文件对象
|
|
726
|
+
* @returns {Promise<string>} 返回图片预览URL的Promise
|
|
741
727
|
*/
|
|
742
728
|
function previewImage(file) {
|
|
743
729
|
return new Promise(resolve => {
|
|
@@ -789,10 +775,10 @@ function previewImage(file) {
|
|
|
789
775
|
});
|
|
790
776
|
}
|
|
791
777
|
|
|
792
|
-
/**
|
|
793
|
-
* 根据文件后缀名获取文件类型
|
|
794
|
-
* @param {string} fileExtension 文件后缀名
|
|
795
|
-
* @returns {{lowerCase: string, upperCase: string}} 返回文件类型对象
|
|
778
|
+
/**
|
|
779
|
+
* 根据文件后缀名获取文件类型
|
|
780
|
+
* @param {string} fileExtension 文件后缀名
|
|
781
|
+
* @returns {{lowerCase: string, upperCase: string}} 返回文件类型对象
|
|
796
782
|
*/
|
|
797
783
|
function getFileType(fileExtension) {
|
|
798
784
|
// 去除后缀名开头的点,并转换为小写
|
|
@@ -903,10 +889,10 @@ function getFileType(fileExtension) {
|
|
|
903
889
|
};
|
|
904
890
|
}
|
|
905
891
|
|
|
906
|
-
/**
|
|
907
|
-
* 获取文件大小
|
|
908
|
-
* @param {number} size 文件大小
|
|
909
|
-
* @returns {string} 返回文件大小
|
|
892
|
+
/**
|
|
893
|
+
* 获取文件大小
|
|
894
|
+
* @param {number} size 文件大小
|
|
895
|
+
* @returns {string} 返回文件大小
|
|
910
896
|
*/
|
|
911
897
|
function getSize(size) {
|
|
912
898
|
let retSize = size;
|
|
@@ -2393,9 +2379,9 @@ const colorMap = {
|
|
|
2393
2379
|
// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
|
|
2394
2380
|
var injectStylesIntoStyleTag = __webpack_require__(5072);
|
|
2395
2381
|
var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
|
|
2396
|
-
// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/FilesCard/src/main.vue?vue&type=style&index=0&id=
|
|
2397
|
-
var
|
|
2398
|
-
;// ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/FilesCard/src/main.vue?vue&type=style&index=0&id=
|
|
2382
|
+
// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/FilesCard/src/main.vue?vue&type=style&index=0&id=6808a5a6&prod&lang=scss&scoped=true
|
|
2383
|
+
var mainvue_type_style_index_0_id_6808a5a6_prod_lang_scss_scoped_true = __webpack_require__(7492);
|
|
2384
|
+
;// ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/FilesCard/src/main.vue?vue&type=style&index=0&id=6808a5a6&prod&lang=scss&scoped=true
|
|
2399
2385
|
|
|
2400
2386
|
|
|
2401
2387
|
|
|
@@ -2404,12 +2390,12 @@ var options = {};
|
|
|
2404
2390
|
options.insert = "head";
|
|
2405
2391
|
options.singleton = false;
|
|
2406
2392
|
|
|
2407
|
-
var update = injectStylesIntoStyleTag_default()(
|
|
2393
|
+
var update = injectStylesIntoStyleTag_default()(mainvue_type_style_index_0_id_6808a5a6_prod_lang_scss_scoped_true/* default */.A, options);
|
|
2408
2394
|
|
|
2409
2395
|
|
|
2410
2396
|
|
|
2411
|
-
/* harmony default export */ const
|
|
2412
|
-
;// ./src/components/FilesCard/src/main.vue?vue&type=style&index=0&id=
|
|
2397
|
+
/* harmony default export */ const src_mainvue_type_style_index_0_id_6808a5a6_prod_lang_scss_scoped_true = (mainvue_type_style_index_0_id_6808a5a6_prod_lang_scss_scoped_true/* default */.A.locals || {});
|
|
2398
|
+
;// ./src/components/FilesCard/src/main.vue?vue&type=style&index=0&id=6808a5a6&prod&lang=scss&scoped=true
|
|
2413
2399
|
|
|
2414
2400
|
;// ./src/components/FilesCard/src/main.vue
|
|
2415
2401
|
|
|
@@ -2426,7 +2412,7 @@ var main_component = (0,componentNormalizer/* default */.A)(
|
|
|
2426
2412
|
staticRenderFns,
|
|
2427
2413
|
false,
|
|
2428
2414
|
null,
|
|
2429
|
-
"
|
|
2415
|
+
"6808a5a6",
|
|
2430
2416
|
null
|
|
2431
2417
|
|
|
2432
2418
|
)
|