index-legacy.b63b6b33.js 23 KB

12345
  1. <<<<<<<< HEAD:dist/assets/index-legacy.b63b6b33.js
  2. !function(){function e(e,t,a,n,o,l,r){try{var i=e[l](r),u=i.value}catch(d){return void a(d)}i.done?t(u):Promise.resolve(u).then(n,o)}function t(t){return function(){var a=this,n=arguments;return new Promise((function(o,l){var r=t.apply(a,n);function i(t){e(r,o,l,i,u,"next",t)}function u(t){e(r,o,l,i,u,"throw",t)}i(void 0)}))}}function a(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return n(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var o=document.createElement("style");o.innerHTML="._uploader-section_tym2a_1{display:flex;align-items:center;flex-wrap:wrap;box-sizing:border-box;position:relative}._uploader-section_tym2a_1 ._img-close_tym2a_8{position:absolute;top:.13333rem;right:.32rem;z-index:99;font-size:.34667rem;background-color:rgba(0,0,0,.2);color:#fff;font-weight:700;width:.48rem;height:.48rem;display:flex;justify-content:center;align-items:center;border-radius:50%}._uploader-section_tym2a_1 ._singleImgClose_tym2a_24{right:.13333rem}._uploader-section_tym2a_1 ._uploader_tym2a_1{position:relative}._uploader-section_tym2a_1 ._uploader_tym2a_1._default_tym2a_30 .van-uploader__upload{width:2.61333rem;height:2.50667rem;background-color:#fff}._uploader-section_tym2a_1 ._uploader_tym2a_1._default_tym2a_30 ._previewImg_tym2a_35,._uploader-section_tym2a_1 ._uploader_tym2a_1._default_tym2a_30 ._uploadImg_tym2a_41{width:2.61333rem;height:2.50667rem;border-radius:.26667rem;overflow:hidden}._uploader-section_tym2a_1 ._uploader_tym2a_1 .van-uploader__upload-icon,._uploader-section_tym2a_1 ._uploader_tym2a_1 .van-icon__image{width:100%;height:100%}\n",document.head.appendChild(o),System.register(["./index-legacy.48c8d62c.js","./index-legacy.0e0de364.js","./index-legacy.3a3809b6.js"],(function(e){"use strict";var n,o,l,r,i,u,d,s,c,p,m,f,g,h,b;return{setters:[function(e){n=e.d,o=e.k,l=e.o,r=e.be,i=e.f,u=e.m,d=e.bl,s=e.bv,c=e.bw,p=e.b1,m=e.c,f=e.a5,g=e.F},function(e){h=e.I},function(e){b=e.U}],execute:function(){var y={"uploader-section":"_uploader-section_tym2a_1","img-close":"_img-close_tym2a_8",singleImgClose:"_singleImgClose_tym2a_24",uploader:"_uploader_tym2a_1",default:"_default_tym2a_30",previewImg:"_previewImg_tym2a_35",uploadImg:"_uploadImg_tym2a_41"};e("O",n({name:"col-upload",props:{modelValue:{type:Array,default:function(){return[]}},deletable:{type:Boolean,default:!0},maxCount:{type:Number,default:1},native:{type:Boolean,default:!1},uploadSize:{type:Number,default:5},uploadType:{type:String,default:"IMAGE"},accept:{type:String,default:"image/*"},onUploadChange:{type:Function,default:function(e){}},bucket:{type:String,default:"gyt"},path:{type:String,default:""},uploadIcon:{type:String,default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAAC8CAMAAAAD3rEBAAABWVBMVEUAAADZ2dna2tra2trZ2dna2trZ2dnb29va2trZ2dnc3Nz5+fn5+fn4+Pj4+Pj5+fnb29v////Z2dn29vbi4uLa2trj4+Pq6ur4+Pjg4OD4+PjZ2dk9PT13d3ff39/29vbj4+Px8fHc3Nzu7u6CgoLs7OzX19fq6url5eW8vLypqan09PTPz8+vr6/w8PDLy8u9vb2ZmZn/o3zHx8eJiYnAwMD/pn98fHz/kGiOjo7/qoJ5eXn/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R3fNZUypxf1mFiM9XgASJFTwlY3ZxPGGUrqbYTR0C3nMGKbKMW92jwTT4CZlnKEjJpO7Zj395hXVDudNlWOWwM5kI8QanR0xInKNucjw02PXIz8v6OOdVI6x3BVgwNcpt0OPyJSb/y08ORckWQbMZ2Mqf9LsmWcHhGZJL2Oktx2wapSnUijmLPotF+5x2jCBRqmt+Pl0TNX3mT0eGhQxOS0EFm2SEvRJWEUzMSeRIxfkkMkNXaS/LmZoP+TexZA14rApNTO4rBrIf8OGm515ppweVRdTqWDaowvdgZPFfAaUMkddMRvBiQR9LouHdMWeMlViKlHH1DGqqmNUVcf8ae/eVhsEoigML8+nNIe2aWEv0IwlKAg+je//LI2lND3Sy+wZ9nc5V/6owwwKo5V909TLYrSyGJ3s71mtLEYri9HKYrSyGK0sRivbaeplMVpZjE6h7TQjhnGgtnSMkHCSIExMcAzhQP2V4z0yBvLSnJmFc3D7yAIlewlCzxJIOUsAZqYAcgaxbj4xB1BFIcxnjlGFi5iLeO+lj7GqkwDujDzUeLOTAOzwbive2+JDI+LxctNN0uDq0HTtIJ4a2DYHfPZELl7OA24hY3yzT8hl9uxh6+YTmezxQx1HZD+enS9Bbhh7Mopr/KbKU16Mshp5NagcaUmmeYU/lUV2fN7c/kL/H9ncPWZFiS9eAXzYxwpg8+k+AAAAAElFTkSuQmCC"},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1}},methods:{nativeUpload:function(){var e=this;if(!this.disabled){var t="VIDEO"===this.uploadType?"video":"img";o({api:"chooseFile",content:{type:t,max:1,bucket:this.bucket,path:this.path}},(function(t){console.log(t,"fileUrl"),e.maxCount>1?(e.$emit("update:modelValue",[].concat(a(e.modelValue),[t.fileUrl])),e.onUploadChange([].concat(a(e.modelValue),[t.fileUrl]))):(e.$emit("update:modelValue",[t.fileUrl]),e.onUploadChange([t.fileUrl]))}))}},beforeRead:function(e){return console.log(e,"beforeRead"),!!(e.size/1024/1024<this.uploadSize)||(l("上传文件大小不能超过 ".concat(this.uploadSize,"MB")),!1)},beforeDelete:function(e,t){return!0},afterRead:function(e,a){var n=this;return t(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.status="uploading",e.message="上传中...",t.next=5,n.uploadFile(e.file);case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),r();case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},onClose:function(e,t){var a=this.modelValue,n=a.findIndex((function(e){return e==t}));n>-1&&(a.splice(n,1),this.$emit("update:modelValue",a),this.onUploadChange()),e.stopPropagation()},getFile:function(e){var a=this;return t(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.uploadFile(e);case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),t,null,[[0,5]])})))()},uploadFile:function(e){var n=this;return t(regeneratorRuntime.mark((function t(){var o,l,p,m,f,g,h,b,y;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,"SCHOOL"===i.platformType?i.platformApi="/api-school":"TEACHER"===i.platformType?i.platformApi="/api-teacher":"STUDENT"===i.platformType&&(i.platformApi="/api-student"),o=i.platformApi+"/open/getUploadSign",l=e.name||"",p=n.path+"/"+(l&&l.replace(/ /gi,"_")),m=(new Date).getTime()+p,console.log(e),t.next=9,u.post(o,{data:{filename:p,bucketName:n.bucket,postData:{filename:p,acl:"public-read",key:m,unknowValueField:[]}}});case 9:for(b in f=t.sent,d({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0}),g={policy:f.data.policy,signature:f.data.signature,key:m,KSSAccessKeyId:f.data.kssAccessKeyId,acl:"public-read",name:p},h=new FormData,g)h.append(b,g[b]);return h.append("file",e,p),t.next=17,s(c(n.bucket),{method:"POST",data:h});case 17:console.log(c(n.bucket)+m),y=c(n.bucket)+m,r(),n.maxCount>1?(n.$emit("update:modelValue",[].concat(a(n.modelValue),[y])),n.onUploadChange([].concat(a(n.modelValue),[y]))):(n.$emit("update:modelValue",[y]),n.onUploadChange([y])),t.next=26;break;case 23:t.prev=23,t.t0=t.catch(0),console.log(t.t0,"uploadFile");case 26:case"end":return t.stop()}}),t,null,[[0,23]])})))()}},render:function(){var e=this;return p((function(){return e.modelValue})),m("div",{class:y["uploader-section"]},[this.modelValue.length>0&&this.maxCount>1&&this.modelValue.map((function(t){return m("div",{class:[y.uploader,y[e.size]]},[e.deletable&&!e.disabled&&m(f,{name:"cross",onClick:function(a){return e.onClose(a,t)},class:y["img-close"]},null),m("div",{class:["van-uploader__upload"]},["IMAGE"===e.uploadType?m(h,{src:t,class:y.previewImg,fit:"cover"},null):m("video",{ref:"videoUpload",style:{backgroundColor:"#F8F8F8"},class:y.previewImg,src:t+"#t=1,4"},null)])])})),this.native?this.maxCount>1?m("div",{class:[y.uploader,y[this.size]],onClick:this.nativeUpload},[m(f,{name:this.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]):m("div",{class:[y.uploader,y[this.size]],onClick:this.nativeUpload},[this.modelValue.length>0?m("div",{class:["van-uploader__upload"]},[this.modelValue.map((function(t){return m(g,null,[e.deletable&&!e.disabled&&m(f,{name:"cross",onClick:function(a){return e.onClose(a,t)},class:[y["img-close"],y.singleImgClose]},null),"IMAGE"===e.uploadType?m(h,{fit:"cover",position:"center",class:y.uploadImg,src:t},null):m("video",{ref:"videoUpload",class:y.uploadImg,style:{backgroundColor:"#F8F8F8"},src:t+"#t=1,4"},null)])}))]):m(f,{name:this.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]):this.maxCount>1?m(b,{class:[y.uploader,y[this.size]],afterRead:this.afterRead,beforeRead:this.beforeRead,beforeDelete:this.beforeDelete,uploadIcon:this.uploadIcon,disabled:this.modelValue.length===this.maxCount||this.disabled,accept:this.accept},null):m(b,{class:[y.uploader,y[this.size]],afterRead:this.afterRead,beforeRead:this.beforeRead,beforeDelete:this.beforeDelete,uploadIcon:this.uploadIcon,accept:this.accept,disabled:this.disabled},{default:function(){return[e.modelValue.length>0?m("div",{class:["van-uploader__upload"]},[e.modelValue.map((function(t){return m(g,null,[e.deletable&&!e.disabled&&m(f,{name:"cross",onClick:function(a){return e.onClose(a,t)},class:[y["img-close"],y.singleImgClose]},null),"IMAGE"===e.uploadType?m(h,{fit:"cover",position:"center",class:y.uploadImg,src:t},null):m("video",{ref:"videoUpload",class:y.uploadImg,style:{backgroundColor:"#F8F8F8"},src:t+"#t=1,4"},null)])}))]):m(f,{name:e.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]}})])}}))}}}))}();
  3. ========
  4. !function(){function e(e,t,a,n,o,l,r){try{var i=e[l](r),u=i.value}catch(d){return void a(d)}i.done?t(u):Promise.resolve(u).then(n,o)}function t(t){return function(){var a=this,n=arguments;return new Promise((function(o,l){var r=t.apply(a,n);function i(t){e(r,o,l,i,u,"next",t)}function u(t){e(r,o,l,i,u,"throw",t)}i(void 0)}))}}function a(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return n(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var o=document.createElement("style");o.innerHTML="._uploader-section_tym2a_1{display:flex;align-items:center;flex-wrap:wrap;box-sizing:border-box;position:relative}._uploader-section_tym2a_1 ._img-close_tym2a_8{position:absolute;top:.13333rem;right:.32rem;z-index:99;font-size:.34667rem;background-color:rgba(0,0,0,.2);color:#fff;font-weight:700;width:.48rem;height:.48rem;display:flex;justify-content:center;align-items:center;border-radius:50%}._uploader-section_tym2a_1 ._singleImgClose_tym2a_24{right:.13333rem}._uploader-section_tym2a_1 ._uploader_tym2a_1{position:relative}._uploader-section_tym2a_1 ._uploader_tym2a_1._default_tym2a_30 .van-uploader__upload{width:2.61333rem;height:2.50667rem;background-color:#fff}._uploader-section_tym2a_1 ._uploader_tym2a_1._default_tym2a_30 ._previewImg_tym2a_35,._uploader-section_tym2a_1 ._uploader_tym2a_1._default_tym2a_30 ._uploadImg_tym2a_41{width:2.61333rem;height:2.50667rem;border-radius:.26667rem;overflow:hidden}._uploader-section_tym2a_1 ._uploader_tym2a_1 .van-uploader__upload-icon,._uploader-section_tym2a_1 ._uploader_tym2a_1 .van-icon__image{width:100%;height:100%}\n",document.head.appendChild(o),System.register(["./index-legacy.c1f63540.js","./index-legacy.45d07924.js","./index-legacy.cd65292c.js"],(function(e){"use strict";var n,o,l,r,i,u,d,s,c,p,m,f,g,h,b;return{setters:[function(e){n=e.d,o=e.e,l=e.o,r=e.bj,i=e.g,u=e.m,d=e.bp,s=e.bz,c=e.bA,p=e.b4,m=e.c,f=e.a5,g=e.F},function(e){h=e.I},function(e){b=e.U}],execute:function(){var y={"uploader-section":"_uploader-section_tym2a_1","img-close":"_img-close_tym2a_8",singleImgClose:"_singleImgClose_tym2a_24",uploader:"_uploader_tym2a_1",default:"_default_tym2a_30",previewImg:"_previewImg_tym2a_35",uploadImg:"_uploadImg_tym2a_41"};e("O",n({name:"col-upload",props:{modelValue:{type:Array,default:function(){return[]}},deletable:{type:Boolean,default:!0},maxCount:{type:Number,default:1},native:{type:Boolean,default:!1},uploadSize:{type:Number,default:5},uploadType:{type:String,default:"IMAGE"},accept:{type:String,default:"image/*"},onUploadChange:{type:Function,default:function(e){}},bucket:{type:String,default:"gyt"},path:{type:String,default:""},uploadIcon:{type:String,default:"data:image/png;base64,iVBORw0KGgoAA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Jm/BYitMsYbSnvs5OfpBTGrVq5DKRYCLdYWunzSLsgYWxyjDyfGZEPUjoDIozLmhveCmNInpfYQMU3c4JdL8/HISJgf3S5dxCT9K5sXxBiDnEaCi/USLetDiDH+yO1kzMDzPB+Mgn6B3VwzkiLXDIt543xVN/mK6PECYKBQxKwxUy2GxkM6x3zi8GUMb2T8MibGy18HvovpUB6z5M6XMTFlwqLAAtcuMCViKI/pAVEh+WtMB1cs+r7iSbP6mOOyYGCUxSzk0ixi+DxTnmYm/EUhfjrmR3fNZUypxf1mFiM9XgASJFTwlY3ZxPGGUrqbYTR0C3nMGKbKMW92jwTT4CZlnKEjJpO7Zj395hXVDudNlWOWwM5kI8QanR0xInKNucjw02PXIz8v6OOdVI6x3BVgwNcpt0OPyJSb/y08ORckWQbMZ2Mqf9LsmWcHhGZJL2Oktx2wapSnUijmLPotF+5x2jCBRqmt+Pl0TNX3mT0eGhQxOS0EFm2SEvRJWEUzMSeRIxfkkMkNXaS/LmZoP+TexZA14rApNTO4rBrIf8OGm515ppweVRdTqWDaowvdgZPFfAaUMkddMRvBiQR9LouHdMWeMlViKlHH1DGqqmNUVcf8ae/eVhsEoigML8+nNIe2aWEv0IwlKAg+je//LI2lND3Sy+wZ9nc5V/6owwwKo5V909TLYrSyGJ3s71mtLEYri9HKYrSyGK0sRivbaeplMVpZjE6h7TQjhnGgtnSMkHCSIExMcAzhQP2V4z0yBvLSnJmFc3D7yAIlewlCzxJIOUsAZqYAcgaxbj4xB1BFIcxnjlGFi5iLeO+lj7GqkwDujDzUeLOTAOzwbive2+JDI+LxctNN0uDq0HTtIJ4a2DYHfPZELl7OA24hY3yzT8hl9uxh6+YTmezxQx1HZD+enS9Bbhh7Mopr/KbKU16Mshp5NagcaUmmeYU/lUV2fN7c/kL/H9ncPWZFiS9eAXzYxwpg8+k+AAAAAElFTkSuQmCC"},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1}},methods:{nativeUpload:function(){var e=this;if(!this.disabled){var t="VIDEO"===this.uploadType?"video":"img";o({api:"chooseFile",content:{type:t,max:1,bucket:this.bucket,path:this.path}},(function(t){console.log(t,"fileUrl"),e.maxCount>1?(e.$emit("update:modelValue",[].concat(a(e.modelValue),[t.fileUrl])),e.onUploadChange([].concat(a(e.modelValue),[t.fileUrl]))):(e.$emit("update:modelValue",[t.fileUrl]),e.onUploadChange([t.fileUrl]))}))}},beforeRead:function(e){return console.log(e,"beforeRead"),!!(e.size/1024/1024<this.uploadSize)||(l("上传文件大小不能超过 ".concat(this.uploadSize,"MB")),!1)},beforeDelete:function(e,t){return!0},afterRead:function(e,a){var n=this;return t(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.status="uploading",e.message="上传中...",t.next=5,n.uploadFile(e.file);case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),r();case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},onClose:function(e,t){var a=this.modelValue,n=a.findIndex((function(e){return e==t}));n>-1&&(a.splice(n,1),this.$emit("update:modelValue",a),this.onUploadChange()),e.stopPropagation()},getFile:function(e){var a=this;return t(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.uploadFile(e);case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),t,null,[[0,5]])})))()},uploadFile:function(e){var n=this;return t(regeneratorRuntime.mark((function t(){var o,l,p,m,f,g,h,b,y;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,"SCHOOL"===i.platformType?i.platformApi="/api-school":"TEACHER"===i.platformType?i.platformApi="/api-teacher":"STUDENT"===i.platformType&&(i.platformApi="/api-student"),o=i.platformApi+"/open/getUploadSign",l=e.name||"",p=n.path+"/"+(l&&l.replace(/ /gi,"_")),m=(new Date).getTime()+p,console.log(e),t.next=9,u.post(o,{data:{filename:p,bucketName:n.bucket,postData:{filename:p,acl:"public-read",key:m,unknowValueField:[]}}});case 9:for(b in f=t.sent,d({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0}),g={policy:f.data.policy,signature:f.data.signature,key:m,KSSAccessKeyId:f.data.kssAccessKeyId,acl:"public-read",name:p},h=new FormData,g)h.append(b,g[b]);return h.append("file",e,p),t.next=17,s(c(n.bucket),{method:"POST",data:h});case 17:console.log(c(n.bucket)+m),y=c(n.bucket)+m,r(),n.maxCount>1?(n.$emit("update:modelValue",[].concat(a(n.modelValue),[y])),n.onUploadChange([].concat(a(n.modelValue),[y]))):(n.$emit("update:modelValue",[y]),n.onUploadChange([y])),t.next=26;break;case 23:t.prev=23,t.t0=t.catch(0),console.log(t.t0,"uploadFile");case 26:case"end":return t.stop()}}),t,null,[[0,23]])})))()}},render:function(){var e=this;return p((function(){return e.modelValue})),m("div",{class:y["uploader-section"]},[this.modelValue.length>0&&this.maxCount>1&&this.modelValue.map((function(t){return m("div",{class:[y.uploader,y[e.size]]},[e.deletable&&!e.disabled&&m(f,{name:"cross",onClick:function(a){return e.onClose(a,t)},class:y["img-close"]},null),m("div",{class:["van-uploader__upload"]},["IMAGE"===e.uploadType?m(h,{src:t,class:y.previewImg,fit:"cover"},null):m("video",{ref:"videoUpload",style:{backgroundColor:"#F8F8F8"},class:y.previewImg,src:t+"#t=1,4"},null)])])})),this.native?this.maxCount>1?m("div",{class:[y.uploader,y[this.size]],onClick:this.nativeUpload},[m(f,{name:this.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]):m("div",{class:[y.uploader,y[this.size]],onClick:this.nativeUpload},[this.modelValue.length>0?m("div",{class:["van-uploader__upload"]},[this.modelValue.map((function(t){return m(g,null,[e.deletable&&!e.disabled&&m(f,{name:"cross",onClick:function(a){return e.onClose(a,t)},class:[y["img-close"],y.singleImgClose]},null),"IMAGE"===e.uploadType?m(h,{fit:"cover",position:"center",class:y.uploadImg,src:t},null):m("video",{ref:"videoUpload",class:y.uploadImg,style:{backgroundColor:"#F8F8F8"},src:t+"#t=1,4"},null)])}))]):m(f,{name:this.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]):this.maxCount>1?m(b,{class:[y.uploader,y[this.size]],afterRead:this.afterRead,beforeRead:this.beforeRead,beforeDelete:this.beforeDelete,uploadIcon:this.uploadIcon,disabled:this.modelValue.length===this.maxCount||this.disabled,accept:this.accept},null):m(b,{class:[y.uploader,y[this.size]],afterRead:this.afterRead,beforeRead:this.beforeRead,beforeDelete:this.beforeDelete,uploadIcon:this.uploadIcon,accept:this.accept,disabled:this.disabled},{default:function(){return[e.modelValue.length>0?m("div",{class:["van-uploader__upload"]},[e.modelValue.map((function(t){return m(g,null,[e.deletable&&!e.disabled&&m(f,{name:"cross",onClick:function(a){return e.onClose(a,t)},class:[y["img-close"],y.singleImgClose]},null),"IMAGE"===e.uploadType?m(h,{fit:"cover",position:"center",class:y.uploadImg,src:t},null):m("video",{ref:"videoUpload",class:y.uploadImg,style:{backgroundColor:"#F8F8F8"},src:t+"#t=1,4"},null)])}))]):m(f,{name:e.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]}})])}}))}}}))}();
  5. >>>>>>>> online:dist/assets/index-legacy.dd0eceb6.js