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

feat(App): add syncDataToGlobal

上级 9ba045b7
......@@ -16804,6 +16804,9 @@ function requireGlobal() {
}
return object;
}
function syncDataToGlobal(data) {
extend(global, data);
}
const providers = {
oauth(callback) {
......@@ -19577,6 +19580,7 @@ var uni$1 = {
getSubNVueById: getSubNVueById,
restoreGlobal: restoreGlobal,
requireGlobal: requireGlobal,
syncDataToGlobal: syncDataToGlobal,
getProvider: getProvider,
login: login,
getUserInfo: getUserInfo,
......
......@@ -2,6 +2,7 @@ import {
newSetStatusBarStyle,
restoreOldSetStatusBarStyle,
} from '../../statusBar'
import { extend } from '@vue/shared'
export function restoreGlobal(
newVue: unknown,
......@@ -63,3 +64,7 @@ export function requireGlobal() {
}
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.
先完成此消息的编辑!
想要评论请 注册