section.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 lang="scss">
  61. .uni-wrap {
  62. flex-direction: column;
  63. /* #ifdef H5 */
  64. height: calc(100vh - 44px);
  65. /* #endif */
  66. /* #ifndef H5 */
  67. height: 100vh;
  68. /* #endif */
  69. flex: 1;
  70. }
  71. .scroll {
  72. flex-direction: column;
  73. flex: 1;
  74. }
  75. .example-body {
  76. padding: 0;
  77. /* #ifndef APP-NVUE */
  78. display: block;
  79. /* #endif */
  80. }
  81. </style>