Skip to content

Commit

Permalink
fix(cascader): remove outdated compatibility code(#7532) (#7534)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsuooo authored Apr 30, 2024
1 parent 54434b0 commit 7ce0f11
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions components/vc-cascader/Cascader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ function baseCascaderProps<OptionType extends BaseOptionType = DefaultOptionType
/** @deprecated Use `open` instead */
popupVisible: { type: Boolean, default: undefined },

/** @deprecated Use `dropdownClassName` instead */
popupClassName: String,
dropdownClassName: String,
dropdownMenuColumnStyle: {
type: Object as PropType<CSSProperties>,
Expand Down Expand Up @@ -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',
Expand All @@ -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);
Expand All @@ -462,6 +453,7 @@ export default defineComponent({
loadingIcon,
dropdownMenuColumnStyle,
customSlots,
dropdownClassName,
} = toRefs(props);
useProvideCascader({
options: mergedOptions,
Expand Down Expand Up @@ -525,7 +517,6 @@ export default defineComponent({
'popupVisible',
'open',

'popupClassName',
'dropdownClassName',
'dropdownMenuColumnStyle',

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7ce0f11

Please sign in to comment.