webpackJsonp([58],{AytH:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i("uAC3"),l=i.n(s),n={data:function(){return{visible:!1,url:"",num:0,fileList:[]}},methods:{init:function(){this.url=window.SITE_CONFIG.baseURL+"/sys/oss/upload?token="+l.a.get("token"),this.num=0,this.fileList=[],this.visible=!0},beforeUploadHandle:function(e){if("image/jpg"!==e.type&&"image/jpeg"!==e.type&&"image/png"!==e.type&&"image/gif"!==e.type)return this.$message.error("只支持jpg、png、gif格式的图片！"),!1;this.num++},successHandle:function(e,t,i){var s=this;e&&0===e.code&&(this.fileList=i,this.num--,0===this.num&&this.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){s.visible=!1,s.$emit("refreshDataList")}}))}}},a={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:"上传文件","close-on-click-modal":!1,visible:e.visible},on:{"update:visible":function(t){e.visible=t}}},[i("el-upload",{staticStyle:{"text-align":"center"},attrs:{drag:"",action:e.url,"before-upload":e.beforeUploadHandle,"on-success":e.successHandle,multiple:"","file-list":e.fileList}},[i("i",{staticClass:"el-icon-upload"}),e._v(" "),i("div",{staticClass:"el-upload__text"},[e._v("将文件拖到此处，或"),i("em",[e._v("点击上传")])]),e._v(" "),i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("只支持jpg、png、gif格式的图片！")])])],1)},staticRenderFns:[]},o=i("C7Lr")(n,a,!1,null,null,null);t.default=o.exports}});