解决微信小程序首页空白问题。
This commit is contained in:
@@ -170,9 +170,12 @@
|
||||
},
|
||||
created() {
|
||||
// #ifdef VUE3
|
||||
let getbinddata = getApp().$vm.$.appContext.config.globalProperties.binddata
|
||||
if (!getbinddata) {
|
||||
getApp().$vm.$.appContext.config.globalProperties.binddata = function(name, value, formName) {
|
||||
try {
|
||||
const app = getApp({ allowDefault: true });
|
||||
if (app && app.$vm && app.$vm.$ && app.$vm.$.appContext && app.$vm.$.appContext.config && app.$vm.$.appContext.config.globalProperties) {
|
||||
let getbinddata = app.$vm.$.appContext.config.globalProperties.binddata
|
||||
if (!getbinddata) {
|
||||
app.$vm.$.appContext.config.globalProperties.binddata = function(name, value, formName) {
|
||||
if (formName) {
|
||||
this.$refs[formName].setValue(name, value);
|
||||
} else {
|
||||
@@ -191,6 +194,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// 静默失败
|
||||
}
|
||||
// #endif
|
||||
|
||||
// 子组件实例数组
|
||||
|
||||
Reference in New Issue
Block a user