fix[Select|Cascader]: select multiple error & cascader error in ssr mode (#7377)
* docs: updating the `dropdownRender` description and jumps in the FAQ for Select * fix: fix select error in multiple mode * fix: fix cascader select error in ssr modepull/7516/head
parent
162d1fcf95
commit
c28c38d02e
|
@ -4,6 +4,7 @@ import type { DefaultOptionType, SingleValueType } from '../Cascader';
|
|||
import { SEARCH_MARK } from '../hooks/useSearchOptions';
|
||||
import type { Key } from '../../_util/type';
|
||||
import { useInjectCascader } from '../context';
|
||||
import { cloneVNode } from 'vue';
|
||||
export const FIX_LABEL = '__cascader_fix_label__';
|
||||
export interface ColumnProps {
|
||||
prefixCls: string;
|
||||
|
@ -151,10 +152,10 @@ export default function Column({
|
|||
)}
|
||||
<div class={`${menuItemPrefixCls}-content`}>{label}</div>
|
||||
{!isLoading && expandIcon && !isMergedLeaf && (
|
||||
<div class={`${menuItemPrefixCls}-expand-icon`}>{expandIcon}</div>
|
||||
<div class={`${menuItemPrefixCls}-expand-icon`}>{cloneVNode(expandIcon)}</div>
|
||||
)}
|
||||
{isLoading && loadingIcon && (
|
||||
<div class={`${menuItemPrefixCls}-loading-icon`}>{loadingIcon}</div>
|
||||
<div class={`${menuItemPrefixCls}-loading-icon`}>{cloneVNode(loadingIcon)}</div>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { FunctionalComponent, PropType } from 'vue';
|
||||
import { cloneVNode, type FunctionalComponent, type PropType } from 'vue';
|
||||
import type { MouseEventHandler } from '../_util/EventInterface';
|
||||
import type { VueNode } from '../_util/type';
|
||||
import PropTypes from '../_util/vue-types';
|
||||
|
@ -23,7 +23,7 @@ const TransBtn: TransBtnType = (props, { slots }) => {
|
|||
if (typeof customizeIcon === 'function') {
|
||||
icon = customizeIcon(customizeIconProps);
|
||||
} else {
|
||||
icon = customizeIcon;
|
||||
icon = cloneVNode(customizeIcon);
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue