vue-ui-wl
Version:
vue component
2 lines • 5.19 kB
JavaScript
webpackJsonp([6],{106:function(t,n){},119:function(t,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={props:{popOption:{type:Object,twoWay:!0,default:function(){return{show:!0,showClose:!0,btnAlign:"center",btnConfirm:{name:"确定",show:!0},btnCancel:{name:"取消",show:!0}}}},btnConfirmCallback:{type:Function,default:function(){return function(){}}},btnCancelCallback:{type:Function,default:function(){return function(){}}}},data:function(){return{options:this.popOption}},methods:{btnConfirmClick:function(){this.hide(),this.btnConfirmCallback()},btnCancelClick:function(){this.hide(),this.btnCancelCallback()},hide:function(){this.options.show=!1}},watch:{popOption:{handler:function(t){this.options=t},deep:!0}}}},133:function(t,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var e=o(36),i=function(t){return t&&t.__esModule?t:{default:t}}(e);n.default={components:{Popups:i.default},data:function(){return{popOption:{show:!0,width:400,showClose:!0,btnAlign:"right",btnConfirm:{name:"不确定",show:!0},btnCancel:{name:"取消",show:!0}}}},methods:{showPop:function(t,n,o){this.popOption.width=t,this.popOption.height=n,this.popOption.showClose=!o,this.popOption.show=!0},modalConfirm:function(){console.log("confirm")},modalCancel:function(){console.log("cancel")}}}},147:function(t,n,o){t.exports=o(21)},2:function(t,n,o){o(4);var e=o(0)(o(6),o(3),"data-v-12f6e127",null);t.exports=e.exports},21:function(t,n,o){"use strict";function e(t){return t&&t.__esModule?t:{default:t}}var i=o(1),s=e(i),a=o(50),p=e(a),c=o(5),l=e(c);s.default.config.productionTip=!1,new s.default({el:"#popups",router:l.default,template:"<Popups/>",components:{Popups:p.default}})},3:function(t,n){t.exports={render:function(){var t=this,n=t.$createElement;return(t._self._c||n)("div")},staticRenderFns:[]}},36:function(t,n,o){o(106);var e=o(0)(o(119),o(77),"data-v-9dbb157c",null);t.exports=e.exports},4:function(t,n){},5:function(t,n,o){"use strict";function e(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0});var i=o(1),s=e(i),a=o(7),p=e(a),c=o(2),l=e(c);s.default.use(p.default),n.default=new p.default({routes:[{path:"/",name:"Index",component:l.default}]})},50:function(t,n,o){o(86);var e=o(0)(o(133),o(57),"data-v-045acd40",null);t.exports=e.exports},57:function(t,n){t.exports={render:function(){var t=this,n=t.$createElement,o=t._self._c||n;return o("div",{staticClass:"content"},[o("input",{attrs:{type:"button",value:"大"},on:{click:function(n){t.showPop("80%","40%")}}}),t._v(" "),o("input",{attrs:{type:"button",value:"中"},on:{click:function(n){t.showPop("60%")}}}),t._v(" "),o("input",{attrs:{type:"button",value:"小"},on:{click:function(n){t.showPop("40%",200)}}}),t._v(" "),o("input",{attrs:{type:"button",value:"不显示叉叉"},on:{click:function(n){t.showPop("60%",200,!0)}}}),t._v(" "),o("popups",{attrs:{"pop-option":t.popOption,"btn-confirm-callback":t.modalConfirm,"btn-cancel-callback":t.modalCancel,"show-close":t.popOption.showClose},on:{"update:popOption":function(n){t.popOption=n}}},[o("div",{attrs:{slot:"header"},slot:"header"},[t._v("\n 这里是头部\n ")]),t._v(" "),o("div",{attrs:{slot:"body"},slot:"body"},[t._v("\n 这里是内容\n ")])])],1)},staticRenderFns:[]}},6:function(t,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={}},77:function(t,n){t.exports={render:function(){var t=this,n=t.$createElement,o=t._self._c||n;return o("transition",{attrs:{name:"pop"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:1==t.popOption.show,expression:"popOption.show==true"}],staticClass:"pop-mask",attrs:{transition:"pop"}},[o("div",{staticClass:"pop-wrapper"},[o("div",{staticClass:"pop-container pop-container-padding",style:{width:t.options.width?(t.options.width+"").indexOf("%")>0?t.options.width:t.options.width+"px":"auto",height:t.options.height?(t.options.height+"").indexOf("%")>0?t.options.height:t.options.height+"px":"auto"}},[t.options.showClose?o("a",{staticClass:"pop-close",on:{click:t.hide}},[t._v("X\n ")]):t._e(),t._v(" "),o("div",{staticClass:"pop-header"},[t._t("header",[t._v("\n header\n ")])],2),t._v(" "),o("div",{staticClass:"pop-body"},[t._t("body",[t._v("\n body\n ")])],2),t._v(" "),o("div",{staticClass:"pop-footer",class:{left:"left"===t.options.btnAlign,center:"center"===t.options.btnAlign,right:"right"===t.options.btnAlign}},[t._t("footer",[o("button",{directives:[{name:"show",rawName:"v-show",value:t.options.btnCancel.show,expression:"options.btnCancel.show"}],staticClass:"pop-default-button pop-default-cancel",on:{click:t.btnCancelClick}},[t._v("\n "+t._s(t.options.btnCancel.name)+"\n ")]),t._v(" "),o("button",{directives:[{name:"show",rawName:"v-show",value:t.options.btnConfirm.show,expression:"options.btnConfirm.show"}],staticClass:"pop-default-button pop-default-sure",on:{click:t.btnConfirmClick}},[t._v("\n "+t._s(t.options.btnConfirm.name)+"\n ")])])],2)])])])])},staticRenderFns:[]}},86:function(t,n){}},[147]);
//# sourceMappingURL=popups.14e168c2339396dc349e.js.map