Explorar o código

增加全局属性mixin

htc hai 1 ano
pai
achega
62b229a7df
Modificáronse 1 ficheiros con 3 adicións e 4 borrados
  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 {