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

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

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