Skip to content

Expander-DEMO ​


vue

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

Disabled Expander

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

Extension

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

Expander-Customize Background ​


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

Expander-Dark Theme ​


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

属性 ​


属性类型必填默认值说明
modelValueboolean否false是否展开 Expander
iconstring否'Mail'Icon with Fabric-Icon
titlestring否'Title of Expander.'标题。
contentstring否'Content information of Expander.'副标题信息。
titleBackgroundstring否''客制化 Expander 背景。
expandBackgroundstring否''客制化 Expander 背景。
defaultHeightnumber否50默认高度。
maxHeightnumber否300展开最大高度。
disabledboolean否false禁用展开 Expander
visibleOverflowboolean否true在禁用展开 Expander ,允许overflow内容显示。
themestring否'global'主题样式。支持 global、light、dark、system 和 custom。
disabledExpanderboolean否false参见组件的 disabledExpander 选项。
langstring否"global"参见组件的 lang 选项。

事件 ​


事件名参数说明
item-clickboolean返回 Expander 属性 value 的值。
descrption-clickN/A描述框点击。
icon-clickN/A右侧图标点击。

插槽 ​


  1. Default

定义下拉内容

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

自定义内容

  • title: Expander
  • contnet: 副标题
vue
<template v-slot:content="x">
    <div class="expander-title">{{ x.title }}</div>
    <div class="expander-info">{{ x.content }}</div>
</template>
  1. Extension

扩展操作内容

vue
<template v-slot:extension>
    <fv-button>Operation</fv-button>
</template>
  1. expand-icon

自定义展开状态图标

  • value: 当前是否展开
  • disabledCollaspe: 是否禁用展开
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.disabled"
        class="ms-Icon ms-Icon--ChevronDownMed"
    ></i>
    <i
        v-show="!x.value && x.disabled"
        class="ms-Icon ms-Icon--ChevronRightMed"
    ></i>
</template>

MIT Licensed