fix: slider type warning, close #5289

refactor-carousel
tangjinzhou 2022-02-24 10:38:02 +08:00
parent 04baae5a57
commit 5edc8cadca
2 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,7 @@ const Range = defineComponent({
ariaLabelledByGroupForHandles: [],
ariaValueTextFormatterGroupForHandles: [],
}),
emits: ['beforeChange', 'afterChange', 'change'],
displayName: 'Range',
data() {
const { count, min, max } = this;

View File

@ -24,6 +24,7 @@ const Slider = defineComponent({
ariaValueTextFormatterForHandle: String,
startPoint: Number,
},
emits: ['beforeChange', 'afterChange', 'change'],
data() {
const defaultValue = this.defaultValue !== undefined ? this.defaultValue : this.min;
const value = this.value !== undefined ? this.value : defaultValue;