Skip to content

Commit

Permalink
fix(FSelect): 选项值选中时,提示信息会闪跳 (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocean-gao authored Mar 20, 2024
1 parent 72ca443 commit 6334a92
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 5 additions & 5 deletions components/select/optionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ export default defineComponent({
</span>
)}
</Ellipsis>
{isSelected && (
<CheckOutlined
class={`${prefixCls}-checked-icon`}
/>
)}
<CheckOutlined
class={`${prefixCls}-checked-icon ${
isSelected ? 'is-selected' : ''
}`}
/>
</>
);
}
Expand Down
4 changes: 4 additions & 0 deletions components/select/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
&-checked-icon {
margin-left: @padding-xs;
font-size: @font-size-head;
visibility: hidden;
&.is-selected {
visibility: visible;
}
}
&.is-hover {
background: @select-option-hover-color;
Expand Down
4 changes: 2 additions & 2 deletions docs/.vitepress/components/select/common.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:value="item.value"
:disabled="item.disabled"
>
{{ item.label }}
<FEllipsis style="max-width: 300px"> {{ item.label }}</FEllipsis>
</FOption>
</FSelect>
</template>
Expand All @@ -23,7 +23,7 @@ export default {
const optionList = reactive([
{
value: 'HuNan',
label: '湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南',
label: '湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南湖南',
},
{
value: 'HuBei',
Expand Down

0 comments on commit 6334a92

Please sign in to comment.