mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-12-08 20:48:46 +00:00
Changed "modal" class name to "v--modal-box" to fix a clash with bootstrap class name
This commit is contained in:
@@ -168,9 +168,11 @@
|
|||||||
top: inRange(0, maxTop, top)
|
top: inRange(0, maxTop, top)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
modalClass () {
|
modalClass () {
|
||||||
return ['modal', this.classes]
|
return ['v--modal-box', this.classes]
|
||||||
},
|
},
|
||||||
|
|
||||||
modalStyle () {
|
modalStyle () {
|
||||||
return {
|
return {
|
||||||
top: this.position.top + 'px',
|
top: this.position.top + 'px',
|
||||||
@@ -190,6 +192,7 @@
|
|||||||
this.modal.height = inRange(0, this.window.height, this.modal.height)
|
this.modal.height = inRange(0, this.window.height, this.modal.height)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
genEventObject (params) {
|
genEventObject (params) {
|
||||||
//todo: clean this up (change to ...)
|
//todo: clean this up (change to ...)
|
||||||
return Vue.util.extend({
|
return Vue.util.extend({
|
||||||
@@ -198,6 +201,7 @@
|
|||||||
timestamp: Date.now()
|
timestamp: Date.now()
|
||||||
}, params || {});
|
}, params || {});
|
||||||
},
|
},
|
||||||
|
|
||||||
resize (event) {
|
resize (event) {
|
||||||
this.modal.width = event.size.width
|
this.modal.width = event.size.width
|
||||||
this.modal.height = event.size.height
|
this.modal.height = event.size.height
|
||||||
@@ -207,6 +211,7 @@
|
|||||||
|
|
||||||
this.$emit('resize', resizeEvent)
|
this.$emit('resize', resizeEvent)
|
||||||
},
|
},
|
||||||
|
|
||||||
toggle (state, params) {
|
toggle (state, params) {
|
||||||
const beforeEventName = this.visible ? 'before-close' : 'before-open'
|
const beforeEventName = this.visible ? 'before-close' : 'before-open'
|
||||||
const afterEventName = this.visible ? 'closed' : 'opened'
|
const afterEventName = this.visible ? 'closed' : 'opened'
|
||||||
@@ -228,7 +233,7 @@
|
|||||||
|
|
||||||
getDraggableElement () {
|
getDraggableElement () {
|
||||||
var selector = typeof this.draggable !== 'string'
|
var selector = typeof this.draggable !== 'string'
|
||||||
? '.modal'
|
? '.v--modal-box'
|
||||||
: this.draggable
|
: this.draggable
|
||||||
|
|
||||||
if (selector) {
|
if (selector) {
|
||||||
@@ -297,7 +302,7 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.v--modal-overlay .modal {
|
.v--modal-overlay .v--modal-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
Reference in New Issue
Block a user