mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
fix(DatePicker): only throw error in development (#11248)
This commit is contained in:
@@ -128,9 +128,12 @@ export default defineComponent({
|
|||||||
case 'day':
|
case 'day':
|
||||||
return genDayOptions();
|
return genDayOptions();
|
||||||
default:
|
default:
|
||||||
throw new Error(
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
`[Vant] DatePicker: unsupported columns type: ${type}`
|
throw new Error(
|
||||||
);
|
`[Vant] DatePicker: unsupported columns type: ${type}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@@ -83,9 +83,12 @@ export default defineComponent({
|
|||||||
filter
|
filter
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
throw new Error(
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
`[Vant] DatePicker: unsupported columns type: ${type}`
|
throw new Error(
|
||||||
);
|
`[Vant] DatePicker: unsupported columns type: ${type}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user