Collapse

介绍

abp-collapse-body 是显示和隐藏内容的主要容器. abp-collapse-id 用于显示和隐藏内容容器. 可以通过 abp-buttona 标签触发.

基本用法:

  1. <abp-button button-type="Primary" abp-collapse-id="collapseExample" text="Button with data-target" />
  2. <a abp-button="Primary" abp-collapse-id="collapseExample"> Link with href </a>
  3. <abp-collapse-body id="collapseExample">
  4. Anim pariatur wolf moon tempor,,, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
  5. </abp-collapse-body>

Demo

参阅collapse demo 页面查看示例.

Attributes

show

指定折叠主体初始化时是折叠还是展开. 应为以下值之一:

  • false (默认值)
  • true

multi

指定 abp-collapse-body 是否可以通过显示/隐藏多个折叠体的元素显示或隐藏. 此属性做为 “multi-collapse” class 添加到 abp-collapse-body. 应为以下值之一:

  • false (默认值)
  • true

示例:

  1. <a abp-button="Primary" abp-collapse-id="FirstCollapseExample"> Toggle first element </a>
  2. <abp-button button-type="Primary" abp-collapse-id="SecondCollapseExample" text="Toggle second element" />
  3. <abp-button button-type="Primary" abp-collapse-id="FirstCollapseExample SecondCollapseExample" text="Toggle both elements" />
  4. <abp-row class="mt-3">
  5. <abp-column size-sm="_6">
  6. <abp-collapse-body id="FirstCollapseExample" multi="true">
  7. Curabitur porta porttitor libero eu luctus. Praesent ultrices mattis commodo. Integer sodales massa risus, in molestie enim sagittis blandit
  8. </abp-collapse-body>
  9. </abp-column>
  10. <abp-column size-sm="_6">
  11. <abp-collapse-body id="SecondCollapseExample" multi="true">
  12. Anim pariatur wolf moon tempor,,, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et.
  13. </abp-collapse-body>
  14. </abp-column>
  15. </abp-row>

手风琴示例

abp-accordion 是手风琴项的主容器.

基本用法:

  1. <abp-accordion>
  2. <abp-accordion-item title="Collapsible Group Item #1">
  3. Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry rtat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
  4. </abp-accordion-item>
  5. <abp-accordion-item title="Collapsible Group Item #2">
  6. Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
  7. </abp-accordion-item>
  8. <abp-accordion-item title="Collapsible Group Item #3">
  9. Anim pariatur wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
  10. </abp-accordion-item>
  11. </abp-accordion>

Attributes

active

指定手风琴项目在初始化时是显示还是隐藏. 应为以下值之一:

  • false (默认值)
  • true

title

指定手风琴项的标题. 应为字符串类型的值.