1 line
5.0 KiB
JavaScript
1 line
5.0 KiB
JavaScript
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages2/editCms/titleStyle"],{"554e":function(t,e,o){"use strict";o.r(e);var n=o("e5da"),i=o.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},"5ade":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return r})),o.d(e,"a",(function(){return n}));var n={uniNavBar:function(){return o.e("uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar").then(o.bind(null,"3634"))},zbPopover:function(){return o.e("uni_modules/zb-popover/components/zb-popover/zb-popover").then(o.bind(null,"0b9b"))}},i=function(){var t=this,e=t.$createElement,o=(t._self._c,t.isColor("#000000")),n=t.isColor("#000000"),i=t.isColor("#7a7e83"),r=t.isColor("#7a7e83"),c=t.isColor("#ff0000"),a=t.isColor("#ff0000"),s=t.isColor("#ff9900"),l=t.isColor("#ff9900"),u=t.isColor("#1aad19"),f=t.isColor("#1aad19"),d=t.isColor("#1a73e8"),m=t.isColor("#1a73e8"),v=t.isColor("#cc00cc"),h=t.isColor("#cc00cc");t.$mp.data=Object.assign({},{$root:{m0:o,m1:n,m2:i,m3:r,m4:c,m5:a,m6:s,m7:l,m8:u,m9:f,m10:d,m11:m,m12:v,m13:h}})},r=[]},"5e87":function(t,e,o){"use strict";(function(t,e){var n=o("47a9");o("7bfe"),o("861b");n(o("3240"));var i=n(o("833f"));t.__webpack_require_UNI_MP_PLUGIN__=o,e(i.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},"833f":function(t,e,o){"use strict";o.r(e);var n=o("5ade"),i=o("554e");for(var r in i)["default"].indexOf(r)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(r);o("c965");var c=o("828b"),a=Object(c["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=a.exports},c832:function(t,e,o){},c965:function(t,e,o){"use strict";var n=o("c832"),i=o.n(n);i.a},e5da:function(t,e,o){"use strict";(function(t){var n=o("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(o("7eb4")),r=n(o("ee10")),c={data:function(){return{readOnly:!1,formats:{color:"#000000",fontSize:"28px"},actions:[{text:"标准",value:"28px"},{text:"大",value:"32px"},{text:"超大",value:"36px"}]}},onShow:function(){},onLoad:function(){},methods:{selectFontSizeItme:function(t){console.log(t),this.formats.fontSize=t.value,this.editorCtx.format("fontSize",t.value)},handleFontSizeClick:function(t){this.closeAllPopover("size")},isColor:function(t){return console.log(t,this.formats.color),t===this.formats.color},toSuccess:function(){var e=this;return(0,r.default)(i.default.mark((function o(){var n,c;return i.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:n=e,c=t.getStorageSync("cms"),console.log(c),c&&e.editorCtx.getContents({success:function(){var e=(0,r.default)(i.default.mark((function e(o){var r,a,s;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log(o),r=o.html,a=o.text,s=o.delta,console.log(c),c={title:a,title_html:r,title_delta:s,cmsLst:c.cmsLst},console.log(c),e.next=7,t.setStorageSync("cms",c);case 7:return e.next=9,n.back();case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fail:function(t){console.log(t)},complete:function(){}});case 4:case"end":return o.stop()}}),o)})))()},back:function(){return(0,r.default)(i.default.mark((function e(){return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.navigateBack({delta:1,fail:function(e){console.log(e),t.navigateTo({url:"/pages2/editCms/editCms"})}});case 1:case"end":return e.stop()}}),e)})))()},readOnlyChange:function(){this.readOnly=!this.readOnly},onEditorReady:function(){var e=this;t.createSelectorQuery().select("#editor").context((function(o){e.editorCtx=o.context;var n=t.getStorageSync("cms"),i={html:n.title_html,title:n.title,delta:n.title_delta},r=i.html,c=i.delta;e.editorCtx.setContents({html:r,delta:c,success:function(){e.editorCtx.format("fontSize",e.formats.fontSize),e.editorCtx.format("color",e.formats.color),console.log("设置编辑器成功")},fail:function(t){console.log(t)},complete:function(){}})})).exec()},undo:function(){this.editorCtx.undo()},redo:function(){this.editorCtx.redo()},format:function(t){var e=t.target.dataset,o=e.name,n=e.value;o&&this.editorCtx.format(o,n)},onStatusChange:function(t){var e=t.detail;this.formats=e},insertDivider:function(){this.editorCtx.insertDivider({success:function(){console.log("insert divider success")}})},clear:function(){var e=this;t.showModal({title:"清空编辑器",content:"确定清空编辑器全部内容?",success:function(t){t.confirm&&e.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],alt:"图像",success:function(){console.log("insert image success")}})}})}}};e.default=c}).call(this,o("df3c")["default"])}},[["5e87","common/runtime","common/vendor"]]]); |