Select

作为表单控件的原生选择框,选项通过内容投影提供。

可用框架
  • Angular: 可用
  • Vue: 可用
  • React: 可用
  • React Native: 可用

用法

Selected: en

导入

ts
import {
  SoneSelectComponent,
} from "@surface-one/angular/select";

API 参考

SoneSelectComponent组件

选择器
sone-select
输入
名称类型 默认值
ariaLabelstring | nullnull
sizeNativeSelectSize"default"
selectIdstring | nullnull
namestring | nullnull
invalidbooleanfalse
ariaDescribedby

Extra ids for `aria-describedby` on the inner `<select>`.

string | nullnull
value双向

The selected value for `[(value)]`. `valueChange` fires only when the user picks an option — a forms write (`writeValue` from `formControl` / `ngModel`) updates the display without emitting it.

string""
disabledbooleanfalse
输出
名称类型
selectionChange

Fires ONLY when the user picks an option — never on any programmatic write.

string