(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2af40e7b"],{a3df:function(a,e,t){},b3ef:function(a,e,t){"use strict";t("a3df")},d6fd:function(a,e,t){"use strict";t.r(e);var l=function(){var a=this,e=a.$createElement,t=a._self._c||e;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:a.loading,expression:"loading"}]},[t("el-upload",{staticClass:"avatar-uploader",attrs:{action:a.uploadUrl,headers:a.headers,data:a.params,name:a.name,"show-file-list":!1,"on-success":a.handleAvatarSuccess,"before-upload":a.beforeAvatarUpload,"on-remove":a.handleRemove,limit:1}},[a.fellUrl?[a.isVideo?t("video",{staticClass:"video",attrs:{src:a.fellUrl,controls:""}},[t("source",{attrs:{src:a.fellUrl,type:"video/mp4"}})]):t("img",{staticClass:"avatar",attrs:{src:a.fellUrl}})]:t("i",{staticClass:"el-icon-plus avatar-uploader-icon"}),a.fellUrl?t("i",{staticClass:"el-icon-delete avatar-uploader-icon",on:{click:function(e){return e.stopPropagation(),a.handleRemove.apply(null,arguments)}}}):a._e()],2)],1)},i=[],s=(t("ac1f"),t("00b4"),t("5f87")),o={name:"Index",props:{value:{type:String,default:""},name:{type:String,default:"file"}},data:function(){return{loading:!1,params:{},labelWidth:"120px",isVideo:!1,uploadUrl:window.global.baseURL+"upload/uploadVideo",headers:{Authorization:Object(s["a"])()},fellUrl:this.value}},watch:{value:function(a){this.fellUrl=Array.isArray(a)?a[0]:a,this.isVideo=this.isVideoLink(a)}},methods:{isVideoLink:function(a){var e=/\.(mp4|m4v|webm|mov|avi|wmv)$/i;return e.test(a)},handleRemove:function(a,e){this.fellUrl="",this.$emit("input","")},handleAvatarSuccess:function(a,e){0===a.code?(this.fellUrl=a.data.path,this.$emit("input",a.data.path)):this.$message.error(a.msg),this.loading=!1},beforeAvatarUpload:function(a){this.loading=!0}}},n=o,r=(t("b3ef"),t("2877")),d=Object(r["a"])(n,l,i,!1,null,"3e8c5127",null);e["default"]=d.exports}}]);