-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path75.js
1 lines (1 loc) · 2.29 KB
/
75.js
1
webpackJsonp([75],{351:function(t,e,a){"use strict";function i(t){a(882)}Object.defineProperty(e,"__esModule",{value:!0});var n=a(573),r=a(789),s=a(73),l=i,c=s(n.a,r.a,!1,l,"data-v-5e6a2a70",null);e.default=c.exports},573:function(t,e,a){"use strict";var i=void 0;e.a={name:"OnlineImgToBase64",data:function(){return{base64Str:"",currentFile:"",attachmentFileList:[],textarea1:"",textarea2:""}},created:function(){i=this},methods:{uploadFile:function(t){this.currentFile=t.file},handleRemove:function(t,e){console.log(t,e)},base64ToImg:function(){this.base64Str=this.textarea2},imgToBase64:function(){if(this.currentFile){var t=this.currentFile,e=new FileReader;e.onload=function(t){var e=t.target.result;i.textarea2=e},e.readAsDataURL(t)}},clear:function(){this.currentFile="",this.attachmentFileList=[],this.base64Str="",this.textarea2=""}}}},685:function(t,e,a){e=t.exports=a(7)(void 0),e.push([t.i,"",""])},789:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticStyle:{display:"flex"}},[a("el-upload",{ref:"attachmentId",attrs:{action:"#",limit:1,"file-list":t.attachmentFileList,"http-request":t.uploadFile,"on-remove":t.handleRemove,"list-type":"picture-card"}},[a("i",{staticClass:"el-icon-plus"})]),t._v(" "),t.base64Str?a("div",{staticStyle:{"margin-left":"100px",display:"flex","align-items":"center"}},[a("p",[t._v("预览图片:")]),t._v(" "),a("div",{staticStyle:{height:"147px",width:"147px",background:"#ffffff"}},[a("img",{attrs:{src:t.base64Str,alt:"",width:"100%",height:"100%"}})])]):t._e()],1),t._v(" "),a("div",{staticStyle:{margin:"10px",display:"flex","justify-content":"center","align-items":"center"}},[a("el-button",{attrs:{type:"primary"},on:{click:t.imgToBase64}},[t._v("图片转base64")]),t._v(" "),a("el-button",{attrs:{type:"success"},on:{click:t.base64ToImg}},[t._v("base64转图片")]),t._v(" "),a("el-button",{attrs:{type:"danger"},on:{click:t.clear}},[t._v("清除内容")])],1),t._v(" "),a("div",[a("el-input",{attrs:{type:"textarea",rows:20,placeholder:"结果......"},model:{value:t.textarea2,callback:function(e){t.textarea2=e},expression:"textarea2"}})],1)])},n=[],r={render:i,staticRenderFns:n};e.a=r},882:function(t,e,a){var i=a(685);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);a(74)("97dcf478",i,!0,{})}});