ivue-material-plus
Version:
A high quality UI components Library with Vue.js
114 lines (109 loc) • 5.59 kB
JavaScript
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var uploadList_vue_vue_type_script_lang = require('./upload-list.vue_vue_type_script_lang.js');
var vue = require('vue');
var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
const _hoisted_1 = ["onClick"];
const _hoisted_2 = ["src"];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_ivue_icon = vue.resolveComponent("ivue-icon");
const _directive_ivue_loading = vue.resolveDirective("ivue-loading");
return vue.openBlock(), vue.createElementBlock("ul", {
class: vue.normalizeClass(_ctx.prefixCls)
}, [
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.files, (file, index) => {
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", {
key: file.uid,
class: vue.normalizeClass(_ctx.fileStatusClass(file))
}, [
vue.createCommentVNode(" \u56FE\u7247 "),
vue.createElementVNode("div", {
class: vue.normalizeClass(_ctx.imageClass(file)),
onClick: ($event) => _ctx.handleFileData(file, index),
style: vue.normalizeStyle(_ctx.getSizeStyle(file.previewSize || _ctx.previewSize))
}, [
vue.createElementVNode("img", {
src: file.content || file.url,
class: vue.normalizeClass(`${_ctx.prefixCls}-image__img`),
style: vue.normalizeStyle(_ctx.imgStyle(file))
}, null, 14, _hoisted_2),
vue.createCommentVNode(" \u81EA\u5B9A\u4E49\u9884\u89C8\u56FE\u7247\u533A\u57DF\u5185\u5BB9 "),
vue.createElementVNode("div", {
class: vue.normalizeClass(`${_ctx.prefixCls}-preview--image`)
}, [
vue.renderSlot(_ctx.$slots, "preview-image", {}, () => [
vue.createCommentVNode(" \u9884\u89C8\u56FE\u6807 "),
vue.createVNode(_component_ivue_icon, {
class: vue.normalizeClass(`${_ctx.prefixCls}-preview-icon`)
}, {
default: vue.withCtx(() => [
vue.createTextVNode("visibility")
]),
_: 1
}, 8, ["class"])
])
], 2)
], 14, _hoisted_1),
vue.createCommentVNode(" \u8499\u5C42 "),
vue.createVNode(vue.Transition, { name: "fade" }, {
default: vue.withCtx(() => [
_ctx.currentStatus(file) ? (vue.openBlock(), vue.createElementBlock("div", {
key: 0,
class: vue.normalizeClass(`${_ctx.prefixCls}-mask`)
}, [
vue.createCommentVNode(" \u52A0\u8F7D\u4E2D "),
file.status === "uploading" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
key: 0,
class: vue.normalizeClass(`${_ctx.prefixCls}-mask__loading`)
}, null, 2)), [
[_directive_ivue_loading, file.status === "uploading"]
]) : vue.createCommentVNode("v-if", true),
vue.createCommentVNode(" \u9519\u8BEF\u56FE\u6807 "),
file.status === "failed" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
!_ctx.failedIcon ? (vue.openBlock(), vue.createBlock(_component_ivue_icon, {
key: 0,
class: vue.normalizeClass(`${_ctx.prefixCls}-mask__icon`)
}, {
default: vue.withCtx(() => [
vue.createTextVNode("cancel")
]),
_: 1
}, 8, ["class"])) : (vue.openBlock(), vue.createElementBlock("i", {
key: 1,
class: vue.normalizeClass([`${_ctx.prefixCls}-mask__icon`, _ctx.failedIcon])
}, null, 2))
], 64)) : vue.createCommentVNode("v-if", true),
vue.createCommentVNode(" \u63CF\u8FF0\u7684\u4FE1\u606F "),
file.message ? (vue.openBlock(), vue.createElementBlock("div", {
key: 2,
class: vue.normalizeClass(`${_ctx.prefixCls}-mask__message`)
}, vue.toDisplayString(file.message), 3)) : vue.createCommentVNode("v-if", true)
], 2)) : vue.createCommentVNode("v-if", true)
]),
_: 2
}, 1024),
vue.createCommentVNode(" \u5220\u9664\u6309\u94AE "),
_ctx.isDeletable(file) ? (vue.openBlock(), vue.createBlock(_component_ivue_icon, {
key: 0,
class: vue.normalizeClass(`${_ctx.prefixCls}-remove`),
onClick: vue.withModifiers(($event) => _ctx.handleRemove(file, index), ["stop"])
}, {
default: vue.withCtx(() => [
vue.createTextVNode("close")
]),
_: 2
}, 1032, ["class", "onClick"])) : vue.createCommentVNode("v-if", true),
vue.createCommentVNode(" \u81EA\u5B9A\u4E49\u8986\u76D6\u5728\u9884\u89C8\u533A\u57DF\u4E0A\u65B9\u7684\u5185\u5BB9 "),
_ctx.$slots["preview-cover"] ? vue.renderSlot(_ctx.$slots, "preview-cover", {
key: 1,
file
}) : vue.createCommentVNode("v-if", true)
], 2)), [
[vue.vShow, _ctx.isImageFile(file)]
]);
}), 128))
], 2);
}
var UploadList = /* @__PURE__ */ _pluginVue_exportHelper["default"](uploadList_vue_vue_type_script_lang["default"], [["render", _sfc_render], ["__file", "D:\\louise\\person\\project\\GitHub\\ivue-ui-plus\\src\\components\\ivue-upload\\upload-list.vue"]]);
exports["default"] = UploadList;
//# sourceMappingURL=upload-list.js.map