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

pull/7548/head
bsuooo 7 months ago committed by GitHub
parent 54434b0931
commit 7ce0f115d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -102,8 +102,6 @@ function baseCascaderProps<OptionType extends BaseOptionType = DefaultOptionType
/** @deprecated Use `open` instead */ /** @deprecated Use `open` instead */
popupVisible: { type: Boolean, default: undefined }, popupVisible: { type: Boolean, default: undefined },
/** @deprecated Use `dropdownClassName` instead */
popupClassName: String,
dropdownClassName: String, dropdownClassName: String,
dropdownMenuColumnStyle: { dropdownMenuColumnStyle: {
type: Object as PropType<CSSProperties>, type: Object as PropType<CSSProperties>,
@ -422,11 +420,6 @@ export default defineComponent({
'Cascader', 'Cascader',
'`popupVisible` is deprecated. Please use `open` instead.', '`popupVisible` is deprecated. Please use `open` instead.',
); );
devWarning(
props.popupClassName === undefined,
'Cascader',
'`popupClassName` is deprecated. Please use `dropdownClassName` instead.',
);
devWarning( devWarning(
props.popupPlacement === undefined, props.popupPlacement === undefined,
'Cascader', 'Cascader',
@ -442,8 +435,6 @@ export default defineComponent({
const mergedOpen = computed(() => (props.open !== undefined ? props.open : props.popupVisible)); 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 mergedDropdownStyle = computed(() => props.dropdownStyle || props.popupStyle || {});
const mergedPlacement = computed(() => props.placement || props.popupPlacement); const mergedPlacement = computed(() => props.placement || props.popupPlacement);
@ -462,6 +453,7 @@ export default defineComponent({
loadingIcon, loadingIcon,
dropdownMenuColumnStyle, dropdownMenuColumnStyle,
customSlots, customSlots,
dropdownClassName,
} = toRefs(props); } = toRefs(props);
useProvideCascader({ useProvideCascader({
options: mergedOptions, options: mergedOptions,
@ -525,7 +517,6 @@ export default defineComponent({
'popupVisible', 'popupVisible',
'open', 'open',
'popupClassName',
'dropdownClassName', 'dropdownClassName',
'dropdownMenuColumnStyle', 'dropdownMenuColumnStyle',
@ -581,7 +572,7 @@ export default defineComponent({
emptyOptions={emptyOptions} emptyOptions={emptyOptions}
// Open // Open
open={mergedOpen.value} open={mergedOpen.value}
dropdownClassName={mergedDropdownClassName.value} dropdownClassName={dropdownClassName.value}
placement={mergedPlacement.value} placement={mergedPlacement.value}
onDropdownVisibleChange={onInternalDropdownVisibleChange} onDropdownVisibleChange={onInternalDropdownVisibleChange}
// Children // Children

Loading…
Cancel
Save