text: (function(t){function e(e){for(var a,s,c=e[0],o=e[1],l=e[2],f=0,d=[];f<c.length;f++)s=c[f],Object.prototype.hasOwnProperty.call(i,s)&&i[s]&&d.push(i[s][0]),i[s]=0;for(a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a]);u&&u(e);while(d.length)d.shift()();return r.push.apply(r,l||[]),n()}function n(){for(var t,e=0;e<r.length;e++){for(var n=r[e],a=!0,c=1;c<n.length;c++){var o=n[c];0!==i[o]&&(a=!1)}a&&(r.splice(e--,1),t=s(s.s=n[0]))}return t}var a={},i={app:0},r=[];function s(e){if(a[e])return a[e].exports;var n=a[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=t,s.c=a,s.d=function(t,e,n){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},s.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)s.d(n,a,function(e){return t[e]}.bind(null,a));return n},s.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="";var c=window["webpackJsonp"]=window["webpackJsonp"]||[],o=c.push.bind(c);c.push=e,c=c.slice();for(var l=0;l<c.length;l++)e(c[l]);var u=o;r.push([0,"chunk-vendors"]),n()})({0:function(t,e,n){t.exports=n("56d7")},"0391":function(t,e,n){"use strict";n("670c")},"158a":function(t,e,n){},"18fe":function(t,e,n){},"1c34":function(t,e,n){"use strict";n("f92b")},"1dc9":function(t,e,n){},"228c":function(t,e,n){},2395:function(t,e,n){},"3dc6":function(t,e,n){},"44f6":function(t,e,n){},"4f5c":function(t,e,n){"use strict";n("18fe")},"56d7":function(t,e,n){"use strict";n.r(e);n("e260"),n("e6cf"),n("cca6"),n("a79d");var a=n("2b0e"),i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},r=[],s=(n("7c55"),n("2877")),c={},o=Object(s["a"])(c,i,r,!1,null,null,null),l=o.exports,u=n("8c4f"),f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"head-area"},[n("van-button",{staticStyle:{"margin-right":"10px"},attrs:{type:"info",size:"mini"},on:{click:t.preview}},[t._v("预览")]),n("van-button",{attrs:{type:"info",size:"mini"}},[t._v("保存")])],1),n("div",{staticClass:"main-area"},[n("section",{staticClass:"left"},[n("left-area",{attrs:{active:t.active},on:{"update:active":function(e){t.active=e}}})],1),0===t.active?n("section",{staticClass:"left-add"},[n("left-area-add")],1):t._e(),n("section",{staticClass:"middle"},[n("middle-area")],1),n("section",{staticClass:"right"},[n("right-area")],1)]),n("pre-view-dialog",{attrs:{show:t.show},on:{"update:show":function(e){t.show=e}}})],1)},d=[],p=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"left-container"},[n("van-sidebar",{on:{change:t.onChange},model:{value:t.activeKey,callback:function(e){t.activeKey=e},expression:"activeKey"}},[n("van-sidebar-item",{attrs:{title:"基础物料"}})],1)],1)},v=[],m={props:["active"],data:function(){return{activeKey:-1}},methods:{onChange:function(t){this.$emit("update:active",t)}}},h=m,b=(n("6c5d"),Object(s["a"])(h,p,v,!1,null,"3bd21670",null)),y=b.exports,g=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"left-area-add"},t._l(t.materials,(function(e,a){return n("section",{key:a,staticClass:"item",attrs:{draggable:"true",id:e.name},on:{dragend:function(e){return t.endMove(e)}}},[n("div",{staticClass:"icon"},[n("van-icon",{attrs:{name:e.icon,size:"1.5rem",color:"#1E90FF"}})],1),n("div",{staticClass:"name"},[t._v(" "+t._s(e.label)+" ")])])})),0)},_=[],w=(n("4de4"),n("b0c0"),n("1157")),C=n.n(w),x=[{icon:"star-o",label:"轮播图",name:"my-swipe",attrs:[{label:"图片链接",value:[""],type:"array",attrType:0,prop:"images"},{label:"跳转链接",value:[""],type:"array",attrType:0,prop:"links"}]},{icon:"setting-o",label:"环形进度条",name:"my-circle",attrs:[{label:"环形占比",value:"",type:"number",attrType:0,prop:"currentRate"}]},{icon:"fire-o",label:"分割线",name:"my-divider",attrs:[{label:"文字",value:"",type:"string",attrType:0,prop:"text"},{label:"线体颜色",value:"",type:"string",attrType:1,prop:"borderColor"},{label:"文本颜色",value:"",type:"string",attrType:1,prop:"color"}]},{icon:"replay",label:"加载",name:"van-loading"},{icon:"coupon-o",label:"列表",name:"my-list",attrs:[{label:"数据来源",value:"",type:"string",attrType:0,prop:"list",get:!0,placeholder:"如 /list"}]}],j={data:function(){return{materials:x}},methods:{endMove:function(t){var e=t.srcElement,n=t.clientX,a=C()("#material"),i=a.position().left;if(n>i&&n<i+375){var r=e.id,s=x.filter((function(t){return t.name===r}))[0];this.$EventBus.$emit("material",JSON.parse(JSON.stringify(s)))}}}},k=j,E=(n("bada"),Object(s["a"])(k,g,_,!1,null,"21a16ed7",null)),O=E.exports,M=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"middle-container"},[n("section",{staticClass:"layout-space",attrs:{id:"material"},on:{click:t.clickSpace}},[n("draggable",{attrs:{list:t.materials}},[n("transition-group",{staticClass:"item-list",attrs:{id:"item-list"}},t._l(t.materials,(function(e,a){return n("div",{key:a+e.name,class:{active:t.selected===a,item:!0},on:{click:function(n){return n.stopPropagation(),t.activeItem(e,a)},contextmenu:function(n){return n.preventDefault(),t.onContextmenu(e,a)}}},[n(e.name,{tag:"component",attrs:{attrs:e.attrs}})],1)})),0)],1)],1)])},$=[],A=(n("a434"),n("b76a")),S=n.n(A),T={components:{draggable:S.a},data:function(){return{materials:[],selected:""}},methods:{onContextmenu:function(t,e){var n=this,a={onTop:function(t){var e=n.materials.splice(t,1)[0];n.materials.unshift(e)},onBack:function(t){var e=n.materials.splice(t,1)[0];n.materials.push(e)},onDelete:function(t){n.materials.splice(t,1)}};return this.$contextmenu({items:[{label:"置顶",onClick:function(){return a.onTop(e)}},{label:"置后",onClick:function(){return a.onBack(e)}},{label:"删除",onClick:function(){return a.onDelete(e)}}],event:event,customClass:"class-a",minWidth:230,zIndex:9999}),!1},activeItem:function(t,e){this.selected=e,this.$EventBus.$emit("selectedMeterial",t)},clickSpace:function(){this.selected=-1},init:function(){var t=this;this.$EventBus.$on("material",(function(e){e&&t.materials.push(e)}))}},mounted:function(){this.init()}},R=T,D=(n("e689"),Object(s["a"])(R,M,$,!1,null,"59b8805b",null)),P=D.exports,L=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"right-area"},[n("section",[n("van-tabs",{model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[n("van-tab",{attrs:{title:"基础属性"}}),n("van-tab",{attrs:{title:"样式属性"}}),n("van-tab",{attrs:{title:"其他属性"}})],1)],1),n("section",{staticClass:"attr-area"},t._l(t.showAttrs,(function(e){return n("div",{key:e.label,staticClass:"item"},[n("span",{staticClass:"label"},[t._v(t._s(e.label)+":")]),"array"===e.type?n("span",{staticClass:"value"},[t._l(e.value,(function(a,i){return n("van-field",{key:i,staticStyle:{width:"100px","margin-bottom":"10px"},attrs:{placeholder:"请输入",title:e.value[i]},model:{value:e.value[i],callback:function(n){t.$set(e.value,i,n)},expression:"item.value[index]"}})})),n("van-button",{staticStyle:{"margin-left":"10px",transform:"translateY(-5px)"},attrs:{type:"info",size:"mini"},on:{click:function(n){return t.handleAdd(e)}}},[t._v("添加")])],2):t._e(),"string"===e.type?n("span",{staticClass:"value"},[n("van-field",{attrs:{placeholder:e.placeholder||"请输入"},model:{value:e.value,callback:function(n){t.$set(e,"value",n)},expression:"item.value"}})],1):t._e(),"number"===e.type?n("span",{staticClass:"value"},[n("van-field",{attrs:{placeholder:"请输入数字",oninput:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.value,callback:function(n){t.$set(e,"value",n)},expression:"item.value"}})],1):t._e()])})),0)])},B=[],I={data:function(){return{active:0,item:{}}},computed:{showAttrs:function(){var t=this,e=this.item.attrs||[];return e.filter((function(e){return e.attrType===t.active}))}},methods:{handleAdd:function(t){t.value.push("")},init:function(){var t=this;this.$EventBus.$on("selectedMeterial",(function(e){t.item=e}))}},mounted:function(){this.init()}},z=I,N=(n("fd51"),Object(s["a"])(z,L,B,!1,null,"b31ffdf4",null)),J=N.exports,K=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.show?n("div",{staticClass:"container-meng"},[n("div",{staticClass:"preview-dialog",on:{click:function(t){t.stopPropagation()}}},[n("section",{staticClass:"title"},[n("my-title",[t._v("预览")])],1),n("section",{staticClass:"content"},[n("img",{staticClass:"postImage",attrs:{src:t.imgPreviewSrc}})])])]):t._e()},F=[],U=n("c0e9"),V=n.n(U),q={props:{show:{type:Boolean,default:!1}},data:function(){return{imgPreviewSrc:""}},watch:{show:function(){this.show&&this.getCanvas()}},methods:{close:function(){this.$emit("update:show",!1)},getCanvas:function(){var t=this,e=document.getElementById("material");V()(e,{dpi:window.devicePixelRatio,useCORS:!0,scale:1}).then((function(e){var n=e.toDataURL("image/png");t.imgPreviewSrc=n})),this.init()},init:function(){var t=this;setTimeout((function(){var e=document.querySelector(".container-meng");e.addEventListener("click",(function(){t.close()}))}))}}},G=q,W=(n("4f5c"),Object(s["a"])(G,K,F,!1,null,"6f2abe14",null)),X=W.exports,Y={components:{LeftArea:y,LeftAreaAdd:O,MiddleArea:P,RightArea:J,PreViewDialog:X},data:function(){return{active:-1,show:!1}},methods:{preview:function(){this.show=!0}}},H=Y,Q=(n("0391"),Object(s["a"])(H,f,d,!1,null,"73204408",null)),Z=Q.exports;a["a"].use(u["a"]);var tt=[{path:"/",redirect:"/dashboard"},{path:"/dashboard",component:Z}],et=new u["a"]({mode:"hash",base:"",routes:tt}),nt=et,at=n("2f62");a["a"].use(at["a"]);var it=new at["a"].Store({state:{materials:[]},mutations:{ADD_MATERIALS:function(t,e){var n={name:e};t.materials.push(n)},REMOVE_MATERIALS:function(t,e){t.materials=t.materials.filter((function(t){return t.name!==e}))}},actions:{Add_Material:function(t,e){t.commit("ADD_MATERIALS",e)},Remove_Material:function(t,e){t.commit("REMOVE_MATERIALS",e)}},modules:{}}),rt=n("b970"),st=(n("833e"),n("c37c"),n("1dc9"),n("4160"),n("d3b7"),n("159b"),n("ddb0"),n("ffe0"));st.keys().forEach((function(t){var e=st(t).default;a["a"].component(e.name,e)}));var ct=n("e5d9"),ot=n("bc3a"),lt=n.n(ot),ut=n("94db"),ft=n.n(ut),dt={bootstrap:function(){var t=new ft.a(lt.a);t.onGet("/list").reply((function(t){return new Promise((function(t,e){t([200,{msg:"success",data:{list:[{id:1},{id:2}]}}])}))}))}},pt=n("2106"),vt=n.n(pt);a["a"].use(ct["a"]),dt.bootstrap(),a["a"].prototype.$EventBus=new a["a"],a["a"].use(rt["a"]),a["a"].use(vt.a,lt.a),a["a"].config.productionTip=!1,new a["a"]({router:nt,store:it,render:function(t){return t(l)}}).$mount("#app")},5771:function(t,e,n){},"670c":function(t,e,n){},"6c5d":function(t,e,n){"use strict";n("158a")},"7c55":function(t,e,n){"use strict";n("2395")},"92ff":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"empty-area"},[t._t("default")],2)},i=[],r={name:"MyEmpty"},s=r,c=(n("d6c7"),n("2877")),o=Object(c["a"])(s,a,i,!1,null,"d8807d84",null);e["default"]=o.exports},"967d":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("van-circle",{attrs:{rate:0,speed:100,"layer-color":"#ebedf0"},model:{value:t.currentRate,callback:function(e){t.currentRate=e},expression:"currentRate"}})},i=[],r=(n("4de4"),n("a9e3"),{name:"MyCircle",props:{attrs:{type:Array,default:function(){return[]}}},data:function(){return{currentRate:0}},watch:{attrs:{deep:!0,handler:function(){if(this.attrs.length){var t=this.attrs.filter((function(t){return"currentRate"===t.prop}))[0];this.currentRate=Number(t.value)||0}}}}}),s=r,c=n("2877"),o=Object(c["a"])(s,a,i,!1,null,"9570bc64",null);e["default"]=o.exports},a66a:function(t,e,n){"use strict";n("d0a5")},bada:function(t,e,n){"use strict";n("44f6")},bee2:function(t,e,n){"use strict";n("5771")},c37c:function(t,e,n){},d0a5:function(t,e,n){},d675:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"list-area"},[t.obj.list.length?n("section",[n("ul",t._l(t.obj.list,(function(e){return n("li",{key:e.id},[t._v(t._s(e.id))])})),0)]):n("section",[n("div",[n("my-empty",[t._v("请在右侧填写数据来源")])],1)])])},i=[],r=(n("4de4"),n("4160"),n("b64b"),n("159b"),n("96cf"),n("1da1")),s=n("bc3a"),c=n.n(s),o={get:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e,n){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("".concat(e),{params:n}).then((function(t){return t.data})).catch((function(t){return t}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));function e(e,n){return t.apply(this,arguments)}return e}()},l=o,u={name:"MyList",props:{attrs:{type:Array,default:function(){return[]}}},data:function(){return{obj:{list:[]}}},watch:{attrs:{deep:!0,handler:function(){var t=this;this.attrs.length&&Object.keys(this.obj).forEach((function(e){var n=t.attrs.filter((function(t){return t.prop===e}))[0];console.log(n),n.get&&t.getData(e,n.value)}))}}},methods:{getData:function(t,e){var n=this,a={list:function(){l.get(e).then((function(e){console.log(e),n.obj[t]=e.data.list||n.obj[t]}))}};a[t]()}}},f=u,d=(n("a66a"),n("2877")),p=Object(d["a"])(f,a,i,!1,null,"3212f927",null);e["default"]=p.exports},d6c7:function(t,e,n){"use strict";n("3dc6")},e00c:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"title-container"},[n("section",{staticClass:"title-area"},[n("p",[n("span",[t._t("default")],2)])])])},i=[],r={name:"MyTitle",data:function(){return{}},methods:{},created:function(){},mounted:function(){}},s=r,c=(n("1c34"),n("2877")),o=Object(c["a"])(s,a,i,!1,null,"0bb56b03",null);e["default"]=o.exports},e689:function(t,e,n){"use strict";n("f4da")},f4da:function(t,e,n){},f92b:function(t,e,n){},fa67:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("van-divider",{style:{color:t.obj.color,borderColor:t.obj.borderColor,padding:"0 16px"}},[t._v(t._s(t.obj.text))])},i=[],r=(n("4de4"),n("4160"),n("b64b"),n("159b"),{name:"MyDivider",props:{attrs:{type:Array,default:function(){return[]}}},data:function(){return{obj:{text:"",color:"",borderColor:""}}},watch:{attrs:{deep:!0,handler:function(){var t=this;this.attrs.length&&Object.keys(this.obj).forEach((function(e){var n=t.attrs.filter((function(t){return t.prop===e}))[0];t.obj[e]=n.value}))}}}}),s=r,c=n("2877"),o=Object(c["a"])(s,a,i,!1,null,"28054e8a",null);e["default"]=o.exports},fad6:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("van-swipe",{staticClass:"my-swipe",attrs:{autoplay:2e3}},t._l(t.obj.images,(function(e,a){return n("van-swipe-item",{key:a},[n("img",{staticStyle:{width:"100%",height:"100%"},attrs:{src:e},on:{click:function(e){return t.handleClick("link",t.obj.links[a])}}})])})),1)},i=[],r=(n("4de4"),n("4160"),n("b64b"),n("159b"),n("2909")),s={name:"MySwipe",props:{attrs:{type:Array,default:function(){return[]}}},data:function(){return{obj:{images:[""],links:[]}}},watch:{attrs:{deep:!0,handler:function(){var t=this;this.attrs.length&&Object.keys(this.obj).forEach((function(e){var n=t.attrs.filter((function(t){return t.prop===e}))[0];t.obj[e]=n.value}))}}},methods:{handleClick:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),a=1;a<e;a++)n[a-1]=arguments[a];switch(n=Object(r["a"])(n),t){case"link":n[0]&&window.open(n[0]);break}}}},c=s,o=(n("bee2"),n("2877")),l=Object(o["a"])(c,a,i,!1,null,"77fe51e4",null);e["default"]=l.exports},fd51:function(t,e,n){"use strict";n("228c")},ffe0:function(t,e,n){var a={"./MyCircle/index.vue":"967d","./MyDivider/index.vue":"fa67","./MyEmpty/index.vue":"92ff","./MyList/index.vue":"d675","./MySwipe/index.vue":"fad6","./MyTitle/index.vue":"e00c"};function i(t){var e=r(t);return n(e)}function r(t){if(!n.o(a,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return a[t]}i.keys=function(){return Object.keys(a)},i.resolve=r,t.exports=i,i.id="ffe0"}});
  //# sourceMappingURL=app.52eeb15e.js.map