section.nvue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <template>
  2. <view class="uni-wrap">
  3. <scroll-view class="scroll" scroll-y>
  4. <view class="example-info">
  5. <text class="example-info-text"> uni-section 组件主要用于文章、列表详情的等标题展示 </text>
  6. </view>
  7. <uni-section class="uni-section" title="基础用法" sub-title="副标题"></uni-section>
  8. <view class="example-body">
  9. <uni-list>
  10. <uni-list-item title="item" />
  11. <uni-list-item title="item" />
  12. </uni-list>
  13. </view>
  14. <uni-section title="竖线装饰" sub-title="副标题" type="line"></uni-section>
  15. <view class="example-body">
  16. <uni-list>
  17. <uni-list-item title="item" />
  18. <uni-list-item title="item" />
  19. </uni-list>
  20. </view>
  21. <uni-section title="圆形装饰" sub-title="副标题" type="circle"></uni-section>
  22. <view class="example-body">
  23. <uni-list>
  24. <uni-list-item title="item" />
  25. <uni-list-item title="item" />
  26. <uni-list-item title="item" />
  27. <uni-list-item title="item" />
  28. <uni-list-item title="item" />
  29. <uni-list-item title="item" />
  30. <uni-list-item title="item" />
  31. <uni-list-item title="item" />
  32. <uni-list-item title="item" />
  33. <uni-list-item title="item" />
  34. <uni-list-item title="item" />
  35. <uni-list-item title="item" />
  36. <uni-list-item title="item" />
  37. <uni-list-item title="item" />
  38. <uni-list-item title="item" />
  39. <uni-list-item title="item" />
  40. <uni-list-item title="item" />
  41. </uni-list>
  42. </view>
  43. </scroll-view>
  44. </view>
  45. </template>
  46. <script>
  47. export default {
  48. components: {},
  49. data() {
  50. return {
  51. appear: false,
  52. }
  53. },
  54. onReady() {
  55. },
  56. methods: {
  57. }
  58. }
  59. </script>
  60. <style>
  61. @charset "UTF-8";
  62. /* 头条小程序组件内不能引入字体 */
  63. /* #ifdef MP-TOUTIAO */
  64. @font-face {
  65. font-family: uniicons;
  66. font-weight: normal;
  67. font-style: normal;
  68. src: url("~@/static/uni.ttf") format("truetype");
  69. }
  70. /* #endif */
  71. /* #ifndef APP-NVUE */
  72. page {
  73. display: flex;
  74. flex-direction: column;
  75. box-sizing: border-box;
  76. background-color: #efeff4;
  77. min-height: 100%;
  78. height: auto;
  79. }
  80. view {
  81. font-size: 14px;
  82. line-height: inherit;
  83. }
  84. .example {
  85. padding: 0 15px 15px;
  86. }
  87. .example-info {
  88. padding: 15px;
  89. color: #3b4144;
  90. background: #ffffff;
  91. }
  92. .example-body {
  93. /* #ifndef APP-NVUE */
  94. display: flex;
  95. /* #endif */
  96. flex-direction: row;
  97. flex-wrap: wrap;
  98. justify-content: center;
  99. padding: 0;
  100. font-size: 14px;
  101. background-color: #ffffff;
  102. }
  103. /* #endif */
  104. .example {
  105. padding: 0 15px;
  106. }
  107. .example-info {
  108. /* #ifndef APP-NVUE */
  109. display: block;
  110. /* #endif */
  111. padding: 15px;
  112. color: #3b4144;
  113. background-color: #ffffff;
  114. font-size: 14px;
  115. line-height: 20px;
  116. }
  117. .example-info-text {
  118. font-size: 14px;
  119. line-height: 20px;
  120. color: #3b4144;
  121. }
  122. .example-body {
  123. flex-direction: column;
  124. padding: 15px;
  125. background-color: #ffffff;
  126. }
  127. .word-btn-white {
  128. font-size: 18px;
  129. color: #FFFFFF;
  130. }
  131. .word-btn {
  132. /* #ifndef APP-NVUE */
  133. display: flex;
  134. /* #endif */
  135. flex-direction: row;
  136. align-items: center;
  137. justify-content: center;
  138. border-radius: 6px;
  139. height: 48px;
  140. margin: 15px;
  141. background-color: #007AFF;
  142. }
  143. .word-btn--hover {
  144. background-color: #4ca2ff;
  145. }
  146. .uni-wrap {
  147. flex-direction: column;
  148. /* #ifdef H5 */
  149. height: calc(100vh - 44px);
  150. /* #endif */
  151. /* #ifndef H5 */
  152. height: 100vh;
  153. /* #endif */
  154. flex: 1;
  155. }
  156. .scroll {
  157. flex-direction: column;
  158. flex: 1;
  159. }
  160. .example-body {
  161. padding: 0;
  162. /* #ifndef APP-NVUE */
  163. display: block;
  164. /* #endif */
  165. }
  166. </style>