Browse Source

fix(cascader): remove outdated compatibility code(#7532) (#7534)

pull/7548/head
bsuooo 7 months ago committed by GitHub
parent
commit
7ce0f115d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 13
      components/vc-cascader/Cascader.tsx

13
components/vc-cascader/Cascader.tsx

@ -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>,
@ -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

Loading…
Cancel
Save