12345678910111213141516171819202122232425262728293031323334 |
- <template>
- <view :style="'height:'+top+'px'" >
-
- </view>
- </template>
- <script>
- export default {
- name:"es-top",
- data() {
- return {
- top:0,
- };
- },
- created:function(){
- let data = getApp().globalData;
- if(data.__czy_top)
- {
- this.top = data.__czy_top;
- }else{
- uni.getSystemInfo({
- success: (res) => {
- let top = res.safeArea.top;
- data.__czy_top = this.top = top;
- }
- });
- }
- }
- }
- </script>
- <style>
- </style>
|