diff --git a/antdv-demo b/antdv-demo index 3d603c83c..2d8d146c9 160000 --- a/antdv-demo +++ b/antdv-demo @@ -1 +1 @@ -Subproject commit 3d603c83c0d128769b81ffe12ef9d8cbd5dbb166 +Subproject commit 2d8d146c97bb030ac9fe572741483db8f7436460 diff --git a/components/grid/__tests__/__snapshots__/index.test.js.snap b/components/grid/__tests__/__snapshots__/index.test.js.snap index dd1aea276..d0976028f 100644 --- a/components/grid/__tests__/__snapshots__/index.test.js.snap +++ b/components/grid/__tests__/__snapshots__/index.test.js.snap @@ -3,24 +3,12 @@ exports[`Grid renders wrapped Col correctly 1`] = `
-
- -
-
-
- +
+
`; -exports[`Grid should render Col 1`] = ` -
- -
-`; +exports[`Grid should render Col 1`] = `
`; -exports[`Grid should render Row 1`] = ` -
- -
-`; +exports[`Grid should render Row 1`] = `
`; diff --git a/components/slider/index.jsx b/components/slider/index.jsx index d5ffb5360..350f25fd8 100644 --- a/components/slider/index.jsx +++ b/components/slider/index.jsx @@ -29,6 +29,9 @@ export const SliderProps = () => ({ tooltipVisible: PropTypes.bool, tooltipPlacement: tooltipProps.placement, getTooltipPopupContainer: PropTypes.func, + onChange: PropTypes.func, + 'onUpdate:value': PropTypes.func, + onAfterChange: PropTypes.func, }); const defaultTipFormatter = value => value.toString(); @@ -104,6 +107,10 @@ const Slider = { blur() { this.vcSlider.blur(); }, + handleChange(val) { + this.$emit('update:value', val); + this.$emit('change', val); + }, }, render() { const { @@ -122,6 +129,7 @@ const Slider = { tooltipPrefixCls, handle: info => this.handleWithTooltip(tooltipPrefixCls, prefixCls, info), ref: this.saveSlider, + onChange: this.handleChange, }; return ; } @@ -131,6 +139,7 @@ const Slider = { tooltipPrefixCls, handle: info => this.handleWithTooltip(tooltipPrefixCls, prefixCls, info), ref: this.saveSlider, + onChange: this.handleChange, }; return ; }, diff --git a/examples/App.vue b/examples/App.vue index 152b72301..8193d1dd5 100644 --- a/examples/App.vue +++ b/examples/App.vue @@ -4,7 +4,7 @@