@form-create/component-elm-upload
Advanced tools
Comparing version 3.2.6 to 3.2.7
/*! | ||
* @form-create/component-elm-upload v3.2.6 | ||
* @form-create/component-elm-upload v3.2.7 | ||
* (c) 2018-2024 xaboy | ||
@@ -156,2 +156,3 @@ * Github https://github.com/xaboy/form-create with upload | ||
modalTitle: String, | ||
listType: String, | ||
modelValue: [Array, String] | ||
@@ -180,3 +181,3 @@ }, | ||
} else { | ||
if ('text' === this.$attrs.listType) { | ||
if ('text' === this.listType) { | ||
window.open(file.url); | ||
@@ -221,5 +222,5 @@ } else { | ||
}, [createVNode(resolveComponent("ElUpload"), mergeProps({ | ||
"key": len, | ||
"list-type": "picture-card" | ||
"key": len | ||
}, this.$attrs, { | ||
"list-type": this.listType || 'picture-card', | ||
"class": { | ||
@@ -235,3 +236,3 @@ '_fc-exceed': this.$attrs.limit ? this.$attrs.limit <= len : false | ||
"default": function _default() { | ||
return [(_this$$slots$default = (_this$$slots = _this.$slots)["default"]) !== null && _this$$slots$default !== void 0 && _this$$slots$default.call(_this$$slots) || ['text', 'picture'].indexOf(_this.$attrs.listType) === -1 ? createVNode(resolveComponent("ElIcon"), null, { | ||
return [(_this$$slots$default = (_this$$slots = _this.$slots)["default"]) !== null && _this$$slots$default !== void 0 && _this$$slots$default.call(_this$$slots) || ['text', 'picture'].indexOf(_this.listType) === -1 ? createVNode(resolveComponent("ElIcon"), null, { | ||
"default": function _default() { | ||
@@ -238,0 +239,0 @@ return [createVNode(script, null, null)]; |
/*! | ||
* @form-create/component-elm-upload v3.2.6 | ||
* @form-create/component-elm-upload v3.2.7 | ||
* (c) 2018-2024 xaboy | ||
@@ -7,2 +7,2 @@ * Github https://github.com/xaboy/form-create with upload | ||
*/ | ||
import{openBlock as e,createElementBlock as t,createElementVNode as i,defineComponent as n,createVNode as r,resolveComponent as l,mergeProps as o,createTextVNode as a}from"vue";function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function c(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function d(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}");var p={name:"IconUpload"},f={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},h=[i("path",{fill:"currentColor",d:"M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"},null,-1)];function m(e,t){return{url:e,name:v(e),uid:t}}function v(e){return(""+e).split("/").pop()}p.render=function(i,n,r,l,o,a){return e(),t("svg",f,h)};var y=n({name:"fcUpload",inheritAttrs:!1,formCreateParser:{toFormValue:function(e){return d(e)},toValue:function(e,t){return 1===t.prop.props.limit?e[0]||"":e}},props:{previewMask:void 0,onPreview:Function,modalTitle:String,modelValue:[Array,String]},emits:["update:modelValue","change","remove","fc.el"],data:function(){return{previewVisible:!1,previewImage:"",fileList:[]}},created:function(){this.fileList=d(this.modelValue).map(m)},watch:{modelValue:function(e){this.fileList=d(e).map(m)}},methods:{handlePreview:function(e){this.onPreview?this.onPreview.apply(this,arguments):"text"===this.$attrs.listType?window.open(e.url):(this.previewImage=e.url,this.previewVisible=!0)},update:function(e){var t=e.map((function(e){return e.url})).filter((function(e){return void 0!==e}));this.$emit("update:modelValue",t)},handleCancel:function(){this.previewVisible=!1},handleChange:function(e,t){this.$emit.apply(this,["change"].concat(Array.prototype.slice.call(arguments))),"success"===e.status&&this.update(t)},handleRemove:function(e,t){this.$emit.apply(this,["remove"].concat(Array.prototype.slice.call(arguments))),this.update(t)}},render:function(){var e,t,i,n,s=this,c=d(this.modelValue).length;return r("div",{class:"_fc-upload"},[r(l("ElUpload"),o({key:c,"list-type":"picture-card"},this.$attrs,{class:{"_fc-exceed":!!this.$attrs.limit&&this.$attrs.limit<=c},onPreview:this.handlePreview,onChange:this.handleChange,onRemove:this.handleRemove,fileList:this.fileList,ref:"upload"}),u({default:function(){return[null!==(e=(t=s.$slots).default)&&void 0!==e&&e.call(t)||-1===["text","picture"].indexOf(s.$attrs.listType)?r(l("ElIcon"),null,{default:function(){return[r(p,null,null)]}}):r(l("ElButton"),{type:"primary"},{default:function(){return[a("点击上传")]}})]}},(i=this.$slots,n=["default"],Object.keys(i).reduce((function(e,t){return n&&-1!==n.indexOf(t)||e.push(i[t]),e}),[])))),r(l("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:this.modalTitle,modelValue:this.previewVisible,onClose:this.handleCancel},{default:function(){return[r("img",{style:"width: 100%",src:s.previewImage},null)]}})])},mounted:function(){this.$emit("fc.el",this.$refs.upload)}});export{y as default}; | ||
import{openBlock as e,createElementBlock as t,createElementVNode as i,defineComponent as n,createVNode as r,resolveComponent as l,mergeProps as o,createTextVNode as a}from"vue";function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function u(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function c(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function d(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}");var p={name:"IconUpload"},f={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},h=[i("path",{fill:"currentColor",d:"M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"},null,-1)];function m(e,t){return{url:e,name:v(e),uid:t}}function v(e){return(""+e).split("/").pop()}p.render=function(i,n,r,l,o,a){return e(),t("svg",f,h)};var y=n({name:"fcUpload",inheritAttrs:!1,formCreateParser:{toFormValue:function(e){return d(e)},toValue:function(e,t){return 1===t.prop.props.limit?e[0]||"":e}},props:{previewMask:void 0,onPreview:Function,modalTitle:String,listType:String,modelValue:[Array,String]},emits:["update:modelValue","change","remove","fc.el"],data:function(){return{previewVisible:!1,previewImage:"",fileList:[]}},created:function(){this.fileList=d(this.modelValue).map(m)},watch:{modelValue:function(e){this.fileList=d(e).map(m)}},methods:{handlePreview:function(e){this.onPreview?this.onPreview.apply(this,arguments):"text"===this.listType?window.open(e.url):(this.previewImage=e.url,this.previewVisible=!0)},update:function(e){var t=e.map((function(e){return e.url})).filter((function(e){return void 0!==e}));this.$emit("update:modelValue",t)},handleCancel:function(){this.previewVisible=!1},handleChange:function(e,t){this.$emit.apply(this,["change"].concat(Array.prototype.slice.call(arguments))),"success"===e.status&&this.update(t)},handleRemove:function(e,t){this.$emit.apply(this,["remove"].concat(Array.prototype.slice.call(arguments))),this.update(t)}},render:function(){var e,t,i,n,s=this,c=d(this.modelValue).length;return r("div",{class:"_fc-upload"},[r(l("ElUpload"),o({key:c},this.$attrs,{"list-type":this.listType||"picture-card",class:{"_fc-exceed":!!this.$attrs.limit&&this.$attrs.limit<=c},onPreview:this.handlePreview,onChange:this.handleChange,onRemove:this.handleRemove,fileList:this.fileList,ref:"upload"}),u({default:function(){return[null!==(e=(t=s.$slots).default)&&void 0!==e&&e.call(t)||-1===["text","picture"].indexOf(s.listType)?r(l("ElIcon"),null,{default:function(){return[r(p,null,null)]}}):r(l("ElButton"),{type:"primary"},{default:function(){return[a("点击上传")]}})]}},(i=this.$slots,n=["default"],Object.keys(i).reduce((function(e,t){return n&&-1!==n.indexOf(t)||e.push(i[t]),e}),[])))),r(l("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:this.modalTitle,modelValue:this.previewVisible,onClose:this.handleCancel},{default:function(){return[r("img",{style:"width: 100%",src:s.previewImage},null)]}})])},mounted:function(){this.$emit("fc.el",this.$refs.upload)}});export{y as default}; |
/*! | ||
* @form-create/component-elm-upload v3.2.6 | ||
* @form-create/component-elm-upload v3.2.7 | ||
* (c) 2018-2024 xaboy | ||
@@ -160,2 +160,3 @@ * Github https://github.com/xaboy/form-create with upload | ||
modalTitle: String, | ||
listType: String, | ||
modelValue: [Array, String] | ||
@@ -184,3 +185,3 @@ }, | ||
} else { | ||
if ('text' === this.$attrs.listType) { | ||
if ('text' === this.listType) { | ||
window.open(file.url); | ||
@@ -225,5 +226,5 @@ } else { | ||
}, [vue.createVNode(vue.resolveComponent("ElUpload"), vue.mergeProps({ | ||
"key": len, | ||
"list-type": "picture-card" | ||
"key": len | ||
}, this.$attrs, { | ||
"list-type": this.listType || 'picture-card', | ||
"class": { | ||
@@ -239,3 +240,3 @@ '_fc-exceed': this.$attrs.limit ? this.$attrs.limit <= len : false | ||
"default": function _default() { | ||
return [(_this$$slots$default = (_this$$slots = _this.$slots)["default"]) !== null && _this$$slots$default !== void 0 && _this$$slots$default.call(_this$$slots) || ['text', 'picture'].indexOf(_this.$attrs.listType) === -1 ? vue.createVNode(vue.resolveComponent("ElIcon"), null, { | ||
return [(_this$$slots$default = (_this$$slots = _this.$slots)["default"]) !== null && _this$$slots$default !== void 0 && _this$$slots$default.call(_this$$slots) || ['text', 'picture'].indexOf(_this.listType) === -1 ? vue.createVNode(vue.resolveComponent("ElIcon"), null, { | ||
"default": function _default() { | ||
@@ -242,0 +243,0 @@ return [vue.createVNode(script, null, null)]; |
/*! | ||
* @form-create/component-elm-upload v3.2.6 | ||
* @form-create/component-elm-upload v3.2.7 | ||
* (c) 2018-2024 xaboy | ||
@@ -7,2 +7,2 @@ * Github https://github.com/xaboy/form-create with upload | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).FcUpload={},e.Vue)}(this,(function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}");var l={name:"IconUpload"},a={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},s=[t.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"},null,-1)];function u(e,t){return{url:e,name:c(e),uid:t}}function c(e){return(""+e).split("/").pop()}l.render=function(e,n,i,r,o,l){return t.openBlock(),t.createElementBlock("svg",a,s)};var d=t.defineComponent({name:"fcUpload",inheritAttrs:!1,formCreateParser:{toFormValue:function(e){return o(e)},toValue:function(e,t){return 1===t.prop.props.limit?e[0]||"":e}},props:{previewMask:void 0,onPreview:Function,modalTitle:String,modelValue:[Array,String]},emits:["update:modelValue","change","remove","fc.el"],data:function(){return{previewVisible:!1,previewImage:"",fileList:[]}},created:function(){this.fileList=o(this.modelValue).map(u)},watch:{modelValue:function(e){this.fileList=o(e).map(u)}},methods:{handlePreview:function(e){this.onPreview?this.onPreview.apply(this,arguments):"text"===this.$attrs.listType?window.open(e.url):(this.previewImage=e.url,this.previewVisible=!0)},update:function(e){var t=e.map((function(e){return e.url})).filter((function(e){return void 0!==e}));this.$emit("update:modelValue",t)},handleCancel:function(){this.previewVisible=!1},handleChange:function(e,t){this.$emit.apply(this,["change"].concat(Array.prototype.slice.call(arguments))),"success"===e.status&&this.update(t)},handleRemove:function(e,t){this.$emit.apply(this,["remove"].concat(Array.prototype.slice.call(arguments))),this.update(t)}},render:function(){var e,n,r,a,s=this,u=o(this.modelValue).length;return t.createVNode("div",{class:"_fc-upload"},[t.createVNode(t.resolveComponent("ElUpload"),t.mergeProps({key:u,"list-type":"picture-card"},this.$attrs,{class:{"_fc-exceed":!!this.$attrs.limit&&this.$attrs.limit<=u},onPreview:this.handlePreview,onChange:this.handleChange,onRemove:this.handleRemove,fileList:this.fileList,ref:"upload"}),i({default:function(){return[null!==(e=(n=s.$slots).default)&&void 0!==e&&e.call(n)||-1===["text","picture"].indexOf(s.$attrs.listType)?t.createVNode(t.resolveComponent("ElIcon"),null,{default:function(){return[t.createVNode(l,null,null)]}}):t.createVNode(t.resolveComponent("ElButton"),{type:"primary"},{default:function(){return[t.createTextVNode("点击上传")]}})]}},(r=this.$slots,a=["default"],Object.keys(r).reduce((function(e,t){return a&&-1!==a.indexOf(t)||e.push(r[t]),e}),[])))),t.createVNode(t.resolveComponent("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:this.modalTitle,modelValue:this.previewVisible,onClose:this.handleCancel},{default:function(){return[t.createVNode("img",{style:"width: 100%",src:s.previewImage},null)]}})])},mounted:function(){this.$emit("fc.el",this.$refs.upload)}});e.default=d,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).FcUpload={},e.Vue)}(this,(function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}");var l={name:"IconUpload"},a={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},s=[t.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"},null,-1)];function u(e,t){return{url:e,name:c(e),uid:t}}function c(e){return(""+e).split("/").pop()}l.render=function(e,n,i,r,o,l){return t.openBlock(),t.createElementBlock("svg",a,s)};var d=t.defineComponent({name:"fcUpload",inheritAttrs:!1,formCreateParser:{toFormValue:function(e){return o(e)},toValue:function(e,t){return 1===t.prop.props.limit?e[0]||"":e}},props:{previewMask:void 0,onPreview:Function,modalTitle:String,listType:String,modelValue:[Array,String]},emits:["update:modelValue","change","remove","fc.el"],data:function(){return{previewVisible:!1,previewImage:"",fileList:[]}},created:function(){this.fileList=o(this.modelValue).map(u)},watch:{modelValue:function(e){this.fileList=o(e).map(u)}},methods:{handlePreview:function(e){this.onPreview?this.onPreview.apply(this,arguments):"text"===this.listType?window.open(e.url):(this.previewImage=e.url,this.previewVisible=!0)},update:function(e){var t=e.map((function(e){return e.url})).filter((function(e){return void 0!==e}));this.$emit("update:modelValue",t)},handleCancel:function(){this.previewVisible=!1},handleChange:function(e,t){this.$emit.apply(this,["change"].concat(Array.prototype.slice.call(arguments))),"success"===e.status&&this.update(t)},handleRemove:function(e,t){this.$emit.apply(this,["remove"].concat(Array.prototype.slice.call(arguments))),this.update(t)}},render:function(){var e,n,r,a,s=this,u=o(this.modelValue).length;return t.createVNode("div",{class:"_fc-upload"},[t.createVNode(t.resolveComponent("ElUpload"),t.mergeProps({key:u},this.$attrs,{"list-type":this.listType||"picture-card",class:{"_fc-exceed":!!this.$attrs.limit&&this.$attrs.limit<=u},onPreview:this.handlePreview,onChange:this.handleChange,onRemove:this.handleRemove,fileList:this.fileList,ref:"upload"}),i({default:function(){return[null!==(e=(n=s.$slots).default)&&void 0!==e&&e.call(n)||-1===["text","picture"].indexOf(s.listType)?t.createVNode(t.resolveComponent("ElIcon"),null,{default:function(){return[t.createVNode(l,null,null)]}}):t.createVNode(t.resolveComponent("ElButton"),{type:"primary"},{default:function(){return[t.createTextVNode("点击上传")]}})]}},(r=this.$slots,a=["default"],Object.keys(r).reduce((function(e,t){return a&&-1!==a.indexOf(t)||e.push(r[t]),e}),[])))),t.createVNode(t.resolveComponent("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:this.modalTitle,modelValue:this.previewVisible,onClose:this.handleCancel},{default:function(){return[t.createVNode("img",{style:"width: 100%",src:s.previewImage},null)]}})])},mounted:function(){this.$emit("fc.el",this.$refs.upload)}});e.default=d,Object.defineProperty(e,"__esModule",{value:!0})})); |
{ | ||
"name": "@form-create/component-elm-upload", | ||
"version": "3.2.6", | ||
"version": "3.2.7", | ||
"description": "@form-create/element-ui 内置组件", | ||
@@ -50,3 +50,3 @@ "main": "./dist/index.min.js", | ||
}, | ||
"gitHead": "cace70431c7090b7ed085cc4dd7d50871ab8e1fd" | ||
"gitHead": "e7f48140aaf46c2a6f5bb8c02ca67eb3eaaf49c6" | ||
} |
@@ -36,2 +36,3 @@ import toArray from '@form-create/utils/lib/toarray'; | ||
modalTitle: String, | ||
listType: String, | ||
modelValue: [Array, String] | ||
@@ -60,3 +61,3 @@ }, | ||
} else { | ||
if ('text' === this.$attrs.listType) { | ||
if ('text' === this.listType) { | ||
window.open(file.url); | ||
@@ -90,3 +91,3 @@ } else { | ||
return ( | ||
<div class="_fc-upload"><ElUpload key={len} list-type="picture-card" {...this.$attrs} | ||
<div class="_fc-upload"><ElUpload key={len} {...this.$attrs} list-type={this.listType || 'picture-card'} | ||
class={{'_fc-exceed': this.$attrs.limit ? this.$attrs.limit <= len : false}} | ||
@@ -98,3 +99,3 @@ onPreview={this.handlePreview} onChange={this.handleChange} | ||
{(this.$slots.default?.() || | ||
['text', 'picture'].indexOf(this.$attrs.listType) === -1 ? <ElIcon> | ||
['text', 'picture'].indexOf(this.listType) === -1 ? <ElIcon> | ||
<IconUpload/> | ||
@@ -101,0 +102,0 @@ </ElIcon> : <ElButton type="primary">点击上传</ElButton> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30956
640