File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import type { DefaultOptionType, SingleValueType } from '../Cascader';
44import { SEARCH_MARK } from '../hooks/useSearchOptions' ;
55import type { Key } from '../../_util/type' ;
66import { useInjectCascader } from '../context' ;
7- import { cloneVNode } from 'vue ' ;
7+ import { cloneElement } from '../../_util/vnode ' ;
88export const FIX_LABEL = '__cascader_fix_label__' ;
99export interface ColumnProps {
1010 prefixCls : string ;
@@ -152,10 +152,10 @@ export default function Column({
152152 ) }
153153 < div class = { `${ menuItemPrefixCls } -content` } > { label } </ div >
154154 { ! isLoading && expandIcon && ! isMergedLeaf && (
155- < div class = { `${ menuItemPrefixCls } -expand-icon` } > { cloneVNode ( expandIcon ) } </ div >
155+ < div class = { `${ menuItemPrefixCls } -expand-icon` } > { cloneElement ( expandIcon ) } </ div >
156156 ) }
157157 { isLoading && loadingIcon && (
158- < div class = { `${ menuItemPrefixCls } -loading-icon` } > { cloneVNode ( loadingIcon ) } </ div >
158+ < div class = { `${ menuItemPrefixCls } -loading-icon` } > { cloneElement ( loadingIcon ) } </ div >
159159 ) }
160160 </ li >
161161 ) ;
Original file line number Diff line number Diff line change 1- import { cloneVNode } from 'vue' ;
1+ import { cloneVNode , isVNode } from 'vue' ;
22import type { VNode , FunctionalComponent , PropType } from 'vue' ;
33import type { MouseEventHandler } from '../_util/EventInterface' ;
44import type { VueNode } from '../_util/type' ;
@@ -24,7 +24,7 @@ const TransBtn: TransBtnType = (props, { slots }) => {
2424 if ( typeof customizeIcon === 'function' ) {
2525 icon = customizeIcon ( customizeIconProps ) ;
2626 } else {
27- icon = cloneVNode ( customizeIcon as VNode ) ;
27+ icon = isVNode ( customizeIcon ) ? cloneVNode ( customizeIcon as VNode ) : customizeIcon ;
2828 }
2929
3030 return (
You can’t perform that action at this time.
0 commit comments