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

feat(v3): add uni-view-update

上级 81699c7a
......@@ -69,6 +69,19 @@ function broadcast (vm, componentName, eventName, ...params) {
})
}
const NATIVE_COMPONENTS = ['Camera', 'LivePlayer', 'LivePusher', 'Map', 'Video']
function updateView () {
const pages = getCurrentPages()
pages.length && broadcast(
pages[0].$vm,
NATIVE_COMPONENTS,
'uni-view-update'
)
}
window.addEventListener('resize', updateView)
function vdSync ({
data,
options
......@@ -82,11 +95,7 @@ function vdSync ({
})
vd.flush()
Vue.nextTick(() => {
broadcast(
getCurrentPages()[0].$vm,
['Camera', 'LivePlayer', 'LivePusher', 'Map', 'Video'],
'uni-view-update'
)
updateView()
isVdCallback && UniViewJSBridge.publishHandler(VD_SYNC_CALLBACK)
})
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册