File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 59
59
60
60
名称 | 类型 | 默认值 | 说明 | 必传
61
61
-- | -- | -- | -- | --
62
- cancel-btn | String | 取消 | 取消按钮文字 | N
63
- confirm-btn | String | 确认 | 确定按钮文字 | N
62
+ cancel-btn | String | '' | 取消按钮文字 | N
63
+ confirm-btn | String | '' | 确定按钮文字 | N
64
64
footer | Slot | - | 底部内容 | N
65
65
header | Boolean / Slot | true | 头部内容。值为 true 显示空白头部,值为 false 不显示任何内容,值类型为 TNode 表示自定义头部内容 | N
66
66
title | String | '' | 标题 | N
@@ -72,9 +72,9 @@ visible | Boolean | false | 是否显示 | N
72
72
73
73
名称 | 参数 | 描述
74
74
-- | -- | --
75
- cancel | ` ({}) ` | 点击取消按钮时触发
75
+ cancel | - | 点击取消按钮时触发
76
76
change | ` (value: Array < PickerValue> )` | 选中变化时候触发
77
- confirm | ` ({} )` | 点击确认确认按钮时触发
77
+ confirm | ` (index : number, value : Array < PickerValue > )` | 点击确认确认按钮时触发
78
78
79
79
### PickerItem Props
80
80
Original file line number Diff line number Diff line change 28
28
}
29
29
30
30
&__title {
31
+ flex : 1 ;
32
+ text-align : center ;
33
+ overflow : hidden ;
34
+ white-space : nowrap ;
35
+ text-overflow : ellipsis ;
31
36
color : @text-level-1-color ;
32
37
font-weight : @picker-font-weight ;
33
38
}
Original file line number Diff line number Diff line change @@ -48,12 +48,10 @@ export default class Picker extends SuperComponent {
48
48
return { index : undefined , value : undefined } ;
49
49
}
50
50
51
- const selectedValues = {
51
+ return {
52
52
index : pickerColumns . map ( ( pickerColumn ) => pickerColumn . _selectedIndex ) ,
53
53
value : pickerColumns . map ( ( pickerColumn ) => pickerColumn . _selectedValue ) ,
54
54
} ;
55
-
56
- return selectedValues ;
57
55
} ,
58
56
onConfirm ( ) {
59
57
this . triggerEvent ( 'confirm' , this . getSelectedValues ( ) ) ;
You can’t perform that action at this time.
0 commit comments