lanyun-collapse

lanyun-collapse 折叠面板

介绍

通过折叠面板收纳内容区域,点击面板的标题可以展开或收缩其内容。

使用方法

import "../../components/lanyun-collapse/lanyun-collapse.stml";

例子

<lanyun-collapse
    @change="handleChange"
    :list="list"
    accordion
    :item-style="{ borderBottom: '1px solid #000' }"
    :head-style="{ padding: '0 8px' }"
    :body-style="{ padding: '16px' }"
/>

props 属性

参数 说明 类型 默认值
list 折叠数据,具体参数见demo, 选填 array []
accordion 手风琴模式, 选填 boolean false
item-style 整个item的自定义样式,对象形式, 选填 object {}
head-style item的标题自定义样式,对象形式, 选填 object {}
body-style item的主体自定义样式,对象形式, 选填 object {}

events 事件

事件名 说明 回调参数
change 切换面板时触发 index: list的下标索引值
是否仍需要帮助? 请保持联络!
最后更新于 2024/04/24