diff --git a/packages/vant/src/picker/PickerToolbar.tsx b/packages/vant/src/picker/PickerToolbar.tsx index a2ce916f8..9a1749f05 100644 --- a/packages/vant/src/picker/PickerToolbar.tsx +++ b/packages/vant/src/picker/PickerToolbar.tsx @@ -39,7 +39,12 @@ export default defineComponent({ const onConfirm = () => emit('confirm'); const renderCancel = () => { - const text = props.cancelButtonText || t('cancel'); + const text = props.cancelButtonText ?? t('cancel'); + + if (!slots.cancel && !text) { + return; + } + return (