(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3dbe5a7a"],{"013c":function(e,t,o){},6122:function(e,t,o){"use strict";o.r(t);var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{staticClass:"toolbar"},[o("Toolbar",{attrs:{defaultConfig:e.toolbarConfig,editor:e.editor,mode:e.mode}})],1),e._v(" "),o("div",{staticClass:"main"},[o("Editor",{staticStyle:{"overflow-y":"hidden","margin-top":"20px"},attrs:{defaultConfig:e.editorConfig,mode:e.mode},on:{onCreated:e.onCreated},model:{value:e.vHtml,callback:function(t){e.vHtml=t},expression:"vHtml"}})],1)])},i=[],a=o("4e15"),r=o("4325"),l=o("c343"),d=o.n(l),c=o("281c"),s=o("21a6"),u=o("e876"),f={name:"fileEdit",props:{url:{type:String,default:""},fid:{type:String,default:""},file:{type:Object,default:function(){return{}}}},components:{Editor:a["a"],Toolbar:a["b"]},data:function(){return{vHtml:"",editor:null,toolbarConfig:{},editorConfig:{MENU_CONF:{},placeholder:"请输入内容..."},mode:"default"}},created:function(){var e=this;e.editorConfig.MENU_CONF["uploadImage"]={customUpload:function(e,t){var o={way:2,relation_type:"",relation_id:0,eid:0};Object(r["a"])(e,1,o).then((function(e){t(e.data.url,"图片上传",e.data.url)}))}},e.toolbarConfig.excludeKeys=["fullScreen","insertVideo","uploadVideo","group-video"]},mounted:function(){var e=this,t=new XMLHttpRequest;t.open("get",this.url,!0),t.responseType="arraybuffer",t.onload=function(){200==t.status&&d.a.convertToHtml({arrayBuffer:new Uint8Array(t.response)}).then((function(t){e.$nextTick((function(){e.vHtml=t.value}))}))},t.send()},methods:{onCreated:function(e){this.editor=Object.seal(e)},wordOption:function(e){var t=this,o=this.vHtml.replace(/<strong>/g,"<b>").replace(/<\/strong>/g,"</b>").replace(/<mark/g,"<span").replace(/<\/mark>/g,"</span>");Object(c["asBlob"])(o).then((function(n){if("export"===e)Object(s["saveAs"])(n,t.file.name+"."+t.file.file_ext);else{var i={content:o,is_file:1};Object(u["d"])(t.fid,t.file.id,i).then((function(e){e.status,t.$emit("closeLoading")}))}}))},beforeDestroy:function(){var e=this.editor;null!=e&&e.destroy()}}},p=f,m=(o("9804"),o("ed06"),o("2877")),b=Object(m["a"])(p,n,i,!1,null,"45c10b6e",null);t["default"]=b.exports},ed06:function(e,t,o){"use strict";o("013c")}}]);