提交 90391e7b 编写于 作者: Q qiang

Merge branch 'fix-subnvue' into dev

...@@ -71,8 +71,14 @@ export function initSubNVue (nvue, plus, BroadcastChannel) { ...@@ -71,8 +71,14 @@ export function initSubNVue (nvue, plus, BroadcastChannel) {
const maskColor = webview.__uniapp_mask const maskColor = webview.__uniapp_mask
let maskWebview = plus.webview.getWebviewById(webview.__uniapp_mask_id) let maskWebview = webview.__uniapp_mask_id === '0' ? {
maskWebview = maskWebview.parent() || maskWebview // 再次检测父 setStyle ({ mask }) {
nvue.requireModule('uni-tabview').setMask({
color: mask
})
}
} : plus.webview.getWebviewById(webview.__uniapp_mask_id)
const oldShow = webview.show const oldShow = webview.show
const oldHide = webview.hide const oldHide = webview.hide
const oldClose = webview.close const oldClose = webview.close
...@@ -115,4 +121,4 @@ export function initSubNVue (nvue, plus, BroadcastChannel) { ...@@ -115,4 +121,4 @@ export function initSubNVue (nvue, plus, BroadcastChannel) {
return getSubNVueById(plus.webview.currentWebview().id) return getSubNVueById(plus.webview.currentWebview().id)
} }
} }
} }
import { requireNativePlugin } from './index'
function wrapper (webview) { function wrapper (webview) {
webview.$processed = true webview.$processed = true
...@@ -19,8 +21,13 @@ function wrapper (webview) { ...@@ -19,8 +21,13 @@ function wrapper (webview) {
return return
} }
const maskColor = webview.__uniapp_mask const maskColor = webview.__uniapp_mask
let maskWebview = plus.webview.getWebviewById(webview.__uniapp_mask_id) let maskWebview = webview.__uniapp_mask_id === '0' ? {
maskWebview = maskWebview.parent() || maskWebview// 再次检测父 setStyle ({ mask }) {
requireNativePlugin('uni-tabview').setMask({
color: mask
})
}
} : plus.webview.getWebviewById(webview.__uniapp_mask_id)
const oldShow = webview.show const oldShow = webview.show
const oldHide = webview.hide const oldHide = webview.hide
const oldClose = webview.close const oldClose = webview.close
...@@ -56,4 +63,4 @@ export function getSubNVueById (id) { ...@@ -56,4 +63,4 @@ export function getSubNVueById (id) {
wrapper(webview) wrapper(webview)
} }
return webview return webview
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册