Skip to content

Slider-Light

vue
<fv-slider :mininum="9" :maxinum="30" :showLabel="true">
<template v-slot="prop" >
  <span>{{prop.value}}</span>
</template>
</fv-slider>

Slider-Dark

vue
<fv-slider theme="dark">
</fv-slider>

Slider-With-Tick-Mark

vue
<fv-slider :scale="20" :unit="2">
</fv-slider>

Slider-With-Label

vue
<fv-slider :scale="20" :showLabel="true" :unit="20">
<template v-slot="prop" >
  <span>{{prop.value}}</span>
</template>
</fv-slider>

Slider-With-Vertical

vue
<fv-slider v-model="value" :unit="20" :vertical="true" @change="change" @click="click">
</fv-slider>

Slider: 50% Change: 0 Click: 0

Silder-Disabled

vue
<fv-slider disabled>
</fv-slider>

Silder-Custom-Style

vue
<fv-slider v-model="value" style="width:150px;" showLabel color="#2ed573">
<template v-slot="prop">
{{prop.value}}
</template>
</fv-slider>

Propoties


属性(attr)类型(type)必填(required)默认值(default)说明(statement)
v-model/valueNumberNo0绑定的值
themeString(dark | light | custom)Nosystem主题颜色
disabledBooleanNofalse是否禁用
unitNumberNo1一格的间隔
mininumNumberNo0最小值
maxinumNumberNo100最大值
iconStringNoLocationFillMS-icon
verticalBooleanNofalse是否垂直
showLabelBooleanNofalse是否显示标签
scaleBoolean | NumberNofalse是否显示刻度,刻度长度,如果为真则跟随unit大小
colorStringNoundefined按钮的颜色

Events


事件名(Name)参数类型(args)说明(statement)
clickevent按动按钮触发函数
changeevent当value值改变时触发函数,默认第一个参数为value

Slot

vue
<template v-slot="prop">
  <span>{{prop.value}}</span>
</template>

MIT Licensed