11 lines
3.2 KiB
JavaScript
11 lines
3.2 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/form/mg-editor"],{4024:function(t,e,n){"use strict";var o=n("dbc6"),i=n.n(o);i.a},"6b21":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){n.e("components/common/mg-cell").then(function(){return resolve(n("c438"))}.bind(null,n)).catch(n.oe)},i={components:{MgCell:o},props:{title:{type:String,default:""},ft:{type:String,default:""},last:{type:String,default:""},dval:{type:String,default:""},color:"",cname:{type:String,default:""},sname:Object,th:{type:String,default:"300"},max:{type:String,default:""},pr:{type:String,default:""}},data:function(){return{readOnly:!1,editorCtx:{},formats:{}}},computed:{cdval:function(){this.dval&&Object.getOwnPropertyNames(this.editorCtx).length>1&&this.editorCtx.setContents({html:this.dval})}},methods:{readOnlyChange:function(){this.readOnly=!this.readOnly},onEditorReady:function(){var e=this,n=t.createSelectorQuery().in(this);n.select("#editor").context((function(t){console.log(t),e.editorCtx=t.context})).exec()},undo:function(){this.editorCtx.undo()},redo:function(){this.editorCtx.redo()},format:function(t){var e=t.target.dataset,n=e.name,o=e.value;n&&this.editorCtx.format(n,o)},onStatusChange:function(t){var e=t.detail;this.formats=e},insertDivider:function(){this.editorCtx.insertDivider({success:function(){console.log("insert divider success")}})},clear:function(){this.editorCtx.clear({success:function(t){console.log("clear success")}})},removeFormat:function(){this.editorCtx.removeFormat()},insertDate:function(){var t=new Date,e="".concat(t.getFullYear(),"/").concat(t.getMonth()+1,"/").concat(t.getDate());this.editorCtx.insertText({text:e})},insertImage:function(){var e=this;t.chooseImage({count:1,success:function(t){e.editorCtx.insertImage({src:t.tempFilePaths[0]||t.tempFiles[0].path,alt:"图像",success:function(){console.log("insert image success",t)}})}})},editorBlur:function(t){this.$emit("input",t.detail.html)}},created:function(){t.loadFontFace({family:"Pacifico",source:'url("https://sungd.github.io/Pacifico.ttf")'})}};e.default=i}).call(this,n("543d")["default"])},"7ce0":function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return o}));var i=function(){var t=this,e=t.$createElement;t._self._c},c=[]},d088:function(t,e,n){"use strict";n.r(e);var o=n("6b21"),i=n.n(o);for(var c in o)"default"!==c&&function(t){n.d(e,t,(function(){return o[t]}))}(c);e["default"]=i.a},dbc6:function(t,e,n){},ef04:function(t,e,n){"use strict";n.r(e);var o=n("7ce0"),i=n("d088");for(var c in i)"default"!==c&&function(t){n.d(e,t,(function(){return i[t]}))}(c);n("4024");var r,a=n("f0c5"),u=Object(a["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],r);e["default"]=u.exports}}]);
|
|
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
|
'components/form/mg-editor-create-component',
|
|
{
|
|
'components/form/mg-editor-create-component':(function(module, exports, __webpack_require__){
|
|
__webpack_require__('543d')['createComponent'](__webpack_require__("ef04"))
|
|
})
|
|
},
|
|
[['components/form/mg-editor-create-component']]
|
|
]);
|