• uView实现全屏选项卡


    // 直接复制粘贴即可使用

    1. <template>
    2. <view>
    3. <view class="tabsBox">
    4. <u-tabs-swiper ref="uTabs" :list="list"
    5. :current="current"
    6. @change="tabsChange"
    7. :is-scroll="false">
    8. u-tabs-swiper>
    9. view>
    10. <view>
    11. <swiper class="swiperBox" :current="swiperCurrent" @transition="transition"
    12. @animationfinish="animationFinish">
    13. <swiper-item class="swiperBox-item">
    14. <scroll-view scroll-y @scrolltolower="onReachBottom">
    15. 反馈信息
    16. scroll-view>
    17. swiper-item>
    18. <swiper-item class="swiperBox-item">
    19. <scroll-view scroll-y @scrolltolower="onReachBottom">
    20. 基础信息
    21. scroll-view>
    22. swiper-item>
    23. swiper>
    24. view>
    25. <view class="bottomBox">
    26. <view class="bottomBox-icon">
    27. <view @click="rejectIt(1)" class="bottomBox-icon-iconBox">
    28. <u-icon name="yidongcaozuo-bohui" custom-prefix="custom-icon" color="#1F1F1F">u-icon>
    29. <view> 驳回view>
    30. view>
    31. view>
    32. <view class="bottomBox-box">
    33. <view class="none" @click='goBack'>取消view>
    34. <view class="sure" @click="rejectIt(2)">反馈view>
    35. view>
    36. view>
    37. view>
    38. template>
    39. <script>
    40. export default {
    41. name: "disposalConfirmationDetail",
    42. components: {
    43. // feedbackInfo: () => import("./feedbackInfo"),
    44. // basicInfo: () => import("./basicInfo"),
    45. },
    46. data() {
    47. return {
    48. list: [{
    49. name: '反馈信息'
    50. }, {
    51. name: '基础信息'
    52. }],
    53. current: 0,
    54. swiperCurrent: 0,
    55. id: null,
    56. };
    57. },
    58. methods: {
    59. tabsChange(index) {
    60. this.swiperCurrent = index;
    61. },
    62. transition(e) {
    63. let dx = e.detail.dx;
    64. this.$refs.uTabs.setDx(dx);
    65. },
    66. animationFinish(e) {
    67. let current = e.detail.current;
    68. this.$refs.uTabs.setFinishCurrent(current);
    69. this.swiperCurrent = current;
    70. this.current = current;
    71. },
    72. onReachBottom() {
    73. },
    74. rejectIt(flag) {
    75. console.log(flag)
    76. },
    77. goBack() {
    78. uni.navigateBack({
    79. delta: 1,
    80. })
    81. },
    82. },
    83. onLoad(option) {
    84. this.id = option.id
    85. },
    86. };
    87. script>
    88. <style lang="scss" scoped>
    89. .tabsBox {
    90. height: 44px;
    91. }
    92. .swiperBox {
    93. height: calc(100vh - var(--window-top) - var(--window-bottom) - 96px - 44px - 2px);
    94. /*border: 1px solid red;*/
    95. &-item {
    96. height: 100%;
    97. width: 100vw;
    98. }
    99. }
    100. .bottomBox {
    101. width: 100%;
    102. position: absolute;
    103. bottom: 0px;
    104. height: 96px;
    105. z-index: 999;
    106. background: #FFFFFF;
    107. box-shadow: inset 0px 1px 0px 0px rgba(25, 31, 37, 0.12);
    108. /*border: 2px solid red;*/
    109. display: flex;
    110. justify-content: space-between;
    111. &-icon {
    112. width: 55%;
    113. display: flex;
    114. justify-content: space-between;
    115. align-items: center;
    116. padding: 10rpx 60rpx 0;
    117. &-iconBox {
    118. display: flex;
    119. flex-direction: column;
    120. align-items: center;
    121. font-size: 28rpx;
    122. font-family: PingFangSC-Regular, PingFang SC;
    123. font-weight: 400;
    124. color: #1F1F1F;
    125. height: 44px;
    126. .u-icon {
    127. font-size: 40rpx;
    128. margin-bottom: 12rpx;
    129. }
    130. }
    131. }
    132. &-box {
    133. margin-top: 8px;
    134. display: flex;
    135. align-items: center;
    136. padding: 0 32rpx;
    137. flex: 1;
    138. view {
    139. width: 50%;
    140. height: 44px;
    141. border-radius: 4px;
    142. border: 1px solid rgba(31, 31, 31, 0.1);
    143. display: flex;
    144. justify-content: center;
    145. align-items: center;
    146. font-size: 34rpx;
    147. font-family: PingFangSC-Regular, PingFang SC;
    148. font-weight: 400;
    149. }
    150. .none {
    151. color: #1F1F1F;
    152. margin-right: 16rpx;
    153. }
    154. .none:active {
    155. background: rgba(31, 31, 31, 0.17);
    156. }
    157. .sure {
    158. background: #3296FA;
    159. color: #FFFFFF;
    160. }
    161. .sure:active {
    162. background: rgba(32, 116, 212, 1);
    163. }
    164. }
    165. }
    166. style>

  • 相关阅读:
    初识Cpp之 三、Cpp预处理器
    linux系统编程之二
    JSP session的生命周期简介说明
    狗都能看懂的CenterNet讲解及代码复现
    tomcat10.1.0源码分析
    【数据结构】Decreasing String—CF1886C
    恩智浦与长城汽车、蔚来、小鹏和中汽创智等车企和供应商密集签约
    推荐系统笔记(十一):使用coo_matrix函数遇到的坑
    关于SQL优化的21个小方法,你get了吗?
    Java中的ArrayList集合
  • 原文地址:https://blog.csdn.net/m0_74149462/article/details/132733492