File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,18 @@ Get all options of selected items
5151
5252#### TabPicker Events
5353
54+ ##### @select (data)
55+ Option selected event
56+
57+ ```
58+ // data对象
59+ {
60+ index: 0,
61+ value: 'value1',
62+ options: { value: 'value1', label: 'Item1' }
63+ }
64+ ```
65+
5466##### @change (data)
5567Change selection in the tabpicker
5668
Original file line number Diff line number Diff line change @@ -52,6 +52,18 @@ Vue.component(TabPicker.name, TabPicker)
5252
5353#### TabPicker 事件
5454
55+ ##### @select (data)
56+ 选项选中事件
57+
58+ ```
59+ // data对象
60+ {
61+ index: 0,
62+ value: 'value1',
63+ options: { value: 'value1', label: 'Item1' }
64+ }
65+ ```
66+
5567##### @change (data)
5668底部弹窗选中事件
5769
Original file line number Diff line number Diff line change 2121 v-model =" currentTab"
2222 ref =" tabs"
2323 >
24- <md-scroll-view :scrolling-x =" false" auto-reflow >
24+ <md-scroll-view
25+ ref =" scrollView"
26+ :scrolling-x =" false"
27+ auto-reflow
28+ >
2529 <md-tab-pane
2630 v-for =" (pane, index) in panes"
2731 :key =" pane.name"
@@ -197,9 +201,16 @@ export default {
197201 this .$nextTick (() => {
198202 const nextPane = this .panes [index + 1 ]
199203
204+ this .$emit (' select' , {
205+ index,
206+ value,
207+ option: this .panes [index],
208+ })
209+
200210 /* istanbul ignore else */
201211 if (nextPane) {
202212 this .currentTab = nextPane .name
213+ this .$refs .scrollView .scrollTo (0 , 0 )
203214 } else if (value !== ' ' ) {
204215 setTimeout (() => {
205216 this .$emit (' change' , {
You can’t perform that action at this time.
0 commit comments