提交 40391f00 编写于 作者: 雪洛's avatar 雪洛

fix: subNvue mask for parentWeview

上级 be539642
import {
requireNativePlugin
} from './require-native-plugin'
function wrapper (webview) {
webview.$processed = true
......@@ -66,9 +66,20 @@ export function getSubNVueById (id) {
if (webview && !webview.$processed) {
wrapper(webview)
}
let oldSetStyle = webview.setStyle
var parentWebview = plus.webview.getWebviewById(webview.__uniapp_mask_id)
webview.setStyle = function (style) {
if (style && style.mask) {
parentWebview.setStyle({
mask: style.mask
})
delete style.mask
}
oldSetStyle.call(this, style)
}
return webview
}
}
export function getCurrentSubNVue () {
return getSubNVueById(plus.webview.currentWebview().id)
}
......@@ -121,6 +121,7 @@ function initSubNVue (subNVue, routeOptions, webview) {
`UNIAPP[webview][${webview.id}]:create[${subNVue.id}]:${JSON.stringify(style)}`
)
}
delete style.mask
const subNVueWebview = plus.webview.create('', subNVue.id, style, extras)
if (isPopup) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册