3 行
20 KiB
JavaScript
可执行文件
3 行
20 KiB
JavaScript
可执行文件
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6153658a"],{"0c47":function(t,e,o){"use strict";var n=o("da84"),r=o("d44e");r(n.JSON,"JSON",!0)},"131a":function(t,e,o){"use strict";var n=o("23e7"),r=o("d2bb");n({target:"Object",stat:!0},{setPrototypeOf:r})},"159b":function(t,e,o){"use strict";var n=o("da84"),r=o("fdbc"),a=o("785a"),i=o("17c2"),c=o("9112"),l=function(t){if(t&&t.forEach!==i)try{c(t,"forEach",i)}catch(e){t.forEach=i}};for(var s in r)r[s]&&l(n[s]&&n[s].prototype);l(a)},"17c2":function(t,e,o){"use strict";var n=o("b727").forEach,r=o("a640"),a=r("forEach");t.exports=a?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},"1da1":function(t,e,o){"use strict";o.d(e,"a",(function(){return r}));o("d3b7");function n(t,e,o,n,r,a,i){try{var c=t[a](i),l=c.value}catch(s){return void o(s)}c.done?e(l):Promise.resolve(l).then(n,r)}function r(t){return function(){var e=this,o=arguments;return new Promise((function(r,a){var i=t.apply(e,o);function c(t){n(i,r,a,c,l,"next",t)}function l(t){n(i,r,a,c,l,"throw",t)}c(void 0)}))}}},"1f68":function(t,e,o){"use strict";var n=o("83ab"),r=o("edd0"),a=o("861d"),i=o("1787"),c=o("7b0b"),l=o("1d80"),s=Object.getPrototypeOf,u=Object.setPrototypeOf,f=Object.prototype,p="__proto__";if(n&&s&&u&&!(p in f))try{r(f,p,{configurable:!0,get:function(){return s(c(this))},set:function(t){var e=l(this);i(t)&&a(e)&&u(e,t)}})}catch(h){}},"23dc":function(t,e,o){"use strict";var n=o("d44e");n(Math,"Math",!0)},3410:function(t,e,o){"use strict";var n=o("23e7"),r=o("d039"),a=o("7b0b"),i=o("e163"),c=o("e177"),l=r((function(){i(1)}));n({target:"Object",stat:!0,forced:l,sham:!c},{getPrototypeOf:function(t){return i(a(t))}})},"53ca":function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));o("a4d3"),o("e01a"),o("d28b"),o("d3b7"),o("3ca3"),o("ddb0");function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}},5758:function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"diy-service",attrs:{id:"diy-service"}},[e("el-form",{attrs:{model:t.componentData,"label-width":"80px","label-position":"top",size:"small"}},[e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"位置选择"}},[e("el-radio-group",{model:{value:t.componentData.position,callback:function(e){t.$set(t.componentData,"position",e)},expression:"componentData.position"}},[e("el-radio",{attrs:{label:0}},[t._v("靠左")]),e("el-radio",{attrs:{label:1}},[t._v("靠右")])],1)],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"位置选择"}},[e("el-radio-group",{model:{value:t.componentData.vertical,callback:function(e){t.$set(t.componentData,"vertical",e)},expression:"componentData.vertical"}},[e("el-radio",{attrs:{label:0}},[t._v("靠下")]),e("el-radio",{attrs:{label:1}},[t._v("靠上")])],1)],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"菜单方式"}},[e("el-radio-group",{model:{value:t.componentData.direction,callback:function(e){t.$set(t.componentData,"direction",e)},expression:"componentData.direction"}},[e("el-radio",{attrs:{label:0}},[t._v("垂直方向")]),e("el-radio",{attrs:{label:1}},[t._v("水平方向")])],1)],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"层级"}},[e("el-input-number",{attrs:{min:1,precision:0,step:2},model:{value:t.componentData.zIndex,callback:function(e){t.$set(t.componentData,"zIndex",e)},expression:"componentData.zIndex"}})],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"文字颜色"}},[e("el-color-picker",{attrs:{predefine:this.$root.predefineColors},on:{"active-change":function(e){return t.colorChange(e,"color")}},model:{value:t.componentData.color,callback:function(e){t.$set(t.componentData,"color",e)},expression:"componentData.color"}}),e("el-link",{attrs:{type:"primary"},on:{click:function(e){return t.colorReset("#3c3e49","color")}}},[t._v("重置")])],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"文字选中颜色"}},[e("el-color-picker",{attrs:{predefine:this.$root.predefineColors},on:{"active-change":function(e){return t.colorChange(e,"selectedColor")}},model:{value:t.componentData.selectedColor,callback:function(e){t.$set(t.componentData,"selectedColor",e)},expression:"componentData.selectedColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:function(e){return t.colorReset("#007AFF","selectedColor")}}},[t._v("重置")])],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"背景色"}},[e("el-color-picker",{attrs:{"color-format":"rgb","show-alpha":"",predefine:this.$root.predefineColors},on:{"active-change":function(e){return t.colorChange(e,"backgroundColor")}},model:{value:t.componentData.backgroundColor,callback:function(e){t.$set(t.componentData,"backgroundColor",e)},expression:"componentData.backgroundColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:function(e){return t.colorReset("#ffffff","backgroundColor")}}},[t._v("重置")])],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"按钮背景色"}},[e("el-color-picker",{attrs:{"color-format":"rgb","show-alpha":"",predefine:this.$root.predefineColors},on:{"active-change":function(e){return t.colorChange(e,"buttonColor")}},model:{value:t.componentData.buttonColor,callback:function(e){t.$set(t.componentData,"buttonColor",e)},expression:"componentData.buttonColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:function(e){return t.colorReset("#3c3e49","buttonColor")}}},[t._v("重置")])],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"按钮图标色"}},[e("el-color-picker",{attrs:{predefine:this.$root.predefineColors},on:{"active-change":function(e){return t.colorChange(e,"buttonIconColor")}},model:{value:t.componentData.buttonIconColor,callback:function(e){t.$set(t.componentData,"buttonIconColor",e)},expression:"componentData.buttonIconColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:function(e){return t.colorReset("#000000","buttonIconColor")}}},[t._v("重置")])],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"按钮阴影色"}},[e("el-color-picker",{attrs:{"show-alpha":"",predefine:this.$root.predefineColors},on:{"active-change":function(e){return t.colorChange(e,"boxShadowColor")}},model:{value:t.componentData.boxShadowColor,callback:function(e){t.$set(t.componentData,"boxShadowColor",e)},expression:"componentData.boxShadowColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:function(e){t.colorReset("rgba(0, 0, 0, 0.2)","boxShadowColor")}}},[t._v("重置")])],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"按钮图标"}},[e("div",{staticStyle:{"padding-left":"70px"}},[e("p",{staticClass:"desc"},[t._v('不传则使用默认"+"图标。')]),e("p",{staticClass:"desc"},[t._v("建议使用正方形图标。")]),e("el-image",{staticStyle:{width:"70px",height:"70px"},attrs:{fit:"contain",src:t.componentData.buttonIcon},nativeOn:{click:function(e){return t.choosebuttonIconImage.apply(null,arguments)}}},[e("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[e("i",{staticClass:"el-icon-picture-outline"})])])],1)]),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"按钮阴影"}},[e("el-radio-group",{model:{value:t.componentData.showShadow,callback:function(e){t.$set(t.componentData,"showShadow",e)},expression:"componentData.showShadow"}},[e("el-radio",{attrs:{label:1}},[t._v("展示")]),e("el-radio",{attrs:{label:0}},[t._v("隐藏")])],1)],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"在线客服"}},[e("el-radio-group",{model:{value:t.componentData.service,callback:function(e){t.$set(t.componentData,"service",e)},expression:"componentData.service"}},[e("el-radio",{attrs:{label:0}},[t._v("展示")]),e("el-radio",{attrs:{label:1}},[t._v("隐藏")])],1)],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"客服图标"}},[e("div",{staticStyle:{"padding-left":"70px"}},[e("p",{staticClass:"desc"},[t._v("不传则使用默认客服图标。")]),e("p",{staticClass:"desc"},[t._v("建议使用正方形图标。")]),e("el-image",{staticStyle:{width:"70px",height:"70px"},attrs:{fit:"contain",src:t.componentData.serviceImage},nativeOn:{click:function(e){return t.chooseServiceImage.apply(null,arguments)}}},[e("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[e("i",{staticClass:"el-icon-picture-outline"})])])],1)]),e("el-form-item",{attrs:{label:"菜单",prop:"fileList"}},[e("p",{staticClass:"desc"},[t._v("最多添加 3 个菜单,鼠标拖拽图片调整导航顺序。")]),e("p",{staticClass:"desc"},[t._v("建议使用正方形图标。")]),e("p",{staticClass:"desc"},[t._v("菜单标题限制在 4 个文字以内,超出显示效果较差。")]),t.componentData.fileList.length<3?e("div",{staticClass:"upload",staticStyle:{"text-align":"center"},on:{click:function(e){return t.chooseImage()}}},[e("el-button",{attrs:{icon:"el-icon-circle-plus-outline",type:"default"}},[t._v("点击选择图片")])],1):t._e(),e("draggable",{staticClass:"el-upload-list el-upload-list--picture",attrs:{tag:"ul",forceFallback:"true",handle:".img"},model:{value:t.componentData.fileList,callback:function(e){t.$set(t.componentData,"fileList",e)},expression:"componentData.fileList"}},t._l(t.componentData.fileList,(function(o,n){return e("li",{key:n,staticClass:"el-upload-list__item is-success"},[e("div",{staticClass:"box"},[e("div",{staticClass:"img"},[e("el-image",{staticStyle:{width:"70px",height:"70px"},attrs:{"preview-src-list":[o.imageUrl],fit:"contain",src:o.imageUrl}})],1),e("div",{staticClass:"right"},[e("div",{staticClass:"title"},[e("span",[t._v("标题")]),e("el-input",{model:{value:o.title,callback:function(e){t.$set(o,"title",e)},expression:"item.title"}})],1),e("div",{staticClass:"link"},[e("span",[t._v("链接")]),e("dropdown",{staticClass:"dropdown",attrs:{page:o.page,childrenComponentIndex:n},on:{select:t.onSelect}})],1)])]),e("i",{staticClass:"el-icon-circle-close deleteFile",on:{click:function(e){return e.stopPropagation(),t.closeItem(n)}}})])})),0)],1)],1)],1)},r=[],a=o("c7eb"),i=o("1da1"),c=o("2909"),l=(o("14d9"),o("a434"),o("d3b7"),o("159b"),o("b76a")),s=o.n(l),u=o("fef9"),f={name:"diy-service",props:["componentData"],data:function(){return{}},methods:{colorChange:function(t,e){this.componentData[e]=t},colorReset:function(t,e){this.componentData[e]=t},closeItem:function(t){this.componentData.fileList.splice(t,1),this.componentData.fileList=Object(c["a"])(this.componentData.fileList),this.uploadFileList=this.componentData.fileList,this.$notify({title:"成功",message:"图片删除成功",type:"success"})},onExceed:function(){this.$notify({title:"警告",message:"最多只能添加20张图片",type:"warning"})},onSelect:function(t){var e=t.data;e.type=3,this.$set(this.componentData.fileList[t.childrenComponentIndex],"page",e)},getFileWidth:function(t){return Object(i["a"])(Object(a["a"])().mark((function e(){return Object(a["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var o=new FileReader;o.readAsDataURL(t),o.onload=function(t){var o=new Image;o.src=t.target.result,o.onload=function(){e(this.width)}}})));case 1:case"end":return e.stop()}}),e)})))()},getPathFileWidth:function(t){return Object(i["a"])(Object(a["a"])().mark((function e(){return Object(a["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var o=new Image;o.src=t,o.onload=function(){e(this.width)}})));case 1:case"end":return e.stop()}}),e)})))()},chooseImage:function(){var t=this,e=3-this.componentData.fileList.length;e>0&&(console.log(e),this.$emit("chooseImage",e,(function(e){e.length>0&&(e.forEach(function(){var e=Object(i["a"])(Object(a["a"])().mark((function e(o){var n;return Object(a["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.getPathFileWidth(o["imageUrl"]);case 2:n=e.sent,t.componentData.fileList.push({imageUrl:o["imageUrl"],imageWidth:n,title:"",page:{}});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t.componentData.fileList=Object(c["a"])(t.componentData.fileList),console.log(t.componentData))})))},chooseServiceImage:function(){var t=this,e=1;e>0&&this.$emit("chooseImage",e,(function(e){e.length>0&&(t.componentData.serviceImage=e[0]["imageUrl"])}))},choosebuttonIconImage:function(){var t=this,e=1;e>0&&this.$emit("chooseImage",e,(function(e){e.length>0&&(t.componentData.buttonIcon=e[0]["imageUrl"])}))}},components:{dropdown:u["a"],draggable:s.a}},p=f,h=(o("dd56"),o("2877")),m=Object(h["a"])(p,n,r,!1,null,null,null);e["default"]=m.exports},"944a":function(t,e,o){"use strict";var n=o("d066"),r=o("e065"),a=o("d44e");r("toStringTag"),a(n("Symbol"),"Symbol")},b636:function(t,e,o){"use strict";var n=o("e065");n("asyncIterator")},c7eb:function(t,e,o){"use strict";o.d(e,"a",(function(){return r}));o("a4d3"),o("e01a"),o("b636"),o("d28b"),o("944a"),o("d9e2"),o("14d9"),o("fb6a"),o("b0c0"),o("0c47"),o("23dc"),o("3410"),o("1f68"),o("131a"),o("d3b7"),o("3ca3"),o("159b"),o("ddb0");var n=o("53ca");function r(){
|
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
r=function(){return e};var t,e={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(t,e,o){t[e]=o.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",u=c.toStringTag||"@@toStringTag";function f(t,e,o){return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,o){return t[e]=o}}function p(t,e,o,n){var r=e&&e.prototype instanceof y?e:y,a=Object.create(r.prototype),c=new $(n||[]);return i(a,"_invoke",{value:S(t,o,c)}),a}function h(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var m="suspendedStart",d="suspendedYield",v="executing",b="completed",g={};function y(){}function w(){}function C(){}var x={};f(x,l,(function(){return this}));var D=Object.getPrototypeOf,k=D&&D(D(P([])));k&&k!==o&&a.call(k,l)&&(x=k);var _=C.prototype=y.prototype=Object.create(x);function L(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function o(r,i,c,l){var s=h(t[r],t,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==Object(n["a"])(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,c,l)}),(function(t){o("throw",t,c,l)})):e.resolve(f).then((function(t){u.value=t,c(u)}),(function(t){return o("throw",t,c,l)}))}l(s.arg)}var r;i(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,r){o(t,n,e,r)}))}return r=r?r.then(a,a):a()}})}function S(e,o,n){var r=m;return function(a,i){if(r===v)throw new Error("Generator is already running");if(r===b){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=I(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===m)throw r=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=v;var s=h(e,o,n);if("normal"===s.type){if(r=n.done?b:d,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=b,n.method="throw",n.arg=s.arg)}}}function I(e,o){var n=o.method,r=e.iterator[n];if(r===t)return o.delegate=null,"throw"===n&&e.iterator["return"]&&(o.method="return",o.arg=t,I(e,o),"throw"===o.method)||"return"!==n&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(r,e.iterator,o.arg);if("throw"===a.type)return o.method="throw",o.arg=a.arg,o.delegate=null,g;var i=a.arg;return i?i.done?(o[e.resultName]=i.value,o.next=e.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,g):i:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function P(e){if(e||""===e){var o=e[l];if(o)return o.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function o(){for(;++r<e.length;)if(a.call(e,r))return o.value=e[r],o.done=!1,o;return o.value=t,o.done=!0,o};return i.next=i}}throw new TypeError(Object(n["a"])(e)+" is not iterable")}return w.prototype=C,i(_,"constructor",{value:C,configurable:!0}),i(C,"constructor",{value:w,configurable:!0}),w.displayName=f(C,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,f(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(O.prototype),f(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,o,n,r,a){void 0===a&&(a=Promise);var i=new O(p(t,o,n,r),a);return e.isGeneratorFunction(o)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),f(_,u,"Generator"),f(_,l,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),o=[];for(var n in e)o.push(n);return o.reverse(),function t(){for(;o.length;){var n=o.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,$.prototype={constructor:$,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var o in this)"t"===o.charAt(0)&&a.call(this,o)&&!isNaN(+o.slice(1))&&(this[o]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var o=this;function n(n,r){return c.type="throw",c.arg=e,o.next=n,r&&(o.method="next",o.arg=t),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var i=r?r.completion:{};return i.type=t,i.arg=e,r?(this.method="next",this.next=r.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),E(o),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var n=o.completion;if("throw"===n.type){var r=n.arg;E(o)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,o,n){return this.delegate={iterator:P(e),resultName:o,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}},cc2b:function(t,e,o){},dd56:function(t,e,o){"use strict";o("cc2b")}}]); |