Browse Source

fix trigger bug

pull/9/head
tangjinzhou 7 years ago
parent
commit
0df2d31eed
  1. 7
      components/trigger/Popup.vue
  2. 4
      components/trigger/index.vue

7
components/trigger/Popup.vue

@ -33,6 +33,13 @@ export default {
this.$refs.alignInstance.forceAlign()
})
},
watch: {
visible (val) {
if (val) {
this.destroyPopup = false
}
},
},
methods: {
onAlign (popupDomNode, align) {
const props = this.$props

4
components/trigger/index.vue

@ -407,7 +407,6 @@ export default {
createTwoChains (event) {
const child = this.$slots.default[0]
let fn = () => {
console.log('event', event)
}
child.data = child.data || {}
child.data.on = child.data.on || {}
@ -462,8 +461,7 @@ export default {
fireEvents (type, e) {
const child = this.$slots.default[0]
if (child && child.data && child.data.on && child.data.on[type]) {
console.log(type, child.data.on[type])
// child.data.on[type](e)
child.data.on[type](e)
}
if (this.data && this.data.on && this.data.on[type]) {
this.data.on[type](e)

Loading…
Cancel
Save