| 12345678910 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/jin-edit/jin-edit"],{"6ccd":function(t,e,n){"use strict";n.r(e);var o=n("84d9"),r=n("c8de");for(var i in r)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("d81b");var s=n("f0c5"),a=Object(s["a"])(r["default"],o["b"],o["c"],!1,null,"7426788c",null,!1,o["a"],void 0);e["default"]=a.exports},"7c25":function(t,e,n){},"84d9":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var o=function(){var t=this.$createElement;this._self._c},r=[]},c8de:function(t,e,n){"use strict";n.r(e);var o=n("ec8f"),r=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=r.a},d81b:function(t,e,n){"use strict";var o=n("7c25"),r=n.n(o);r.a},ec8f:function(t,e,n){"use strict";(function(t){var o=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n("2eee")),i=o(n("c973")),s=o(n("9523")),a=n("26cb");function c(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}var l={props:{showImgSize:{type:Boolean,default:!1},showImgToolbar:{type:Boolean,default:!1},showImgResize:{type:Boolean,default:!1},placeholder:{type:String,default:"开始输入..."},uploadFileUrl:{type:String,default:"#"},fileKeyName:{type:String,default:"file"},header:{type:Object},html:{type:String},height:{type:String,default:"100vh"}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){(0,s.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,a.mapState)(["baseURL"])),data:function(){return{showMoreTool:!1,showBold:!1,showItalic:!1,showIns:!1,showHeader:!1,showCenter:!1,showRight:!1,showSettingLayer:!1,activeColor:"#F56C6C"}},components:{jinIcon:function(){n.e("components/jin-edit/jin-icons").then(function(){return resolve(n("dfbe"))}.bind(null,n)).catch(n.oe)}},mounted:function(){},methods:{onEditorReady:function(e){var n=this;t.createSelectorQuery().in(this).select(".ql-container").fields({size:!0,context:!0},(function(t){n.editorCtx=t.context,n.editorCtx.setContents({html:n.html})})).exec()},undo:function(){this.editorCtx.undo()},insertImage:function(){var e=this;t.chooseImage({count:9,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(){var n=(0,i.default)(r.default.mark((function n(o){var i,s,a,u;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:i=o.tempFilePaths,t.showLoading({title:"正在上传中..."}),s=c(i),n.prev=3,s.s();case 5:if((a=s.n()).done){n.next=12;break}return u=a.value,console.log(88,u),n.next=10,t.uploadFile({url:e.baseURL+e.uploadFileUrl,filePath:u,name:e.fileKeyName,header:e.header,success:function(n){var o;console.log(n,"shangchuan"),console.log(n,"上传完成后处理"),o="string"===typeof n.data?JSON.parse(n.data).data:n.data.data,e.editorCtx.insertImage({src:o.url,alt:"图片",success:function(t){}}),t.hideLoading()},fail:function(t){console.log(t,"fail")}});case 10:n.next=5;break;case 12:n.next=17;break;case 14:n.prev=14,n.t0=n["catch"](3),s.e(n.t0);case 17:return n.prev=17,s.f(),n.finish(17);case 20:case"end":return n.stop()}}),n,null,[[3,14,17,20]])})));return function(t){return n.apply(this,arguments)}}()})},insertDivider:function(){this.editorCtx.insertDivider()},redo:function(){this.editorCtx.redo()},showMore:function(){this.showMoreTool=!this.showMoreTool,this.editorCtx.setContents()},setBold:function(){this.showBold=!this.showBold,this.editorCtx.format("bold")},setItalic:function(){this.showItalic=!this.showItalic,this.editorCtx.format("italic")},checkStatus:function(t,e,n){e.hasOwnProperty(t)?this[n]=!0:this[n]=!1},statuschange:function(t){var e=t.detail;this.checkStatus("bold",e,"showBold"),this.checkStatus("italic",e,"showItalic"),this.checkStatus("ins",e,"showIns"),this.checkStatus("header",e,"showHeader"),e.hasOwnProperty("align")?"center"==e.align?(this.showCenter=!0,this.showRight=!1):"right"==e.align?(this.showCenter=!1,this.showRight=!0):(this.showCenter=!1,this.showRight=!1):(this.showCenter=!1,this.showRight=!1)},setIns:function(){this.showIns=!this.showIns,this.editorCtx.format("ins")},setHeader:function(){this.showHeader=!this.showHeader,this.editorCtx.format("header",!!this.showHeader&&"H2")},setCenter:function(){this.showCenter=!this.showCenter,this.editorCtx.format("align",!!this.showCenter&&"center")},setRight:function(){this.showRight=!this.showRight,this.editorCtx.format("align",!!this.showRight&&"right")},showSetting:function(){this.showSettingLayer=!this.showSettingLayer},editFocus:function(t){return(0,i.default)(r.default.mark((function t(){return r.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})))()},editBlur:function(t){},release:function(t){var e=this;this.editorCtx.getContents({success:function(n){Object.assign(n,{isPublic:t}),e.$emit("editOk",n)}})}}};e.default=l}).call(this,n("543d")["default"])}}]);
- ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
- 'components/jin-edit/jin-edit-create-component',
- {
- 'components/jin-edit/jin-edit-create-component':(function(module, exports, __webpack_require__){
- __webpack_require__('543d')['createComponent'](__webpack_require__("6ccd"))
- })
- },
- [['components/jin-edit/jin-edit-create-component']]
- ]);
|