refactor: slider to ts
parent
7a7b9f25cc
commit
2c60a2c5aa
|
@ -1,3 +1,4 @@
|
|||
import ResizeObserver from 'resize-observer-polyfill';
|
||||
import contains from '../vc-util/Dom/contains';
|
||||
export function buffer(fn, ms) {
|
||||
let timer;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { defineComponent } from 'vue';
|
||||
import classNames from '../../_util/classNames';
|
||||
import PropTypes from '../../_util/vue-types';
|
||||
import BaseMixin from '../../_util/BaseMixin';
|
||||
import { getOptionProps } from '../../_util/props-util';
|
||||
import addEventListener from '../../vc-util/Dom/addEventListener';
|
||||
|
||||
export default {
|
||||
export default defineComponent({
|
||||
name: 'Handle',
|
||||
mixins: [BaseMixin],
|
||||
inheritAttrs: false,
|
||||
|
@ -128,4 +129,4 @@ export default {
|
|||
};
|
||||
return <div {...handleProps} />;
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { defineComponent } from 'vue';
|
||||
import classNames from '../../../_util/classNames';
|
||||
import PropTypes from '../../../_util/vue-types';
|
||||
import addEventListener from '../../../vc-util/Dom/addEventListener';
|
||||
|
@ -34,7 +35,7 @@ export default function createSlider(Component) {
|
|||
activeDotStyle: PropTypes.object,
|
||||
autofocus: PropTypes.looseBool,
|
||||
};
|
||||
return {
|
||||
return defineComponent({
|
||||
name: 'createSlider',
|
||||
inheritAttrs: false,
|
||||
mixins: [BaseMixin, Component],
|
||||
|
@ -337,5 +338,5 @@ export default function createSlider(Component) {
|
|||
</div>
|
||||
);
|
||||
},
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue