mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[new feature] DropdownItem: add title-class prop
This commit is contained in:
parent
4c1075020f
commit
14ac581ac6
@ -6,6 +6,10 @@
|
|||||||
|
|
||||||
- 新增`lock-scroll`属性
|
- 新增`lock-scroll`属性
|
||||||
|
|
||||||
|
##### DropdownItem
|
||||||
|
|
||||||
|
- 新增`title-class`属性
|
||||||
|
|
||||||
##### Picker
|
##### Picker
|
||||||
|
|
||||||
- 支持惯性滚动
|
- 支持惯性滚动
|
||||||
|
@ -13,7 +13,8 @@ export default sfc({
|
|||||||
value: null,
|
value: null,
|
||||||
title: String,
|
title: String,
|
||||||
options: Array,
|
options: Array,
|
||||||
disabled: Boolean
|
disabled: Boolean,
|
||||||
|
titleClass: String
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
@ -95,6 +95,7 @@ export default {
|
|||||||
| title | Item title | `String` | Text of selected option |
|
| title | Item title | `String` | Text of selected option |
|
||||||
| options | Options | `Array` | `[]` |
|
| options | Options | `Array` | `[]` |
|
||||||
| disabled | Whether to disable dropdown item | `Boolean` | `false` |
|
| disabled | Whether to disable dropdown item | `Boolean` | `false` |
|
||||||
|
| title-class | Title class | `String` | - |
|
||||||
|
|
||||||
### DropdownItem Events
|
### DropdownItem Events
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ export default sfc({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class={bem('title', { active: item.show })}
|
class={[bem('title', { active: item.show }), item.titleClass]}
|
||||||
style={{ color: item.show ? this.activeColor : '' }}
|
style={{ color: item.show ? this.activeColor : '' }}
|
||||||
>
|
>
|
||||||
{item.displayTitle}
|
{item.displayTitle}
|
||||||
|
@ -106,6 +106,7 @@ export default {
|
|||||||
| title | 菜单项标题 | `String` | 当前选中项文字 | - |
|
| title | 菜单项标题 | `String` | 当前选中项文字 | - |
|
||||||
| options | 选项数组 | `Array` | `[]` | - |
|
| options | 选项数组 | `Array` | `[]` | - |
|
||||||
| disabled | 是否禁用菜单 | `Boolean` | `false` | - |
|
| disabled | 是否禁用菜单 | `Boolean` | `false` | - |
|
||||||
|
| title-class | 标题额外类名 | `String` | - | - |
|
||||||
|
|
||||||
### DropdownItem Events
|
### DropdownItem Events
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user