Skip to content

ihtml5/react-accordion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Accordion 折叠面板

开发

  1. yarn install
  2. yarn start
  3. 在编辑器中打开src/components/Accordion中的文件

示例图

Data

const data = [{
  title: '简介',
  list: [{
    text: '依赖',
    href: 'http://www.baidu.com'
  }]
}]

Props

属性 类型 是否必填 默认值 说明
activeIndex Number 可选 undefined 指定那个面板激活
data Array 必须 为空 面板的数据集合
fixed Boolean 可选 false 是否固定折叠面板
data Array 必须 为空 面板的数据集合
onlyOneOpen Boolean 可选 false 只有一个面板处于展开状态
width Number/String 可选 auto 面板宽度