Browse Source

增加全局属性mixin

htc 1 năm trước cách đây
mục cha
commit
62b229a7df
1 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 3 4
      main.js

+ 3 - 4
main.js

@@ -45,10 +45,9 @@ Vue.component('Tabbar', Tabbar);
 //全局分享当前页(带参数)
 import wxShare from '@/utils/wxShare.js'
 Vue.mixin(wxShare);
-
-//设置全局页面自适应高度和上边距
-Vue.prototype.$h = uni.getSystemInfoSync().windowHeight;
-Vue.prototype.$mt = uni.getSystemInfoSync().statusBarHeight + 44;
+//全局属性
+import getSystemInfo from '@/utils/getSystemInfo.js'
+Vue.mixin(getSystemInfo);
 
 // #ifdef VUE3
 import {