| | |
| | | import config from '../common/config'; |
| | | import props from './props'; |
| | | import transition from '../mixins/transition'; |
| | | import useCustomNavbar from '../mixins/using-custom-navbar'; |
| | | delete props.visible; |
| | | const { prefix } = config; |
| | | const name = `${prefix}-popup`; |
| | |
| | | constructor() { |
| | | super(...arguments); |
| | | this.externalClasses = [`${prefix}-class`, `${prefix}-class-content`]; |
| | | this.behaviors = [transition()]; |
| | | this.behaviors = [transition(), useCustomNavbar]; |
| | | this.options = { |
| | | multipleSlots: true, |
| | | }; |
| | |
| | | classPrefix: name, |
| | | }; |
| | | this.methods = { |
| | | onStopPropagation() { }, |
| | | handleOverlayClick() { |
| | | const { closeOnOverlayClick } = this.properties; |
| | | if (closeOnOverlayClick) { |
| | | this.triggerEvent('visible-change', { visible: false }); |
| | | this.triggerEvent('visible-change', { visible: false, trigger: 'overlay' }); |
| | | } |
| | | }, |
| | | handleClose() { |
| | | this.triggerEvent('visible-change', { visible: false }); |
| | | this.triggerEvent('visible-change', { visible: false, trigger: 'close-btn' }); |
| | | }, |
| | | }; |
| | | } |