1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <script>
- export default {
- globalData: {
- statusBarHeight: 0,
- navHeight: 0,
- navigationBarHeight: 0,
- },
- onLaunch: function() {
- console.log('App Launch')
-
-
- this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
-
-
-
- const custom = wx.getMenuButtonBoundingClientRect()
-
-
-
- this.globalData.navigationBarHeight = custom.height + (custom.top - this.globalData.statusBarHeight) * 2
-
-
-
- this.globalData.navHeight = this.globalData.navigationBarHeight + this.globalData.statusBarHeight
-
-
-
-
-
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- }
- }
- </script>
- <style lang="scss">
- @import "@/uni_modules/uview-ui/index.scss";
-
-
- * {
- margin: 0;
- padding: 0;
- }
- html,body {
- width: 100%;
- height: 100%;
- }
-
- </style>
|