fix: Slider error when clicking mark #407

pull/422/head
tangjinzhou 2019-01-17 12:00:07 +08:00
parent 99bf3044d6
commit 73f9b23f8b
2 changed files with 3 additions and 5 deletions

View File

@ -140,9 +140,7 @@ export default {
tabBarExtraContent, tabBarExtraContent,
renderTabBar: renderTabBarSlot, renderTabBar: renderTabBarSlot,
}, },
on: { on: this.$listeners,
...this.$listeners,
},
}; };
const contentCls = { const contentCls = {
[`${prefixCls}-${tabPosition}-content`]: true, [`${prefixCls}-${tabPosition}-content`]: true,

View File

@ -190,7 +190,7 @@ export default function createSlider(Component) {
}, },
onClickMarkLabel(e, value) { onClickMarkLabel(e, value) {
e.stopPropagation(); e.stopPropagation();
this.onChange({ value }); this.onChange({ sValue: value });
this.onEnd(); this.onEnd();
}, },
getSliderStart() { getSliderStart() {
@ -294,7 +294,7 @@ export default function createSlider(Component) {
min, min,
className: `${prefixCls}-mark`, className: `${prefixCls}-mark`,
}, },
listeners: { on: {
clickLabel: disabled ? noop : this.onClickMarkLabel, clickLabel: disabled ? noop : this.onClickMarkLabel,
}, },
}; };