uniapp组件-uni-collapse折叠面板

一时失言乱红尘 2021-07-25 22:37 3150阅读 0赞

官方示例:https://ext.dcloud.net.cn/plugin?id=23

效果图:

2021030212355630.gif

代码实现:

watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMzIzMjU2_size_16_color_FFFFFF_t_70

  1. <template>
  2. <view>
  3. <uni-collapse :accordion="true">
  4. <uni-collapse-item title="标题文字1">
  5. <text class="content">折叠内容主体,可自定义内容及样式</text>
  6. </uni-collapse-item>
  7. <uni-collapse-item title="标题文字2" thumb="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png" :show-animation="true">
  8. <text class="content">折叠内容主体,可自定义内容及样式</text>
  9. </uni-collapse-item>
  10. <uni-collapse-item title="标题文字3" :disabled="true" :open="true">
  11. <text class="content">默认展开xxxxxxxxxxx</text>
  12. </uni-collapse-item>
  13. </uni-collapse>
  14. </view>
  15. </template>
  16. <style>
  17. .content {
  18. padding: 15px;
  19. font-size: 14px;
  20. line-height: 20px;
  21. background-color: #f9f9f9;
  22. color: #666;
  23. }
  24. </style>

发表评论

表情:
评论列表 (有 0 条评论,3150人围观)

还没有评论,来说两句吧...

相关阅读

    相关 jQuery 折叠面板

    手风琴是非常常见而实用的效果,本篇文章示例一个简单的手风琴效果。 上效果图: ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_