Skip to content

Commit 75b0d02

Browse files
authored
Merge pull request #281 from F-loat/fix-vm-err
fix: #279 页面实例引用错误
2 parents e6e3b53 + 89e8813 commit 75b0d02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/platforms/mp/runtime/events.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ export function handleProxyWithVue (e) {
101101
const event = getWebEventByMP(e)
102102
handles.forEach(h => h(event))
103103
} else {
104-
const currentPage = vm.$mp.page.route
104+
const { route } = rootVueVM.$mp.page
105105
console.group(new Date() + ' 事件警告')
106-
console.warn(`Do not have handler in current page: ${currentPage}. Please make sure that handler has been defined in ${currentPage}, or ${currentPage} has been added into app.json`)
106+
console.warn(`Do not have handler in current page: ${route}. Please make sure that handler has been defined in ${route}, or ${route} has been added into app.json`)
107107
console.groupEnd()
108108
}
109109
}

0 commit comments

Comments
 (0)