Skip to content

Commit

Permalink
feat: add warn while modelValue not correct
Browse files Browse the repository at this point in the history
  • Loading branch information
wiidede committed Oct 21, 2023
1 parent 91eace8 commit 7512a64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Range.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,11 @@ const modelType = computed<'number' | 'data' | 'numberList' | 'dataList'>(() =>
return 'dataList'
else if (typeof value === 'number')
return 'number'
else
else if (typeof value === 'object')
return 'data'
else
console.warn('[vue-range-multi]: modelValue type not support', value)
return 'number'
})
const model = computed<RangeData<T, U>[]>({
get: () => {
Expand Down

0 comments on commit 7512a64

Please sign in to comment.