lanyun-selection

介绍

该组件用于用户从几个选项中选择一项的场景

使用方法

import "../../components/lanyun-selection/lanyun-selection.stml";

例子

<lanyun-selection
    @change="handleChange"
    :list="list"
    :current="current"
    font-size="12px"
    height="50px"
    active-color="#06f"
    inactive-color="#9CA3AF"
    bg-color="#f3f4f6"
    button-color="#fff"
    class="selection"
/>

props 属性

参数 说明 类型 默认值
list 选项的数组,必填,数组格式见demo array -
current 当前选中的数组索引值,选填 number 0
font-size 字体大小,选填 string 12px
height 选择器高度,选填 string 40px
active-color 选中的颜色,选填 string #06f
inactive-color 未选中的颜色,选填 string #9CA3AF
bg-color 选择器默认背景色,选填 string #f3f4f6
button-color 选中项的背景颜色,选填 string #fff

events 事件

事件名 说明 回调参数
change 选择某项后触发 index:选中的数组索引值
是否仍需要帮助? 请保持联络!
最后更新于 2024/04/24