提交 0ca09d04 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

feat(App): add syncDataToGlobal

上级 9ba045b7
...@@ -16803,6 +16803,9 @@ function requireGlobal() { ...@@ -16803,6 +16803,9 @@ function requireGlobal() {
object[key] = global[key]; object[key] = global[key];
} }
return object; return object;
}
function syncDataToGlobal(data) {
extend(global, data);
} }
const providers = { const providers = {
...@@ -19577,6 +19580,7 @@ var uni$1 = { ...@@ -19577,6 +19580,7 @@ var uni$1 = {
getSubNVueById: getSubNVueById, getSubNVueById: getSubNVueById,
restoreGlobal: restoreGlobal, restoreGlobal: restoreGlobal,
requireGlobal: requireGlobal, requireGlobal: requireGlobal,
syncDataToGlobal: syncDataToGlobal,
getProvider: getProvider, getProvider: getProvider,
login: login, login: login,
getUserInfo: getUserInfo, getUserInfo: getUserInfo,
......
...@@ -2,6 +2,7 @@ import { ...@@ -2,6 +2,7 @@ import {
newSetStatusBarStyle, newSetStatusBarStyle,
restoreOldSetStatusBarStyle, restoreOldSetStatusBarStyle,
} from '../../statusBar' } from '../../statusBar'
import { extend } from '@vue/shared'
export function restoreGlobal( export function restoreGlobal(
newVue: unknown, newVue: unknown,
...@@ -63,3 +64,7 @@ export function requireGlobal() { ...@@ -63,3 +64,7 @@ export function requireGlobal() {
} }
return object return object
} }
export function syncDataToGlobal(data: AnyObject) {
extend(global, data)
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册