提交 7dfd3a9f 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

refactor(dialogPage): 调整 eventBus 用法

上级 31ce189a
......@@ -55,13 +55,13 @@
// 自动化测试
setLifeCycleNum(state.lifeCycleNum + 1)
}
dialogPage.$emit('fn1', { from: 'dialog1' })
dialogPage.$emit('fn2', null)
dialogPage.$off('fn2', null)
dialogPage.$emit('fn1', { from: 'dialog1' })
dialogPage.$emit('fn2', null)
dialogPage.$emit('fnOnce', null)
dialogPage.$emit('fnOnce', null)
dialogPage.emit('fn1', { from: 'dialog1' })
dialogPage.emit('fn2', null)
dialogPage.off('fn2', null)
dialogPage.emit('fn1', { from: 'dialog1' })
dialogPage.emit('fn2', null)
dialogPage.emit('fnOnce', null)
dialogPage.emit('fnOnce', null)
},
onHide() {
......
......@@ -73,10 +73,10 @@
console.log('dialogPage1 be triggered fnOnce', options)
setLifeCycleNum(state.lifeCycleNum + 1)
}
dialogPage.$on('fn1', fn1)
dialogPage.$on('fn1', fn11)
dialogPage.$on('fn2', fn2)
dialogPage.$once('fnOnce', fnOnce)
dialogPage.on('fn1', fn1)
dialogPage.on('fn1', fn11)
dialogPage.on('fn2', fn2)
dialogPage.once('fnOnce', fnOnce)
},
openDialog2() {
uni.openDialogPage({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册