From 7ce0f115d5d307b5b489013fc54fff6d158f39c2 Mon Sep 17 00:00:00 2001 From: bsuooo <91053541+bsuooo@users.noreply.github.com> Date: Tue, 30 Apr 2024 19:13:48 +0800 Subject: [PATCH] fix(cascader): remove outdated compatibility code(#7532) (#7534) --- components/vc-cascader/Cascader.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/components/vc-cascader/Cascader.tsx b/components/vc-cascader/Cascader.tsx index b00b8fe4b9..82c7a63570 100644 --- a/components/vc-cascader/Cascader.tsx +++ b/components/vc-cascader/Cascader.tsx @@ -102,8 +102,6 @@ function baseCascaderProps, @@ -422,11 +420,6 @@ export default defineComponent({ 'Cascader', '`popupVisible` is deprecated. Please use `open` instead.', ); - devWarning( - props.popupClassName === undefined, - 'Cascader', - '`popupClassName` is deprecated. Please use `dropdownClassName` instead.', - ); devWarning( props.popupPlacement === undefined, 'Cascader', @@ -442,8 +435,6 @@ export default defineComponent({ const mergedOpen = computed(() => (props.open !== undefined ? props.open : props.popupVisible)); - const mergedDropdownClassName = computed(() => props.dropdownClassName || props.popupClassName); - const mergedDropdownStyle = computed(() => props.dropdownStyle || props.popupStyle || {}); const mergedPlacement = computed(() => props.placement || props.popupPlacement); @@ -462,6 +453,7 @@ export default defineComponent({ loadingIcon, dropdownMenuColumnStyle, customSlots, + dropdownClassName, } = toRefs(props); useProvideCascader({ options: mergedOptions, @@ -525,7 +517,6 @@ export default defineComponent({ 'popupVisible', 'open', - 'popupClassName', 'dropdownClassName', 'dropdownMenuColumnStyle', @@ -581,7 +572,7 @@ export default defineComponent({ emptyOptions={emptyOptions} // Open open={mergedOpen.value} - dropdownClassName={mergedDropdownClassName.value} + dropdownClassName={dropdownClassName.value} placement={mergedPlacement.value} onDropdownVisibleChange={onInternalDropdownVisibleChange} // Children