提交 0cdd3449 编写于 作者: fxy060608's avatar fxy060608

Merge branch 'dev' of https://github.com/dcloudio/uni-app into v3

......@@ -39,6 +39,7 @@ const uniPath = process.env.UNI_USING_V8
const provide = {}
if (process.env.UNI_USING_V3 || process.env.UNI_USING_NATIVE) {
provide['uni.getCurrentSubNVue'] = [path.resolve(__dirname, '../packages/uni-app-plus-nvue/dist/get-current-sub-nvue.js'), 'default']
provide['uni.requireNativePlugin'] = [path.resolve(__dirname, '../packages/uni-app-plus-nvue/dist/require-native-plugin.js'), 'default']
}
......
export default function getCurrentSubNVue() {
return uni.getSubNVueById(plus.webview.currentWebview().id)
}
......@@ -33,8 +33,7 @@ function addEventListener (pageId, callback) {
channel && channel.close()
channel = new BroadcastChannel_(getPageId())
channel.onmessage = onPlusMessage
} else {
globalEvent && globalEvent.removeEventListener('plusMessage', onPlusMessage)
} else if (!globalEvent) {
globalEvent = weex_.requireModule('globalEvent')
globalEvent.addEventListener('plusMessage', onPlusMessage)
}
......@@ -78,7 +77,7 @@ export function showPage ({
// eslint-disable-next-line
plus_ = context.plus || plus
// eslint-disable-next-line
weex_ = context.weex || weex
weex_ = context.weex || (typeof weex === 'object' ? weex : null)
// eslint-disable-next-line
BroadcastChannel_ = context.BroadcastChannel || (typeof BroadcastChannel === 'object' ? BroadcastChannel : null)
const titleNView = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册