提交 46f4834b 编写于 作者: L liuxiaohang

fix(app-plus): 修复subNVues不使用type: popup,使用setStyle设置mask报错

上级 3ab1d348
......@@ -62,9 +62,9 @@ function wrapper (webview) {
}
export function getSubNVueById (id) {
const webview = plus.webview.getWebviewById(id)
if (webview === null || webview === undefined) {
throw new Error('Unable to find SubNVue, id=' + id)
const webview = plus.webview.getWebviewById(id)
if (webview === null || webview === undefined) {
throw new Error('Unable to find SubNVue, id=' + id)
}
if (webview && !webview.$processed) {
wrapper(webview)
......@@ -73,7 +73,7 @@ export function getSubNVueById (id) {
var parentWebview = plus.webview.getWebviewById(webview.__uniapp_mask_id)
webview.setStyle = function (style) {
if (style && style.mask) {
parentWebview.setStyle({
parentWebview && parentWebview.setStyle({
mask: style.mask
})
delete style.mask
......@@ -85,4 +85,4 @@ export function getSubNVueById (id) {
export function getCurrentSubNVue () {
return getSubNVueById(plus.webview.currentWebview().id)
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册