tm-top-menu.vue 577 B

12345678910111213141516171819202122232425262728293031323334
  1. <template>
  2. <view class="tm-top-menu" :style="{top:top}">
  3. <slot></slot>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data:function(){
  9. return {
  10. top:0,
  11. }
  12. },
  13. mounted() {
  14. // console.log(uni.getSystemInfoSync());
  15. this.top = uni.getSystemInfoSync().statusBarHeight;
  16. }
  17. }
  18. </script>
  19. <style lang="less">
  20. // 顶部按钮、信息start
  21. .tm-top-menu {
  22. // position: fixed;
  23. top: 0;
  24. left: 0;
  25. z-index: 100;
  26. // border-bottom: 1px solid #DADEE6;
  27. width: 100%;
  28. min-height: 50rpx;
  29. background-color: #fff;
  30. }
  31. // 顶部按钮、信息end
  32. </style>