You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
1.6 KiB

  1. <template>
  2. <view class="main">
  3. <view :style="{height:iSMT+'px'}"></view>
  4. <view style="height:1.5vh;" />
  5. <view class="top">
  6. <view class="top-list">
  7. <text v-if="hasNew === true" class="label">已有新版本</text>
  8. <text v-if="hasNew === false" class="label">已是最新版本</text>
  9. <view class="right">
  10. <text style="font-size: 28rpx;">{{ version }}</text>
  11. </view>
  12. </view>
  13. </view>
  14. <view style="height:1vh;" />
  15. <view class="bottom">
  16. <button v-if="hasNew === true" class="bottom-btn">立即更新</button>
  17. <button v-if="hasNew === false" class="bottom-btn" disabled
  18. style="background-color: rgb(204,204,204);color:white;">暂无更新</button>
  19. </view>
  20. </view>
  21. </template>
  22. <script setup>
  23. import {
  24. ref,
  25. onMounted
  26. } from 'vue'
  27. const iSMT = ref(0)
  28. const hasNew = ref(true)
  29. const version = ref('2.0')
  30. onMounted(() => {
  31. // 状态栏高度
  32. iSMT.value = uni.getSystemInfoSync().statusBarHeight;
  33. console.log('看看高度', iSMT.value)
  34. })
  35. </script>
  36. <style>
  37. .top {
  38. height: 7vh;
  39. background-color: white;
  40. display: flex;
  41. justify-content: center;
  42. }
  43. .top-list {
  44. width: 630rpx;
  45. height: 7vh;
  46. display: flex;
  47. align-items: center;
  48. margin: 0rpx 40rpx;
  49. }
  50. .label {
  51. font-size: 28rpx;
  52. flex: 1;
  53. }
  54. .bottom {
  55. height: 11vh;
  56. background-color: white;
  57. padding: 0 50rpx;
  58. display: flex;
  59. justify-content: center;
  60. align-items: center;
  61. }
  62. .bottom-btn {
  63. width: 670rpx;
  64. height: 84rpx;
  65. border-radius: 40rpx;
  66. background-color: #000;
  67. color: #fff;
  68. font-size: 28rpx;
  69. display: flex;
  70. align-items: center;
  71. justify-content: center;
  72. }
  73. </style>