2021-10-26 01:13:23 +08:00
|
|
|
::: title 基础使用
|
2021-10-20 21:48:05 +08:00
|
|
|
:::
|
|
|
|
|
2021-10-20 14:42:04 +08:00
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<lay-select>
|
2021-10-20 21:48:05 +08:00
|
|
|
<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 选择禁用
|
2021-10-20 21:48:05 +08:00
|
|
|
:::
|
|
|
|
|
|
|
|
::: 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>
|
2021-10-20 14:42:04 +08:00
|
|
|
</lay-select>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
2021-10-20 21:48:05 +08:00
|
|
|
const selected = ref('1')
|
|
|
|
|
2021-10-20 14:42:04 +08:00
|
|
|
return {
|
2021-10-20 21:48:05 +08:00
|
|
|
selected
|
2021-10-20 14:42:04 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2021-10-20 21:48:05 +08:00
|
|
|
:::
|
|
|
|
|
2021-10-26 01:13:23 +08:00
|
|
|
::: title select 属性
|
2021-10-20 21:48:05 +08:00
|
|
|
:::
|
|
|
|
|
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-10-20 21:48:05 +08:00
|
|
|
|
2021-11-07 15:55:08 +08:00
|
|
|
:::
|
|
|
|
|
2021-10-26 01:13:23 +08:00
|
|
|
::: title select-option 属性
|
2021-10-20 21:48:05 +08:00
|
|
|
:::
|
|
|
|
|
2021-11-07 15:55:08 +08:00
|
|
|
::: table
|
|
|
|
|
2021-10-26 01:14:17 +08:00
|
|
|
| Name | Description | Accepted Values |
|
|
|
|
| ----- | ----------- | --------------- |
|
|
|
|
| label | 标签 | -- |
|
|
|
|
| value | 值 | -- |
|
2021-10-20 21:48:05 +08:00
|
|
|
|
2021-11-07 15:55:08 +08:00
|
|
|
:::
|
|
|
|
|
2021-10-26 01:13:23 +08:00
|
|
|
::: title select-option 插槽
|
2021-10-20 21:48:05 +08:00
|
|
|
:::
|
|
|
|
|
2021-11-07 15:55:08 +08:00
|
|
|
::: table
|
|
|
|
|
2021-10-26 01:14:17 +08:00
|
|
|
| Name | Description | Accepted Values |
|
|
|
|
| ------- | ----------- | --------------- |
|
|
|
|
| default | 默认 | -- |
|
2021-10-20 21:48:05 +08:00
|
|
|
|
2021-11-07 15:55:08 +08:00
|
|
|
:::
|
|
|
|
|
2021-10-26 01:13:23 +08:00
|
|
|
::: title select 事件
|
2021-10-20 21:48:05 +08:00
|
|
|
:::
|
|
|
|
|
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
|
|
|
:::
|