mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(DatePicker): only throw error in development (#11248)
This commit is contained in:
parent
e6c6265e69
commit
83dcbe6f5f
@ -128,9 +128,12 @@ export default defineComponent({
|
||||
case 'day':
|
||||
return genDayOptions();
|
||||
default:
|
||||
throw new Error(
|
||||
`[Vant] DatePicker: unsupported columns type: ${type}`
|
||||
);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
throw new Error(
|
||||
`[Vant] DatePicker: unsupported columns type: ${type}`
|
||||
);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
})
|
||||
);
|
||||
|
@ -83,9 +83,12 @@ export default defineComponent({
|
||||
filter
|
||||
);
|
||||
default:
|
||||
throw new Error(
|
||||
`[Vant] DatePicker: unsupported columns type: ${type}`
|
||||
);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
throw new Error(
|
||||
`[Vant] DatePicker: unsupported columns type: ${type}`
|
||||
);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
})
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user