From a3a060077b4e5352b8444a1850be09ed9641472a Mon Sep 17 00:00:00 2001 From: tanjinzhou <415800467@qq.com> Date: Wed, 4 Nov 2020 16:58:36 +0800 Subject: [PATCH] fix: select item display not update --- antdv-demo | 2 +- components/vc-select/Selector/SingleSelector.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/antdv-demo b/antdv-demo index 778829016..171eade4f 160000 --- a/antdv-demo +++ b/antdv-demo @@ -1 +1 @@ -Subproject commit 7788290169a05f9f9dc3b82ff099ca438b0712b1 +Subproject commit 171eade4fef1877d8c6c458fae1858319a19a05c diff --git a/components/vc-select/Selector/SingleSelector.tsx b/components/vc-select/Selector/SingleSelector.tsx index 89d2f5e81..b5a2a4ee2 100644 --- a/components/vc-select/Selector/SingleSelector.tsx +++ b/components/vc-select/Selector/SingleSelector.tsx @@ -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({ {/* Display value */} {!combobox.value && item && !hasTextInput.value && ( - {Array.isArray(item.label) ? item.label.map(la => la) : item.label} + + {item.label} + )}