Skip to content

t-select-option

SelectOption 选择项

组件介绍

t-select-option 是下拉选择的子级组件,用于定义下拉菜单中的选项,必须配合 t-select 使用。

平台兼容

HarmonyH5AndroidiOS小程序UTS

基础用法

基础用法参考 demo/select/select.uvue,作为 t-select 的子组件使用。

vue
<template>
  <t-select v-model="selectedValue" placeholder="请选择">
    <t-select-option value="1" label="选项一"></t-select-option>
    <t-select-option value="2" label="选项二"></t-select-option>
    <t-select-option value="3" label="选项三"></t-select-option>
  </t-select>
</template>

<script setup>
const selectedValue = ref('')
</script>

Props

属性名说明类型默认值
value选项的值string''
label选项的标签文本string''
path点击组件后跳转的页面路径string''
hover是否启用点击效果booleanfalse
type组件主题类型string''
disabled是否禁用booleanfalse
effect组件显示主题string''
size组件尺寸string'medium'

Events

事件名说明回调参数
click点击时触发-