File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import type { DefaultOptionType, SingleValueType } from '../Cascader';
4
4
import { SEARCH_MARK } from '../hooks/useSearchOptions' ;
5
5
import type { Key } from '../../_util/type' ;
6
6
import { useInjectCascader } from '../context' ;
7
+ import { cloneVNode } from 'vue' ;
7
8
export const FIX_LABEL = '__cascader_fix_label__' ;
8
9
export interface ColumnProps {
9
10
prefixCls : string ;
<
8000
path d="M7.823 1.677 4.927 4.573A.25.25 0 0 0 5.104 5H7.25v3.236a.75.75 0 1 0 1.5 0V5h2.146a.25.25 0 0 0 .177-.427L8.177 1.677a.25.25 0 0 0-.354 0ZM13.75 11a.75.75 0 0 0 0 1.5h.5a.75.75 0 0 0 0-1.5h-.5Zm-3.75.75a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75ZM7.75 11a.75.75 0 0 0 0 1.5h.5a.75.75 0 0 0 0-1.5h-.5ZM4 11.75a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75ZM1.75 11a.75.75 0 0 0 0 1.5h.5a.75.75 0 0 0 0-1.5h-.5Z"> @@ -151,10 +152,10 @@ export default function Column({
151
152
) }
152
153
< div class = { `${ menuItemPrefixCls } -content` } > { label } </ div >
153
154
{ ! isLoading && expandIcon && ! isMergedLeaf && (
154
- < div class = { `${ menuItemPrefixCls } -expand-icon` } > { expandIcon } </ div >
155
+ < div class = { `${ menuItemPrefixCls } -expand-icon` } > { cloneVNode ( expandIcon ) } </ div >
155
156
) }
156
157
{ isLoading && loadingIcon && (
157
- < div class = { `${ menuItemPrefixCls } -loading-icon` } > { loadingIcon } </ div >
158
+ < div class = { `${ menuItemPrefixCls } -loading-icon` } > { cloneVNode ( loadingIcon ) } </ div >
158
159
) }
159
160
</ li >
160
161
) ;
Original file line number Diff line number Diff line change 1
- import type { FunctionalComponent , PropType } from 'vue' ;
1
+ import { cloneVNode , type FunctionalComponent , type PropType } from 'vue' ;
2
2
import type { MouseEventHandler } from '../_util/EventInterface' ;
3
3
import type { VueNode } from '../_util/type' ;
4
4
import PropTypes from '../_util/vue-types' ;
@@ -23,7 +23,7 @@ const TransBtn: TransBtnType = (props, { slots }) => {
23
23
if ( typeof customizeIcon === 'function' ) {
24
24
icon = customizeIcon ( customizeIconProps ) ;
25
25
} else {
26
- icon = customizeIcon ;
26
+ icon = cloneVNode ( customizeIcon ) ;
27
27
}
28
28
29
29
return (
You can’t perform that action at this time.
0 commit comments