layui/example/docs/zh-CN/components/select.md

105 lines
1.7 KiB
Markdown
Raw Normal View History

2021-10-26 01:13:23 +08:00
::: title 基础使用
:::
::: demo
<template>
<lay-select>
<lay-select-option value="1" label="学习"></lay-select-option>
<lay-select-option value="2" label="编码"></lay-select-option>
<lay-select-option value="3" label="运动"></lay-select-option>
</lay-select>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
return {
}
}
}
</script>
:::
2021-10-26 01:13:23 +08:00
::: title 选择禁用
:::
::: demo
<template>
<lay-select v-model="selected">
<lay-select-option value="1" label="学习"></lay-select-option>
<lay-select-option value="2" label="编码" disabled="true"></lay-select-option>
<lay-select-option value="3" label="运动"></lay-select-option>
</lay-select>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
const selected = ref('1')
return {
selected
}
}
}
</script>
:::
2021-10-26 01:13:23 +08:00
::: title select 属性
:::
2021-11-07 15:55:08 +08:00
::: table
2021-10-26 01:14:17 +08:00
| Name | Description | Accepted Values |
| ------- | -------------- | --------------- |
| name | 原生 name 属性 | -- |
| v-model | 选中值 | -- |
2021-11-07 15:55:08 +08:00
:::
2021-10-26 01:13:23 +08:00
::: title select-option 属性
:::
2021-11-07 15:55:08 +08:00
::: table
2021-10-26 01:14:17 +08:00
| Name | Description | Accepted Values |
| ----- | ----------- | --------------- |
| label | 标签 | -- |
| value | 值 | -- |
2021-11-07 15:55:08 +08:00
:::
2021-10-26 01:13:23 +08:00
::: title select-option 插槽
:::
2021-11-07 15:55:08 +08:00
::: table
2021-10-26 01:14:17 +08:00
| Name | Description | Accepted Values |
| ------- | ----------- | --------------- |
| default | 默认 | -- |
2021-11-07 15:55:08 +08:00
:::
2021-10-26 01:13:23 +08:00
::: title select 事件
:::
2021-11-07 15:55:08 +08:00
::: table
2021-10-26 01:14:17 +08:00
| Name | Description | Accepted Values |
| ------ | ----------- | --------------- |
| change | 切换事件 | value |
2021-11-07 15:55:08 +08:00
2021-11-07 15:56:24 +08:00
:::
2021-12-16 17:57:59 +08:00
::: comment
:::