fix: slider v-model not work
parent
0c32d1679d
commit
d58a0f21df
|
@ -1 +1 @@
|
|||
Subproject commit 3d603c83c0d128769b81ffe12ef9d8cbd5dbb166
|
||||
Subproject commit 2d8d146c97bb030ac9fe572741483db8f7436460
|
|
@ -3,24 +3,12 @@
|
|||
exports[`Grid renders wrapped Col correctly 1`] = `
|
||||
<div class="ant-row" style="margin-left: -10px; margin-right: -10px;">
|
||||
<div>
|
||||
<div class="ant-col ant-col-12" style="padding-left: 10px; padding-right: 10px;">
|
||||
<!---->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ant-col ant-col-12" style="padding-left: 10px; padding-right: 10px;">
|
||||
<!---->
|
||||
<div class="ant-col ant-col-12" style="padding-left: 10px; padding-right: 10px;"></div>
|
||||
</div>
|
||||
<div class="ant-col ant-col-12" style="padding-left: 10px; padding-right: 10px;"></div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Grid should render Col 1`] = `
|
||||
<div class="ant-col ant-col-2">
|
||||
<!---->
|
||||
</div>
|
||||
`;
|
||||
exports[`Grid should render Col 1`] = `<div class="ant-col ant-col-2"></div>`;
|
||||
|
||||
exports[`Grid should render Row 1`] = `
|
||||
<div class="ant-row">
|
||||
<!---->
|
||||
</div>
|
||||
`;
|
||||
exports[`Grid should render Row 1`] = `<div class="ant-row"></div>`;
|
||||
|
|
|
@ -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 <VcRange {...vcRangeProps} />;
|
||||
}
|
||||
|
@ -131,6 +139,7 @@ const Slider = {
|
|||
tooltipPrefixCls,
|
||||
handle: info => this.handleWithTooltip(tooltipPrefixCls, prefixCls, info),
|
||||
ref: this.saveSlider,
|
||||
onChange: this.handleChange,
|
||||
};
|
||||
return <VcSlider {...vcSliderProps} />;
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import demo from '../antdv-demo/docs/empty/demo/index';
|
||||
import demo from '../antdv-demo/docs/grid/demo/index';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
Loading…
Reference in New Issue