From c25ebf772d83de1adf87c8a6b8a775e4669e37fa Mon Sep 17 00:00:00 2001 From: Reino <93204795+ReinoFu@users.noreply.github.com> Date: Tue, 30 Apr 2024 21:19:21 +0800 Subject: [PATCH] feat(PickerGroup): add new prop showToolbar (#12839) --- .../vant/src/picker-group/PickerGroup.tsx | 20 +++++++++++-------- packages/vant/src/picker-group/README.md | 1 + .../vant/src/picker-group/README.zh-CN.md | 1 + 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/vant/src/picker-group/PickerGroup.tsx b/packages/vant/src/picker-group/PickerGroup.tsx index efead8dc4..1006bd9b1 100644 --- a/packages/vant/src/picker-group/PickerGroup.tsx +++ b/packages/vant/src/picker-group/PickerGroup.tsx @@ -15,6 +15,7 @@ import { makeArrayProp, makeNumericProp, createNamespace, + truthProp, } from '../utils'; // Composables @@ -40,6 +41,7 @@ export const pickerGroupProps = extend( tabs: makeArrayProp(), activeTab: makeNumericProp(0), nextStepText: String, + showToolbar: truthProp, }, pickerToolbarProps, ); @@ -100,14 +102,16 @@ export default defineComponent({ return (
- + {props.showToolbar ? ( + + ) : null}