Skip to content

Collapse-DEMO


vue
<fv-Collapse>
    <div style="position: relative; height: 500px; background: black; transition: all 0.3s;"></div>
</fv-Collapse>

Disabled Collapse

vue
<fv-Collapse :disabledCollapse="true">
    <div style="position: relative; height: 500px; background: black; transition: all 0.3s;"></div>
</fv-Collapse>

Extension

vue
<fv-Collapse :disabledCollapse="true">
    <template v-slot:extension>
        <fv-button>Operation</fv-button>
    </template>
</fv-Collapse>

Collapse-Customize Background


vue
<fv-Collapse background="rgba(0, 98, 158, 1)">
    <div style="position: relative; height: 500px; background: black; transition: all 0.3s;"></div>
</fv-Collapse>

Collapse-Dark Theme


vue
<fv-Collapse theme="dark">
    <div style="position: relative; height: 500px; background: whitesmoke; transition: all 0.3s;"></div>
</fv-Collapse>

Properties


PropertyTypeRequiredDefaultDescription
modelValuebooleanNofalseSee the Collapse modelValue option.
iconstringNo'Mail'Icon with Fabric-Icon
titlestringNo'Title of Collapse.'Title.
contentstringNo'Content information of Collapse.'Subtitle content.
backgroundstringNo''See the Collapse background option.
defaultHeightnumberNo70See the Collapse defaultHeight option.
maxHeightnumberNo300See the Collapse maxHeight option.
disabledCollapsebooleanNofalseSee the Collapse disabledCollapse option.
visibleOverflowbooleanNotrueSee the Collapse visibleOverflow option.
themestringNo'global'Theme style. Supports global, light, dark, system, and custom.
disabledbooleanNofalseSee the Collapse disabled option.
langstringNo"global"See the Collapse lang option.

Events


EventArgumentsDescription
item-clickbooleanSee the component item-click option.
descrption-clickN/ASee the component descrption-click option.
icon-clickN/ASee the component icon-click option.
left-icon-clickN/ASee the component left-icon-click option.

Slots


  1. Default
vue
<fv-Collapse background="rgba(0, 98, 158, 1)">
    <div style="position: relative; height: 500px; background: black; transition: all 0.3s;"></div>
</fv-Collapse>
  1. icon
vue
<template v-slot:icon="x">
    <i class="ms-Icon" :class="[`ms-Icon--${x.icon}`]"></i>
</template>
  1. container
  • title: Collapse
vue
<template v-slot:container="x">
    <div class="collapse-title">{{ x.title }}</div>
    <div class="collapse-info">{{ x.content }}</div>
</template>
  1. Extension
vue
<template v-slot:extension>
    <fv-button>Operation</fv-button>
</template>
  1. title
  • title: Collapse
vue
<template v-slot:title="x">
    <div class="collapse-title">{{ x.title }}</div>
</template>
  1. content
vue
<template v-slot:content="x">
    <div class="collapse-info">{{ x.content }}</div>
</template>
  1. expand-icon
vue
<template v-slot:expand-icon="x">
    <i
        v-show="x.value"
        class="ms-Icon ms-Icon--ChevronUpMed"
    ></i>
    <i
        v-show="!x.value && !x.disabledCollapse"
        class="ms-Icon ms-Icon--ChevronDownMed"
    ></i>
    <i
        v-show="!x.value && x.disabledCollapse"
        class="ms-Icon ms-Icon--ChevronRightMed"
    ></i>
</template>

MIT Licensed