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

fix(app-plus): remove circular dependency

上级 26ea7a0d
...@@ -499,6 +499,15 @@ var eventApi = /*#__PURE__*/Object.freeze({ ...@@ -499,6 +499,15 @@ var eventApi = /*#__PURE__*/Object.freeze({
$emit: $emit $emit: $emit
}); });
function requireNativePlugin (pluginName) {
/* eslint-disable no-undef */
if (typeof weex !== 'undefined') {
return weex.requireModule(pluginName)
}
/* eslint-disable no-undef */
return __requireNativePlugin__(pluginName)
}
function wrapper$1 (webview) { function wrapper$1 (webview) {
webview.$processed = true; webview.$processed = true;
...@@ -521,7 +530,9 @@ function wrapper$1 (webview) { ...@@ -521,7 +530,9 @@ function wrapper$1 (webview) {
} }
const maskColor = webview.__uniapp_mask; const maskColor = webview.__uniapp_mask;
let maskWebview = webview.__uniapp_mask_id === '0' ? { let maskWebview = webview.__uniapp_mask_id === '0' ? {
setStyle ({ mask }) { setStyle ({
mask
}) {
requireNativePlugin('uni-tabview').setMask({ requireNativePlugin('uni-tabview').setMask({
color: mask color: mask
}); });
...@@ -564,18 +575,11 @@ function getSubNVueById (id) { ...@@ -564,18 +575,11 @@ function getSubNVueById (id) {
return webview return webview
} }
function requireNativePlugin (pluginName) {
/* eslint-disable no-undef */
if (typeof weex !== 'undefined') {
return weex.requireModule(pluginName)
}
/* eslint-disable no-undef */
return __requireNativePlugin__(pluginName)
}
var api = /*#__PURE__*/Object.freeze({ var api = /*#__PURE__*/Object.freeze({
requireNativePlugin: requireNativePlugin, getSubNVueById: getSubNVueById,
getSubNVueById: getSubNVueById requireNativePlugin: requireNativePlugin
}); });
const MPPage = Page; const MPPage = Page;
......
export function requireNativePlugin (pluginName) { export * from './sub-nvue'
/* eslint-disable no-undef */ export * from './require-native-plugin'
if (typeof weex !== 'undefined') {
return weex.requireModule(pluginName)
}
/* eslint-disable no-undef */
return __requireNativePlugin__(pluginName)
}
export * from './sub-nvue'
export function requireNativePlugin (pluginName) {
/* eslint-disable no-undef */
if (typeof weex !== 'undefined') {
return weex.requireModule(pluginName)
}
/* eslint-disable no-undef */
return __requireNativePlugin__(pluginName)
}
import { requireNativePlugin } from './index' import {
requireNativePlugin
} from './require-native-plugin'
function wrapper (webview) { function wrapper (webview) {
webview.$processed = true webview.$processed = true
...@@ -22,7 +24,9 @@ function wrapper (webview) { ...@@ -22,7 +24,9 @@ function wrapper (webview) {
} }
const maskColor = webview.__uniapp_mask const maskColor = webview.__uniapp_mask
let maskWebview = webview.__uniapp_mask_id === '0' ? { let maskWebview = webview.__uniapp_mask_id === '0' ? {
setStyle ({ mask }) { setStyle ({
mask
}) {
requireNativePlugin('uni-tabview').setMask({ requireNativePlugin('uni-tabview').setMask({
color: mask color: mask
}) })
...@@ -63,4 +67,4 @@ export function getSubNVueById (id) { ...@@ -63,4 +67,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.
先完成此消息的编辑!
想要评论请 注册