uniapp 折叠面板
时间: 2023-08-23 13:05:35 浏览: 131
折叠面板插件
uniapp折叠面板是一种常用的组件,用于实现内容的展开和关闭功能。它由两个组件组成,一个类似侧边栏的组件,另一个类似折叠面板的组件。这两个组件都只实现了展开和关闭的功能,其他功能还没有完全实现。。下面是一个示例代码,展示了如何在uniapp中使用折叠面板组件:
```
<template>
<view>
<uni-collapse :accordion="true">
<uni-collapse-item title="标题文字1">
<text class="content">折叠内容主体,可自定义内容及样式</text>
</uni-collapse-item>
<uni-collapse-item title="标题文字2" thumb="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png" :show-animation="true">
<text class="content">折叠内容主体,可自定义内容及样式</text>
</uni-collapse-item>
<uni-collapse-item title="标题文字3" :disabled="true" :open="true">
<text class="content">默认展开xxxxxxxxxxx</text>
</uni-collapse-item>
</uni-collapse>
</view>
</template>
<style>
.content {
padding: 15px;
font-size: 14px;
line-height: 20px;
background-color: #f9f9f9;
color: #666;
}
</style>
`
#### 引用[.reference_title]
- *1* *2* [【uniapp】自定义多级折叠面板](https://blog.csdn.net/Qxn530/article/details/127109953)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [uniapp组件-uni-collapse折叠面板](https://blog.csdn.net/qq_40323256/article/details/114282437)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文