You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
3.9 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/life/goodsDetails/index"],{"35d5":function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));var r=function(){var t=this,e=t.$createElement;t._self._c},i=[]},8008:function(t,e,n){},"87cd":function(t,e,n){"use strict";n.r(e);var o=n("ea55"),r=n.n(o);for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=r.a},"9bbb":function(t,e,n){"use strict";var o=n("8008"),r=n.n(o);r.a},c25a:function(t,e,n){"use strict";n.r(e);var o=n("35d5"),r=n("87cd");for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("9bbb");var c,a=n("f0c5"),s=Object(a["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],c);e["default"]=s.exports},da23:function(t,e,n){"use strict";(function(t){n("0371");o(n("66fd"));var e=o(n("c25a"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},ea55:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("a34a")),r=n("8c38");function i(t){return t&&t.__esModule?t:{default:t}}function c(t,e,n,o,r,i,c){try{var a=t[i](c),s=a.value}catch(u){return void n(u)}a.done?e(s):Promise.resolve(s).then(o,r)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(o,r){var i=t.apply(e,n);function a(t){c(i,o,r,a,s,"next",t)}function s(t){c(i,o,r,a,s,"throw",t)}a(void 0)}))}}var s,u=function(){n.e("components/t-color-picker").then(function(){return resolve(n("3de7"))}.bind(null,n)).catch(n.oe)},d={components:{"t-color-picker":u},data:function(){return{color:{r:255,g:0,b:0,a:.6},isEdit:!1,fontColor:"#000",formats:{},readOnly:!1,placeholder:"开始输入...",editorHeight:300,keyboardHeight:0,isIOS:!1,desc:""}},onLoad:function(t){s=this,this.desc=decodeURIComponent(t.desc),console.log(t.desc,"options.desc")},methods:{cancel:function(){this.isEdit=!1},open:function(){this.$refs.colorPicker.open(),this.isEdit=!0},hideKey:function(){t.hideKeyboard()},confirm:function(t){var e=this;return a(o.default.mark((function n(){return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.isEdit=!1,n.next=3,t.hex;case 3:e.fontColor=n.sent,e.onStatusChange({detail:{color:t.hex}}),e.$forceUpdate();case 6:case"end":return n.stop()}}),n)})))()},readOnlyChange:function(){this.readOnly=!this.readOnly},onEditorReady:function(){return a(o.default.mark((function e(){return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.createSelectorQuery().select("#editor").context((function(t){s.editorCtx=t.context,s.editorCtx.setContents({html:s.desc})})).exec();case 1:case"end":return e.stop()}}),e)})))()},undo:function(){this.editorCtx.undo()},redo:function(){this.editorCtx.redo()},blur:function(){this.editorCtx.blur()},format:function(t){var e=t.target.dataset,n=e.name,o=e.value;n&&this.editorCtx.format(n,o)},onStatusChange:function(t){this.formats=t.detail},insertDivider:function(){this.editorCtx.insertDivider({success:function(){console.log("insert divider success")}})},store:function(e){this.editorCtx.getContents({success:function(n){if(console.log(n.html,"res.html"),1==e.currentTarget.id){var o=getCurrentPages(),r=o[o.length-2];r.$vm.description=n.html,t.navigateBack({delta:1})}else t.navigateTo({url:"../preview/preview?rich=".concat(encodeURIComponent(n.html))})}})},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(){(0,r.chooseImage)((function(t){s.editorCtx.insertImage({src:t,width:"80%",success:function(){console.log("insert image success")}})}))}}};e.default=d}).call(this,n("543d")["default"])}},[["da23","common/runtime","common/vendor"]]]);