需要引入的js库有:
bootstrap.css,
angular.js,
ui-bootstrap-tpls-0.11.0.js
模板:
<accordion close-others="oneAtATime">//当oneAtATime的值为true,显示为只能同时展开一项,否则可以同时展开多项
<accordion-group is-open="status.open">//当status.open的值为true,title1的内容content1展开,否则关闭
<accordion-heading>
tilte1
</accordion-heading>
content1
</accordion-group>
<accordion-group is-disabled="status.disabled">//当status.disabled的值为true,title2的内容content2无法展开,否则正常
<accordion-heading>
tilte2
</accordion-heading>
content2
</accordion-group>
<accordion-group>
<accordion-heading>
tilte3
</accordion-heading>
content3
</accordion-group>
</accordion>