@@ -57,7 +57,6 @@ const TreeSelect = defineComponent({
57
57
name : 'ATreeSelect' ,
58
58
inheritAttrs : false ,
59
59
props : initDefaultProps ( treeSelectProps , {
60
- transitionName : 'ant-slide-up' ,
61
60
choiceTransitionName : '' ,
62
61
listHeight : 256 ,
63
62
treeIcon : false ,
@@ -101,7 +100,15 @@ const TreeSelect = defineComponent({
101
100
dropdownMatchSelectWidth,
102
101
size,
103
102
getPopupContainer,
103
+ getPrefixCls,
104
104
} = 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
+ ) ;
105
112
const treePrefixCls = computed ( ( ) =>
106
113
configProvider . getPrefixCls ( 'select-tree' , props . prefixCls ) ,
107
114
) ;
@@ -154,8 +161,6 @@ const TreeSelect = defineComponent({
154
161
listItemHeight,
155
162
multiple,
156
163
treeIcon,
157
- transitionName,
158
- choiceTransitionName,
159
164
treeLine,
160
165
switcherIcon = slots . switcherIcon ?.( ) ,
161
166
fieldNames = props . replaceFields ,
@@ -197,7 +202,6 @@ const TreeSelect = defineComponent({
197
202
} ,
198
203
attrs . class ,
199
204
) ;
200
- const rootPrefixCls = configProvider . getPrefixCls ( ) ;
201
205
const otherProps : any = { } ;
202
206
if ( props . treeData === undefined && slots . default ) {
203
207
otherProps . children = flattenChildren ( slots . default ( ) ) ;
@@ -227,8 +231,7 @@ const TreeSelect = defineComponent({
227
231
getPopupContainer = { getPopupContainer . value }
228
232
treeMotion = { null }
229
233
dropdownClassName = { mergedDropdownClassName . value }
230
- choiceTransitionName = { getTransitionName ( rootPrefixCls , '' , choiceTransitionName ) }
231
- transitionName = { getTransitionName ( rootPrefixCls , 'slide-up' , transitionName ) }
234
+ choiceTransitionName = { choiceTransitionName . value }
232
235
onChange = { handleChange }
233
236
onBlur = { handleBlur }
234
237
onSearch = { handleSearch }
@@ -238,6 +241,7 @@ const TreeSelect = defineComponent({
238
241
treeCheckable : ( ) => < span class = { `${ prefixCls . value } -tree-checkbox-inner` } /> ,
239
242
} }
240
243
{ ...otherProps }
244
+ transitionName = { transitionName . value }
241
245
/>
242
246
) ;
243
247
} ;
0 commit comments