Skip to content
vue
<fv-menuFlyout v-model="value" :options="options" placeholder="Pick a option">
</fv-menuFlyout>

vue
<fv-menuFlyout v-model="value" :options="options" placeholder="Pick a option" disabled>
</fv-menuFlyout>

vue
<fv-menuFlyout v-model="value" :options="options" placeholder="Pick a option" theme="dark">
</fv-menuFlyout>

Propoties


属性(attr)类型(type)必填(required)默认值(default)说明(statement)
value/v-modelObjectNoN/ACombobox当前项绑定
optionsArrayYesN/ACombobox数据
borderWidthNumberNo2
placeholderStringNoCombobox
borderRadiusNumberNo3
background[string(color)]NoN/A
choosenBackground[string(color)]NoN/A
choosenSliderBackground[string(color)]NoN/A
inputForeground[string(color)]NoN/A
inputBackground[string(color)]NoN/A
titleForeground[string(color)]NoChevronDown
dropDownIconStringNoN/A
dropDownIconForeground[string(color)]NoN/A
revealBorderColor[string(color)]NoN/A
revealBackgroundColor[string(color)]NoN/A
pivotPlaceholderStringNoPlease Choose
disabledBooleanNoN/A
themeStringNosystem主题样式, 包含light, dark, system, custom几种样式

Events


事件名(Name)参数类型(args)说明(statement)
choose-itemvalue/objectCombobox choose item

Slot


  1. Default

用户可自定义 MenuFlyout Item 内容

vue
<slot :item="item">
    {{valueTrigger(item.type) !== 'divider' ? valueTrigger(item.text) : ''}}
</slot>

用户自定义样式时, 包含以下可选属性

  • item: 当前组数据
vue
<template v-slot:default="x">
  <i>{{x.item.text}}</i>
</template>

Data


  1. options
javascript
options = [{key: '', text: '', type: '', disabled: ''}]

//e.g.//

options: [
    { key: "fruitsHeader", text: "Fruits", type: "header" },
    { key: "apple", text: "Apple", children: [
        { key: "A", text: "A" },
        { key: "B", text: "B" },
        { key: "Apple C", text: "Apple C", children: [
            { key: "A", text: "A" },
            { key: "B", text: "B" },
            { key: "Apple C-C", text: "Apple C-C", children: [
                { key: "A", text: "A" },
                { key: "B", text: "B" },
                { key: "Apple C-C-C", text: "Apple C-C-C" }
            ] }
        ] }
    ] },
    { key: "banana", text: "Banana" },
    { key: "orange", text: "Orange", disabled: true },
    { key: "grape", text: "Grape", children: [
        { key: "A", text: "A" },
        { key: "B", text: "B" },
        { key: "C", text: "C" }
    ] },
    { key: "divider_1", text: "-", type: "divider" },
    { key: "vegetablesHeader", text: "Vegetables", type: "header" },
    { key: "broccoli", text: "Broccoli" },
    { key: "carrot", text: "Carrot" },
    { key: "lettuce", text: "Lettuce" }
]

其中 text, disabled, type属性支持函数式声明.

MIT Licensed