ant-design / ant-design-icons

⭐ Ant Design SVG Icons
https://ant.design/components/icon/
MIT License
960 stars 582 forks source link

[Vue] Icons render problem when using with vite-ssr #531

Closed wheeljs closed 2 years ago

wheeljs commented 2 years ago

Hi, thanks for your great libraries about Antd.

I have a problem with using ant-design-vue@3.x, @ant-design/icons-vue@6.1.0 with vite-ssr. I found all icons usage from ant-design-vue like <a-select> just render icon once. E.g. <a-select> with multiple mode, only one remove icon and checked icon was rendered when I selected multiple options.

Reproduction link

https://stackblitz.com/edit/vitejs-vite-evglmf?file=src%2FApp.vue

Environment

macOS Monterey version 12.4, Google Chrome Version 102.0.5005.115 (Official Build) (x86_64), Vue@3.2.37, ant-design-vue@3.2.7, @ant-design/icons-vue@6.1.0

Steps to reproduce

  1. Setup a vite with ssr project by 'vite-ssr' module.
  2. Add <a-select mode="multiple"> into component, select multiple options.
  3. Only one selected options in <a-select> has remove icon, checked icon in select options list also have this problem.

What is expected?

All selected options should have remove icon after its label.

What is actually happening?

Only one selected options in <a-select> has remove icon.


Withour SSR(Works) reproduction link: https://stackblitz.com/edit/vitejs-vite-c6xqfq?file=src%2FApp.vue

I have also fire this issue in vite-ssr repo, ant-design-vue repo. Sorry for my English.