ECL 协议部分
npm 软件包 : @ecl/accordion
npm install --save @ecl/accordion
参数
- 颜色( m) (字符串)(默认为:")颜色模式的名称
- “项目” (阵列) (默认:[]):格式:
- "开" (布尔语): 默认可以打开此项目
- "切换"(对象): 切换手风琴项的按钮
- 标签 (字符串)(默认为:") 切换按钮的标签
- 切换按钮的额外类
- "内容" (字符串)(默认为:") 手风琴项内的内容
- "边栏" (boolean) (默认:虚假) 如果选中的话, 手风琴会用到侧边栏
- 侧边栏 介质 curry" (默认 : “ ” ) 用于扩展手风琴的媒体查询
- 漫画 (阵列) OR(对象)(默认:phosphor “ plus” / “ minus” 配对) 将切换( 打开/ 关闭) 阵列中的两个图标
- "名字"("名字") (字符串) (默认:"'") 可选名称属性 链接多个手风琴项目(HTML)
name打开<details>(中文(简体) ) - "超级" (字符串)(默认为:") 额外类(空格分隔)
- “外部属性” (阵列) (默认: []) 额外属性
- 名称 (字符串) 属性名称, 如“ 数据测试 ”
- 值 (字符串) 属性值, 如 : “ data- test-1 ”
示例:
{% include '@ecl/accordion/accordion.html.twig' with {
items: [
{
id: 'accordion-example',
toggle: {
label:
'Delivery of last pending proposals, a common Destiny of unity, the hour of European Democracy',
},
content:
'The College of Commissioners held today the first weekly meeting of 2019 which was devoted to discussing the challenges of this new year. Commissioners used the opportunity to take stock and discuss the year ahead, including the European elections in May and other important milestones ahead.',
},
...
]
} %}