@@ -57,7 +57,6 @@ const TreeSelect = defineComponent({
5757 name : 'ATreeSelect' ,
5858 inheritAttrs : false ,
5959 props : initDefaultProps ( treeSelectProps , {
60- transitionName : 'ant-slide-up' ,
6160 choiceTransitionName : '' ,
6261 listHeight : 256 ,
6362 treeIcon : false ,
@@ -101,7 +100,15 @@ const TreeSelect = defineComponent({
101100 dropdownMatchSelectWidth,
102101 size,
103102 getPopupContainer,
103+ getPrefixCls,
104104 } = useConfigInject ( 'select' , props ) ;
105+ const rootPrefixCls = computed ( ( ) => getPrefixCls ( ) ) ;
106+ const transitionName = computed ( ( ) =>
107+ getTransitionName ( rootPrefixCls . value , 'slide-up' , props . transitionName ) ,
108+ ) ;
109+ const choiceTransitionName = computed ( ( ) =>
110+ getTransitionName ( rootPrefixCls . value , '' , props . choiceTransitionName ) ,
111+ ) ;
105112 const treePrefixCls = computed ( ( ) =>
106113 configProvider . getPrefixCls ( 'select-tree' , props . prefixCls ) ,
107114 ) ;
@@ -154,8 +161,6 @@ const TreeSelect = defineComponent({
154161 listItemHeight,
155162 multiple,
156163 treeIcon,
157- transitionName,
158- choiceTransitionName,
159164 treeLine,
160165 switcherIcon = slots . switcherIcon ?.( ) ,
161166 fieldNames = props . replaceFields ,
@@ -197,7 +202,6 @@ const TreeSelect = defineComponent({
197202 } ,
198203 attrs . class ,
199204 ) ;
200- const rootPrefixCls = configProvider . getPrefixCls ( ) ;
201205 const otherProps : any = { } ;
202206 if ( props . treeData === undefined && slots . default ) {
203207 otherProps . children = flattenChildren ( slots . default ( ) ) ;
@@ -227,8 +231,7 @@ const TreeSelect = defineComponent({
227231 getPopupContainer = { getPopupContainer . value }
228232 treeMotion = { null }
229233 dropdownClassName = { mergedDropdownClassName . value }
230- choiceTransitionName = { getTransitionName ( rootPrefixCls , '' , choiceTransitionName ) }
231- transitionName = { getTransitionName ( rootPrefixCls , 'slide-up' , transitionName ) }
234+ choiceTransitionName = { choiceTransitionName . value }
232235 onChange = { handleChange }
233236 onBlur = { handleBlur }
234237 onSearch = { handleSearch }
@@ -238,6 +241,7 @@ const TreeSelect = defineComponent({
238241 treeCheckable : ( ) => < span class = { `${ prefixCls . value } -tree-checkbox-inner` } /> ,
239242 } }
240243 { ...otherProps }
244+ transitionName = { transitionName . value }
241245 />
242246 ) ;
243247 } ;
0 commit comments