Skip to content

Commit

Permalink
Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
javisperez committed Jul 1, 2017
1 parent c9b7362 commit 928cd86
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/vuedals.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ compiledTemplate&&(options.render=compiledTemplate.render,options.staticRenderFn
// scopedId
scopeId&&(options._scopeId=scopeId),cssModules){var computed=options.computed||(options.computed={});Object.keys(cssModules).forEach(function(key){var module=cssModules[key];computed[key]=function(){return module}})}return{esModule:esModule,exports:scriptExports,options:options}}},/* 28 */
/***/
function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _assign=__webpack_require__(29),_assign2=_interopRequireDefault(_assign),_bus=__webpack_require__(1),_bus2=_interopRequireDefault(_bus);exports.default={name:"vuedals",created:function(){var _this=this;_bus2.default.$on("new",function(options){var defaults={title:null,dismisable:!0,name:"",size:"md",onClose:function(){},onDismiss:function(){}};options=(0,_assign2.default)(defaults,options),_this.vuedals.push(options),_bus2.default.$emit("opened",{index:_this.vuedals.length-1,options:options})}),_bus2.default.$on("close",function(data){return _this.close(data)}),_bus2.default.$on("dismiss",function(_){return _this.dismiss()})},data:function(){return{vuedals:[]}},methods:{splice:function(index){return 0===index&&_bus2.default.$emit("destroyed"),index?void(index!==-1&&this.vuedals.splice(index,1)):void this.vuedals.pop()},close:function(){var data=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,index=this.vuedals.length-1;_bus2.default.$emit("closed",{index:index,instance:this.vuedals[index],data:data}),this.vuedals[index].onClose(data),this.splice(index)},dismiss:function(){var index=this.vuedals.length-1;_bus2.default.$emit("dismissed",{index:index,instance:this.vuedals[index]}),this.vuedals[index].onDismiss(),this.splice(index)},getCssClasses:function(index){var vuedal=this.vuedals[index],classNames=vuedal.name+" "+vuedal.size;return index<this.$last&&(classNames+=" disabled"),classNames}},computed:{$last:function(){return this.vuedals.length-1}}}},/* 29 */
function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _assign=__webpack_require__(29),_assign2=_interopRequireDefault(_assign),_bus=__webpack_require__(1),_bus2=_interopRequireDefault(_bus);exports.default={name:"vuedals",created:function(){var _this=this;_bus2.default.$on("new",function(options){var defaults={title:null,dismisable:!0,name:"",size:"md",onClose:function(){},onDismiss:function(){}};options=(0,_assign2.default)(defaults,options),_this.vuedals.push(options),_bus2.default.$emit("opened",{index:_this.vuedals.length-1,options:options}),document.querySelector(".vuedals").scrollTop=0}),_bus2.default.$on("close",function(data){return _this.close(data)}),_bus2.default.$on("dismiss",function(_){return _this.dismiss()})},data:function(){return{vuedals:[]}},methods:{splice:function(index){return 0===index&&_bus2.default.$emit("destroyed"),index?void(index!==-1&&this.vuedals.splice(index,1)):void this.vuedals.pop()},close:function(){var data=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,index=this.vuedals.length-1;_bus2.default.$emit("closed",{index:index,instance:this.vuedals[index],data:data}),this.vuedals[index].onClose(data),this.splice(index),document.querySelector(".vuedals").scrollTop=0},dismiss:function(){var index=this.vuedals.length-1;_bus2.default.$emit("dismissed",{index:index,instance:this.vuedals[index]}),this.vuedals[index].onDismiss(),this.splice(index),document.querySelector(".vuedals").scrollTop=0},getCssClasses:function(index){var vuedal=this.vuedals[index],classNames=vuedal.name+" "+vuedal.size;return index<this.$last&&(classNames+=" disabled"),classNames}},computed:{$last:function(){return this.vuedals.length-1}}}},/* 29 */
/***/
function(module,exports,__webpack_require__){module.exports={default:__webpack_require__(30),__esModule:!0}},/* 30 */
/***/
Expand Down
Loading

0 comments on commit 928cd86

Please sign in to comment.