1 line
38 KiB
JavaScript
1 line
38 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-45ab523d"],{"0427":function(t,e,n){"use strict";var i=n("f623"),r=n.n(i);r.a},6625:function(t,e,n){!function(e,n){t.exports=n()}("undefined"!=typeof self&&self,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=39)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var i=n(28)("wks"),r=n(29),o=n(0).Symbol,s="function"==typeof o;(t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))}).store=i},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(6);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var i=n(0),r=n(2),o=n(11),s=n(5),a=n(9),c=function(t,e,n){var u,l,f,d=t&c.F,p=t&c.G,h=t&c.S,v=t&c.P,m=t&c.B,g=t&c.W,y=p?r:r[e]||(r[e]={}),_=y.prototype,x=p?i:h?i[e]:(i[e]||{}).prototype;for(u in p&&(n=e),n)(l=!d&&x&&void 0!==x[u])&&a(y,u)||(f=l?x[u]:n[u],y[u]=p&&"function"!=typeof x[u]?n[u]:m&&l?o(f,i):g&&x[u]==f?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):v&&"function"==typeof f?o(Function.call,f):f,v&&((y.virtual||(y.virtual={}))[u]=f,t&c.R&&_&&!_[u]&&s(_,u,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var i=n(13),r=n(31);t.exports=n(7)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(14)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){t.exports={}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(12);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(3),r=n(49),o=n(50),s=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(16);t.exports=function(t){return Object(i(t))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(45),r=n(30);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e,n){var i=n(26),r=n(16);t.exports=function(t){return i(r(t))}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(28)("keys"),r=n(29);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e){t.exports=!0},function(t,e,n){var i=n(6),r=n(0).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){var i=n(13).f,r=n(9),o=n(1)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){"use strict";var i=n(12);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t((function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i})),this.resolve=i(e),this.reject=i(n)}(t)}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=c(n(42)),r=c(n(51)),o=c(n(79)),s=c(n(85)),a=c(n(86));function c(t){return t&&t.__esModule?t:{default:t}}e.default={name:"VueUeditorWrap",data:function(){return{status:0,initValue:"",defaultConfig:{UEDITOR_HOME_URL:t.env.BASE_URL?t.env.BASE_URL+"UEditor/":"/static/UEditor/"}}},props:{mode:{type:String,default:"observer",validator:function(t){return-1!==["observer","listener"].indexOf(t)}},value:{type:String,default:""},config:{type:Object,default:function(){return{}}},init:{type:Function,default:function(){return function(){}}},destroy:{type:Boolean,default:!1},name:{type:String,default:""},observerDebounceTime:{type:Number,default:50,validator:function(t){return t>=20}},observerOptions:{type:Object,default:function(){return{attributes:!0,attributeFilter:["src","style","type","name"],characterData:!0,childList:!0,subtree:!0}}},forceInit:{type:Boolean,default:!1},editorId:{type:String}},computed:{mixedConfig:function(){return(0,o.default)({},this.defaultConfig,this.config)}},methods:{registerButton:function(t){var e=t.name,n=t.icon,i=t.tip,r=t.handler,o=t.index,s=t.UE,a=void 0===s?window.UE:s;a.registerUI(e,(function(t,e){t.registerCommand(e,{execCommand:function(){r(t,e)}});var o=new a.ui.Button({name:e,title:i,cssRules:"background-image: url("+n+") !important;background-size: cover;",onclick:function(){t.execCommand(e)}});return t.addListener("selectionchange",(function(){var n=t.queryCommandState(e);-1===n?(o.setDisabled(!0),o.setChecked(!1)):(o.setDisabled(!1),o.setChecked(n))})),o}),o,this.id)},_initEditor:function(){var t=this;this.$refs.script.id=this.id=this.editorId||"editor_"+Math.random().toString(16).slice(-6),this.init(),this.$emit("before-init",this.id,this.mixedConfig),this.$emit("beforeInit",this.id,this.mixedConfig),this.editor=window.UE.getEditor(this.id,this.mixedConfig),this.editor.addListener("ready",(function(){2===t.status?t.editor.setContent(t.value):(t.status=2,t.$emit("ready",t.editor),t.initValue&&t.editor.setContent(t.initValue)),"observer"===t.mode&&window.MutationObserver?t._observerChangeListener():t._normalChangeListener()}))},_checkDependencies:function(){var t=this;return new r.default((function(e,n){window.UE&&window.UEDITOR_CONFIG&&0!==(0,i.default)(window.UEDITOR_CONFIG).length&&window.UE.getEditor?e():window.$loadEnv?window.$loadEnv.on("scriptsLoaded",(function(){e()})):(window.$loadEnv=new s.default,t._loadConfig().then((function(){return t._loadCore()})).then((function(){e(),window.$loadEnv.emit("scriptsLoaded")})))}))},_loadConfig:function(){var t=this;return new r.default((function(e,n){if(window.UE&&window.UEDITOR_CONFIG&&0!==(0,i.default)(window.UEDITOR_CONFIG).length)e();else{var r=document.createElement("script");r.type="text/javascript",r.src=t.mixedConfig.UEDITOR_HOME_URL+"ueditor.config.js",document.getElementsByTagName("head")[0].appendChild(r),r.onload=function(){window.UE&&window.UEDITOR_CONFIG&&0!==(0,i.default)(window.UEDITOR_CONFIG).length?e():console.error("加载ueditor.config.js失败,请检查您的配置地址UEDITOR_HOME_URL填写是否正确!\n",r.src)}}}))},_loadCore:function(){var t=this;return new r.default((function(e,n){if(window.UE&&window.UE.getEditor)e();else{var i=document.createElement("script");i.type="text/javascript",i.src=t.mixedConfig.UEDITOR_HOME_URL+"ueditor.all.min.js",document.getElementsByTagName("head")[0].appendChild(i),i.onload=function(){window.UE&&window.UE.getEditor?e():console.error("加载ueditor.all.min.js失败,请检查您的配置地址UEDITOR_HOME_URL填写是否正确!\n",i.src)}}}))},_setContent:function(t){t===this.editor.getContent()||this.editor.setContent(t)},contentChangeHandler:function(){this.$emit("input",this.editor.getContent())},_normalChangeListener:function(){this.editor.addListener("contentChange",this.contentChangeHandler)},_observerChangeListener:function(){var t=this;this.observer=new MutationObserver((0,a.default)((function(e){t.editor.document.getElementById("baidu_pastebin")||t.$emit("input",t.editor.getContent())}),this.observerDebounceTime)),this.observer.observe(this.editor.body,this.observerOptions)}},deactivated:function(){this.editor&&this.editor.removeListener("contentChange",this.contentChangeHandler),this.observer&&this.observer.disconnect()},beforeDestroy:function(){this.destroy&&this.editor&&this.editor.destroy&&this.editor.destroy(),this.observer&&this.observer.disconnect&&this.observer.disconnect()},watch:{value:{handler:function(e){var n=this;switch(null===e&&(e=""),this.status){case 0:this.status=1,this.initValue=e,(this.forceInit||void 0!==t&&t.client||"undefined"!=typeof window)&&this._checkDependencies().then((function(){n.$refs.script?n._initEditor():n.$nextTick((function(){return n._initEditor()}))}));break;case 1:this.initValue=e;break;case 2:this._setContent(e)}},immediate:!0}}}}).call(e,n(41))},function(t,e,n){var i=n(10);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(19),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(2),r=n(0),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:i.version,mode:n(21)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";var i=n(21),r=n(4),o=n(56),s=n(5),a=n(8),c=n(57),u=n(23),l=n(60),f=n(1)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,h,v,m,g){c(n,e,h);var y,_,x,b=function(t){if(!d&&t in O)return O[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",C="values"==v,E=!1,O=t.prototype,L=O[f]||O["@@iterator"]||v&&O[v],S=L||b(v),T=v?C?b("entries"):S:void 0,k="Array"==e&&O.entries||L;if(k&&(x=l(k.call(new t)))!==Object.prototype&&x.next&&(u(x,w,!0),i||"function"==typeof x[f]||s(x,f,p)),C&&L&&"values"!==L.name&&(E=!0,S=function(){return L.call(this)}),i&&!g||!d&&!E&&O[f]||s(O,f,S),a[e]=S,a[w]=p,v)if(y={values:C?S:b("values"),keys:m?S:b("keys"),entries:T},g)for(_ in y)_ in O||o(O,_,y[_]);else r(r.P+r.F*(d||E),e,y);return y}},function(t,e,n){var i=n(0).document;t.exports=i&&i.documentElement},function(t,e,n){var i=n(10),r=n(1)("toStringTag"),o="Arguments"==i(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?n:o?i(e):"Object"==(s=i(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var i=n(3),r=n(12),o=n(1)("species");t.exports=function(t,e){var n,s=i(t).constructor;return void 0===s||void 0==(n=i(s)[o])?e:r(n)}},function(t,e,n){var i,r,o,s=n(11),a=n(71),c=n(33),u=n(22),l=n(0),f=l.process,d=l.setImmediate,p=l.clearImmediate,h=l.MessageChannel,v=l.Dispatch,m=0,g={},y=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},_=function(t){y.call(t.data)};d&&p||(d=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return g[++m]=function(){a("function"==typeof t?t:Function(t),e)},i(m),m},p=function(t){delete g[t]},"process"==n(10)(f)?i=function(t){f.nextTick(s(y,t,1))}:v&&v.now?i=function(t){v.now(s(y,t,1))}:h?(o=(r=new h).port2,r.port1.onmessage=_,i=s(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(i=function(t){l.postMessage(t+"","*")},l.addEventListener("message",_,!1)):i="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),y.call(t)}}:function(t){setTimeout(s(y,t,1),0)}),t.exports={set:d,clear:p}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var i=n(3),r=n(6),o=n(24);t.exports=function(t,e){if(i(t),r(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(25),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s=n(87),a=n(40)(r.a,s.a,!1,null,null,null);a.options.__file="src/components/vue-ueditor-wrap.vue",e.default=a.exports},function(t,e){t.exports=function(t,e,n,i,r,o){var s,a=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(s=t,a=t.default);var u,l="function"==typeof a?a.options:a;if(e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),r&&(l._scopeId=r),o?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=u):i&&(u=i),u){var f=l.functional,d=f?l.render:l.beforeCreate;f?(l._injectStyles=u,l.render=function(t,e){return u.call(e),d(t,e)}):l.beforeCreate=d?[].concat(d,u):[u]}return{esModule:s,exports:a,options:l}}},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var c,u=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!l){var t=a(d);l=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,l=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function v(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new h(t,e)),1!==u.length||l||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e,n){t.exports={default:n(43),__esModule:!0}},function(t,e,n){n(44),t.exports=n(2).Object.keys},function(t,e,n){var i=n(15),r=n(17);n(48)("keys",(function(){return function(t){return r(i(t))}}))},function(t,e,n){var i=n(9),r=n(18),o=n(46)(!1),s=n(20)("IE_PROTO");t.exports=function(t,e){var n,a=r(t),c=0,u=[];for(n in a)n!=s&&i(a,n)&&u.push(n);for(;e.length>c;)i(a,n=e[c++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var i=n(18),r=n(27),o=n(47);t.exports=function(t){return function(e,n,s){var a,c=i(e),u=r(c.length),l=o(s,u);if(t&&n!=n){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var i=n(19),r=Math.max,o=Math.min;t.exports=function(t,e){return(t=i(t))<0?r(t+e,0):o(t,e)}},function(t,e,n){var i=n(4),r=n(2),o=n(14);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],s={};s[t]=e(n),i(i.S+i.F*o((function(){n(1)})),"Object",s)}},function(t,e,n){t.exports=!n(7)&&!n(14)((function(){return 7!=Object.defineProperty(n(22)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var i=n(6);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){t.exports={default:n(52),__esModule:!0}},function(t,e,n){n(53),n(54),n(61),n(65),n(77),n(78),t.exports=n(2).Promise},function(t,e){},function(t,e,n){"use strict";var i=n(55)(!0);n(32)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){var i=n(19),r=n(16);t.exports=function(t){return function(e,n){var o,s,a=String(r(e)),c=i(n),u=a.length;return c<0||c>=u?t?"":void 0:(o=a.charCodeAt(c))<55296||o>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?t?a.charAt(c):o:t?a.slice(c,c+2):s-56320+(o-55296<<10)+65536}}},function(t,e,n){t.exports=n(5)},function(t,e,n){"use strict";var i=n(58),r=n(31),o=n(23),s={};n(5)(s,n(1)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=i(s,{next:r(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var i=n(3),r=n(59),o=n(30),s=n(20)("IE_PROTO"),a=function(){},c=function(){var t,e=n(22)("iframe"),i=o.length;for(e.style.display="none",n(33).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;i--;)delete c.prototype[o[i]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=i(t),n=new a,a.prototype=null,n[s]=t):n=c(),void 0===e?n:r(n,e)}},function(t,e,n){var i=n(13),r=n(3),o=n(17);t.exports=n(7)?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),a=s.length,c=0;a>c;)i.f(t,n=s[c++],e[n]);return t}},function(t,e,n){var i=n(9),r=n(15),o=n(20)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){n(62);for(var i=n(0),r=n(5),o=n(8),s=n(1)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<a.length;c++){var u=a[c],l=i[u],f=l&&l.prototype;f&&!f[s]&&r(f,s,u),o[u]=o.Array}},function(t,e,n){"use strict";var i=n(63),r=n(64),o=n(8),s=n(18);t.exports=n(32)(Array,"Array",(function(t,e){this._t=s(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var i,r,o,s,a=n(21),c=n(0),u=n(11),l=n(34),f=n(4),d=n(6),p=n(12),h=n(66),v=n(67),m=n(35),g=n(36).set,y=n(72)(),_=n(24),x=n(37),b=n(73),w=n(38),C=c.TypeError,E=c.process,O=E&&E.versions,L=O&&O.v8||"",S=c.Promise,T="process"==l(E),k=function(){},j=r=_.f,I=!!function(){try{var t=S.resolve(1),e=(t.constructor={})[n(1)("species")]=function(t){t(k,k)};return(T||"function"==typeof PromiseRejectionEvent)&&t.then(k)instanceof e&&0!==L.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(t){}}(),U=function(t){var e;return!(!d(t)||"function"!=typeof(e=t.then))&&e},P=function(t,e){if(!t._n){t._n=!0;var n=t._c;y((function(){for(var i=t._v,r=1==t._s,o=0,s=function(e){var n,o,s,a=r?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{a?(r||(2==t._h&&A(t),t._h=1),!0===a?n=i:(l&&l.enter(),n=a(i),l&&(l.exit(),s=!0)),n===e.promise?u(C("Promise-chain cycle")):(o=U(n))?o.call(n,c,u):c(n)):u(i)}catch(t){l&&!s&&l.exit(),u(t)}};n.length>o;)s(n[o++]);t._c=[],t._n=!1,e&&!t._h&&M(t)}))}},M=function(t){g.call(c,(function(){var e,n,i,r=t._v,o=R(t);if(o&&(e=x((function(){T?E.emit("unhandledRejection",r,t):(n=c.onunhandledrejection)?n({promise:t,reason:r}):(i=c.console)&&i.error&&i.error("Unhandled promise rejection",r)})),t._h=T||R(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},R=function(t){return 1!==t._h&&0===(t._a||t._c).length},A=function(t){g.call(c,(function(){var e;T?E.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})}))},$=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),P(e,!0))},D=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw C("Promise can't be resolved itself");(e=U(t))?y((function(){var i={_w:n,_d:!1};try{e.call(t,u(D,i,1),u($,i,1))}catch(t){$.call(i,t)}})):(n._v=t,n._s=1,P(n,!1))}catch(t){$.call({_w:n,_d:!1},t)}}};I||(S=function(t){h(this,S,"Promise","_h"),p(t),i.call(this);try{t(u(D,this,1),u($,this,1))}catch(t){$.call(this,t)}},(i=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(74)(S.prototype,{then:function(t,e){var n=j(m(this,S));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=T?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&P(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new i;this.promise=t,this.resolve=u(D,t,1),this.reject=u($,t,1)},_.f=j=function(t){return t===S||t===s?new o(t):r(t)}),f(f.G+f.W+f.F*!I,{Promise:S}),n(23)(S,"Promise"),n(75)("Promise"),s=n(2).Promise,f(f.S+f.F*!I,"Promise",{reject:function(t){var e=j(this);return(0,e.reject)(t),e.promise}}),f(f.S+f.F*(a||!I),"Promise",{resolve:function(t){return w(a&&this===s?S:this,t)}}),f(f.S+f.F*!(I&&n(76)((function(t){S.all(t).catch(k)}))),"Promise",{all:function(t){var e=this,n=j(e),i=n.resolve,r=n.reject,o=x((function(){var n=[],o=0,s=1;v(t,!1,(function(t){var a=o++,c=!1;n.push(void 0),s++,e.resolve(t).then((function(t){c||(c=!0,n[a]=t,--s||i(n))}),r)})),--s||i(n)}));return o.e&&r(o.v),n.promise},race:function(t){var e=this,n=j(e),i=n.reject,r=x((function(){v(t,!1,(function(t){e.resolve(t).then(n.resolve,i)}))}));return r.e&&i(r.v),n.promise}})},function(t,e){t.exports=function(t,e,n,i){if(!(t instanceof e)||void 0!==i&&i in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var i=n(11),r=n(68),o=n(69),s=n(3),a=n(27),c=n(70),u={},l={};(e=t.exports=function(t,e,n,f,d){var p,h,v,m,g=d?function(){return t}:c(t),y=i(n,f,e?2:1),_=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=a(t.length);p>_;_++)if((m=e?y(s(h=t[_])[0],h[1]):y(t[_]))===u||m===l)return m}else for(v=g.call(t);!(h=v.next()).done;)if((m=r(v,y,h.value,e))===u||m===l)return m}).BREAK=u,e.RETURN=l},function(t,e,n){var i=n(3);t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},function(t,e,n){var i=n(8),r=n(1)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[r]===t)}},function(t,e,n){var i=n(34),r=n(1)("iterator"),o=n(8);t.exports=n(2).getIteratorMethod=function(t){if(void 0!=t)return t[r]||t["@@iterator"]||o[i(t)]}},function(t,e){t.exports=function(t,e,n){var i=void 0===n;switch(e.length){case 0:return i?t():t.call(n);case 1:return i?t(e[0]):t.call(n,e[0]);case 2:return i?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return i?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return i?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var i=n(0),r=n(36).set,o=i.MutationObserver||i.WebKitMutationObserver,s=i.process,a=i.Promise,c="process"==n(10)(s);t.exports=function(){var t,e,n,u=function(){var i,r;for(c&&(i=s.domain)&&i.exit();t;){r=t.fn,t=t.next;try{r()}catch(i){throw t?n():e=void 0,i}}e=void 0,i&&i.enter()};if(c)n=function(){s.nextTick(u)};else if(!o||i.navigator&&i.navigator.standalone)if(a&&a.resolve){var l=a.resolve(void 0);n=function(){l.then(u)}}else n=function(){r.call(i,u)};else{var f=!0,d=document.createTextNode("");new o(u).observe(d,{characterData:!0}),n=function(){d.data=f=!f}}return function(i){var r={fn:i,next:void 0};e&&(e.next=r),t||(t=r,n()),e=r}}},function(t,e,n){var i=n(0).navigator;t.exports=i&&i.userAgent||""},function(t,e,n){var i=n(5);t.exports=function(t,e,n){for(var r in e)n&&t[r]?t[r]=e[r]:i(t,r,e[r]);return t}},function(t,e,n){"use strict";var i=n(0),r=n(2),o=n(13),s=n(7),a=n(1)("species");t.exports=function(t){var e="function"==typeof r[t]?r[t]:i[t];s&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var i=n(1)("iterator"),r=!1;try{var o=[7][i]();o.return=function(){r=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var o=[7],s=o[i]();s.next=function(){return{done:n=!0}},o[i]=function(){return s},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var i=n(4),r=n(2),o=n(0),s=n(35),a=n(38);i(i.P+i.R,"Promise",{finally:function(t){var e=s(this,r.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return a(e,t()).then((function(){return n}))}:t,n?function(n){return a(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){"use strict";var i=n(4),r=n(24),o=n(37);i(i.S,"Promise",{try:function(t){var e=r.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){t.exports={default:n(80),__esModule:!0}},function(t,e,n){n(81),t.exports=n(2).Object.assign},function(t,e,n){var i=n(4);i(i.S+i.F,"Object",{assign:n(82)})},function(t,e,n){"use strict";var i=n(17),r=n(83),o=n(84),s=n(15),a=n(26),c=Object.assign;t.exports=!c||n(14)((function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=i}))?function(t,e){for(var n=s(t),c=arguments.length,u=1,l=r.f,f=o.f;c>u;)for(var d,p=a(arguments[u++]),h=l?i(p).concat(l(p)):i(p),v=h.length,m=0;v>m;)f.call(p,d=h[m++])&&(n[d]=p[d]);return n}:c},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){this.listeners={},this.on=function(t,e){void 0===this.listeners[t]&&(this.listeners[t]=[]),this.listeners[t].push(e)},this.emit=function(t){this.listeners[t]&&this.listeners[t].forEach((function(t){return t()}))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){var n=null;return function(){var i=this,r=arguments;n&&clearTimeout(n),n=setTimeout((function(){t.apply(i,r)}),e)}}},function(t,e,n){"use strict";var i=function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("script",{ref:"script",attrs:{name:this.name,type:"text/plain"}})])};i._withStripped=!0;var r={render:i,staticRenderFns:[]};e.a=r}]).default}))},9893:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"editor-box"},[n("vue-ueditor-wrap",{attrs:{config:t.config},on:{"before-init":t.loadUe},model:{value:t.mycontent,callback:function(e){t.mycontent=e},expression:"mycontent"}}),n("attachment-img",{ref:"imgs",attrs:{type:"img",type2:t.typestore},on:{attachment:t.chooseImgsOK}})],1)},r=[],o=(n("ac1f"),n("466d"),n("6625")),s=n.n(o),a=n("fc6e"),c=n("365c"),u={components:{VueUeditorWrap:s.a,attachmentImg:a["a"]},name:"UE",props:{content:{type:String,default:""},typestore:{type:String,default:""}},data:function(){return{config:{autoHeightEnabled:!1,initialFrameHeight:250,initialFrameWidth:800,UEDITOR_HOME_URL:"",serverUrl:"",enableAutoSave:!0},isInputChange:!1,editor_id:"baidu-editor-"+Math.floor(1e4*Math.random()+1),newVal:"",oldVal:""}},computed:{mycontent:{get:function(){return this.content},set:function(t){this.$emit("ueditor",t)}}},created:function(){var t="/UEditor/",e=c["a"].isDev?t:window.location.href.match(/(\S*)views/)[1]+"views/channel/index/UEditor/";this.config.UEDITOR_HOME_URL=e},methods:{loadUe:function(){var t=this;window.UE.registerUI("appinsertimage",(function(e,n){return t.editor=e,new window.UE.ui.Button({name:n,title:"插入图片",cssRules:"background-position: -381px 0px;",onclick:function(){t.ue=e,t.attachmentDialogVisible=!0,t.$refs.imgs.dialogVisible=!0}})}))},chooseImgsOK:function(t){var e='<img src="'+t.str+'" style="width: auto;">';this.editor.execCommand("inserthtml",e)},reload:function(){this.$forceUpdate(),this.isInputChange=!1}}},l=u,f=(n("0427"),n("2877")),d=Object(f["a"])(l,i,r,!1,null,"3a673696",null);e["a"]=d.exports},c8f1:function(t,e,n){},dad0:function(t,e,n){"use strict";var i=n("c8f1"),r=n.n(i);r.a},f623:function(t,e,n){},fc6e:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{staticClass:"attachmentImg",attrs:{title:"选择图片",visible:t.dialogVisible,"close-on-click-modal":!1,width:"55%"},on:{"update:visible":function(e){t.dialogVisible=e},close:t.modalClose,opened:t.dialogOpened}},[n("div",{staticClass:"attachment_img_box",attrs:{flex:"box:first"}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.groupListLoading,expression:"groupListLoading"}],staticClass:"attachment_img_left"},[n("el-menu",{staticClass:"group-menu",attrs:{mode:"vertical"}},[n("el-scrollbar",{staticStyle:{height:"523px",width:"100%"}},[n("div",{staticClass:"goods-menu"},[n("el-menu-item",{class:{"is-active":"all"==t.allindex},staticStyle:{"text-align":"center"},attrs:{index:"all"},on:{click:function(e){return t.selected(0)}}},[n("span",[t._v("全部")])]),t._l(t.groupItem,(function(e){return[n("el-menu-item",{key:e.id,attrs:{index:e.id},on:{click:function(n){return t.selected(e.id)}}},[n("div",{staticClass:"fenlei",attrs:{flex:"dir:left box:last"}},[n("i",{staticClass:"el-icon-circle-close gbfenlei",staticStyle:{display:"none"},on:{click:function(n){return t.deleteType(e.id)}}}),n("div",{staticStyle:{overflow:"hidden","text-overflow":"ellipsis",width:"100%"}},[n("span",[t._v(t._s(e.name))])])])])]}))],2)]),n("el-popover",{attrs:{placement:"top",width:"160"},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[n("el-input",{attrs:{placeholder:"请输入分组名称",size:"mini"},model:{value:t.new_type_name,callback:function(e){t.new_type_name=e},expression:"new_type_name"}}),n("div",{staticStyle:{"text-align":"right",margin:"0","margin-top":"10px"}},[n("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(e){t.visible=!1}}},[t._v("取消")]),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.addNewAttType}},[t._v("确定")])],1),n("el-button",{staticStyle:{"margin-left":"22%","margin-top":"13px"},attrs:{slot:"reference",size:"small"},slot:"reference"},[n("i",{staticClass:"el-icon-circle-plus-outline"}),t._v(" 新建分组 ")])],1)],1)],1),n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.rightLoading,expression:"rightLoading"}],staticClass:"attachment_img_right",attrs:{flex:"dir:top"}},[n("div",{staticClass:"selectBox"},[n("el-input",{staticStyle:{width:"30%","padding-left":"12px"},attrs:{placeholder:"请输入图片名称","suffix-icon":"el-icon-search",size:"small"},on:{input:function(e){return t.search(t.atta_name)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.search(t.atta_name)}},model:{value:t.atta_name,callback:function(e){t.atta_name=e},expression:"atta_name"}}),n("div",{staticStyle:{float:"right",padding:"0 10px 0 0"}},[n("el-upload",{staticClass:"upload-demo",attrs:{action:t.UploadUrl(),multiple:!0,limit:50,"on-exceed":t.handleExceed,"file-list":t.fileList,"on-success":t.handleSuccess,"on-error":t.handleError,"before-upload":t.beforeUpload,data:t.uploadData,"on-progress":t.handProgress}},[n("el-button",{attrs:{size:"small",type:"primary"}},[n("i",{staticClass:"el-icon-plus avatar-uploader-icon"}),t._v(" 上传图片 ")])],1)],1)],1),n("el-scrollbar",{staticClass:"scrollbar",staticStyle:{height:"460px"}},[n("div",{staticClass:"app-attachment-list"},[t._l(t.attachments,(function(e,i){return[n("el-tooltip",{key:e.id,staticClass:"item",attrs:{effect:"dark",content:e.name,placement:"top","open-delay":1}},[n("div",{staticClass:"app-attachment-item",on:{click:function(n){return t.selectedItem(i,e.url)}}},[n("div",{staticClass:"app-attachment-item-bj"},[n("div",{staticClass:"imgStyle"},[n("el-image",{staticStyle:{width:"100%",height:"143px","border-radius":"5px"},attrs:{src:e.url,fit:"cover"}}),n("div",{staticClass:"mask",style:t.getStyle2(i)},[n("i",{staticClass:"el-icon-check center-icon pos-center"}),n("p",{staticClass:"triangle"},[n("i",{staticClass:"el-icon-check"})])])],1),n("div",{staticClass:"app-attachment-name"},[t._v(t._s(e.name))]),n("i",{staticClass:"el-icon-error delete",on:{click:function(n){return t.deleteItem(e.id)}}})])])])]}))],2)]),n("div",{staticStyle:{padding:"5px","text-align":"right","margin-top":"auto"}},[n("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:t.total,"page-size":t.pagesize},on:{"current-change":t.current_change}})],1)],1)]),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"small"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),n("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.selectedItems()}}},[t._v("确 定")])],1)])},r=[],o=(n("99af"),n("365c")),s={name:"attachment-img",props:{type:{type:String,default:"img"},type2:{type:String,default:""},op:{type:String}},data:function(){return{visible:!1,atta_name:"",uploadParams:{type_id:0,type:1},category:0,keywords:"",total:0,pagesize:30,currentPage:1,dialogVisible:!1,groupItem:[],attachments:[],groupListLoading:!1,rightLoading:!1,new_type_name:"",fileList:[],selectedArr:{},attachmentList:"12",uploadData:{key:"",token:""},file:{Url:"",path:"",name:"",size:0},att_type:"",allindex:"all"}},created:function(){},methods:{getStyle2:function(t){var e=this,n=e.currentPage,i=e.selectedArr["img"==e.type?"danxuan":"item"+t+n];return i&&i.page==n&&i.index==t?"display:block":""},modalClose:function(){var t=this;t.selectedArr={}},dialogOpened:function(){this.getgroupItem(),this.getAttachment_List()},handProgress:function(){var t=this;t.rightLoading=!0},getgroupItem:function(){var t=this;this.$api.get("common/file/get-category",{storeId:this.type2},(function(e){1==e.code?(t.groupItem=e.data,t.groupListLoading=!1,t.visible=!1):t.groupListLoading=!1}))},getAttachment_List:function(){var t=this;t.rightLoading=!0,this.$api.get("common/file/get-picture",{page:t.currentPage,category:t.category,keywords:t.keywords,storeId:this.type2},(function(e){1==e.code?(t.attachments=e.data,t.total=e.count,t.rightLoading=!1):t.rightLoading=!1}))},addNewAttType:function(){var t=this;t.groupListLoading=!0,this.$api.post("common/file/save-category",{storeId:this.type2,name:t.new_type_name},(function(e){1==e.code?(t.visible=!1,t.$message({message:e.msg,type:"success",duration:500,onClose:function(){t.new_type_name="",t.getgroupItem()}})):(t.visible=!1,t.$message.error(e.msg))}))},deleteType:function(t){var e=this;e.groupListLoading=!0,this.$api.post("common/file/del-picture-category",{id:t},(function(t){1==t.code?(e.visible=!1,e.$message({message:t.msg,type:"success",duration:500,onClose:function(){e.getgroupItem()}})):(e.$message.error(t.msg),e.groupListLoading=!1)}))},search:function(t){var e=this;console.log(t),this.keywords=t,e.getAttachment_List()},current_change:function(t){var e=this;e.currentPage=t,e.getAttachment_List()},deleteItem:function(t){var e=this;e.rightLoading=!0,this.$api.post("common/file/del-picture",{id:t},(function(t){1==t.code?(e.visible=!1,e.$message({message:t.msg,type:"success",duration:500,onClose:function(){e.getAttachment_List()}})):(e.$message.error(t.msg),e.groupListLoading=!1)}))},UploadUrl:function(){var t=o["a"].backendPath;return t+"common/file/get-category"},beforeUpload:function(t){console.log("上传前判断",t);var e="image/jpg"===t.type||"image/jpeg"===t.type||"image/png"===t.type||"image/gif"===t.type,n=t.size/1024/1024<2;return e?n?void 0:(this.$message.error("文件大小不能超过 2MB!"),!1):(this.$message.error("上传图片只支持jpg、jpeg、png格式!"),!1)},handleError:function(t){this.$message({message:"上传失败",duration:2e3,type:"warning"})},handleSuccess:function(t,e,n){console.log("345",n),this.file=e,this.addAttachment()},handleExceed:function(t,e){this.$message.warning("当前限制选择 50 个文件,本次选择了 ".concat(t.length," 个文件,共选择了 ").concat(t.length+e.length," 个文件"))},addAttachment:function(){var t=this,e=new FormData;e.append("file",this.file.raw),e.append("category",this.category),e.append("storeId",this.type2),this.$api.post("common/file/upload",e,(function(e){1==e.code?(t.getAttachment_List(),t.$message.success("上传成功")):(t.$message.error(e.msg),console.log(e.msg))}))},selected:function(t){var e=this;e.rightLoading=!0,e.currentPage=1,e.category=t,e.allindex="otherList",e.getAttachment_List()},selectedItem:function(t,e){var n=this,i="img"==n.type,r=i?"danxuan":"item"+t+n.currentPage,o=n.selectedArr[r];o&&o.index==t?n.$delete(n.selectedArr,r):(i&&n.$delete(n.selectedArr,r),n.$set(n.selectedArr,r,{page:n.currentPage,index:t,url:e}))},selectedItems:function(){var t=this;t=this;var e=t.selectedArr,n="",i=[];for(var r in e)n+=n?","+e[r].url:e[r].url,i.push(e[r].url);t.$emit("attachment",{str:n,arr:i}),t.dialogVisible=!1}}},a=s,c=(n("dad0"),n("2877")),u=Object(c["a"])(a,i,r,!1,null,null,null);e["a"]=u.exports}}]); |