fix: select item display not update

pull/3128/head
tanjinzhou 4 years ago
parent 36b2d47f84
commit a3a060077b

@ -1 +1 @@
Subproject commit 7788290169a05f9f9dc3b82ff099ca438b0712b1
Subproject commit 171eade4fef1877d8c6c458fae1858319a19a05c

@ -1,7 +1,7 @@
import pickAttrs from '../../_util/pickAttrs';
import Input from './Input';
import { InnerSelectorProps } from '.';
import { computed, defineComponent, ref, VNodeChild, watch } from 'vue';
import { computed, defineComponent, Fragment, ref, VNodeChild, watch } from 'vue';
import PropTypes from '../../_util/vue-types';
interface SelectorProps extends InnerSelectorProps {
@ -125,7 +125,9 @@ const SingleSelector = defineComponent<SelectorProps>({
{/* Display value */}
{!combobox.value && item && !hasTextInput.value && (
<span class={`${prefixCls}-selection-item`} title={title.value}>
{Array.isArray(item.label) ? item.label.map(la => la) : item.label}
<Fragment key={item.key || item.value}>
{item.label}
</Fragment>
</span>
)}

Loading…
Cancel
Save