Closed zhaopan-pan closed 1 year ago
I think you're right. 👍
Xicons.vue. The vue component can not only render an icon with linked text, but also render an icon separately. I think the original intention of this component design. The link has a default value of 'javascript: void (0)', so when using the Xicons component, I just want to get an icon. I did not pass the link to it, but I still got an a tag. This is a bit illogical because it seems that the following code will never be executed:
<component v-else :style="iconStyle" :is="icons[icon]" />
I think whether to use the a tag is decided by the component user, not by Xicons.So I created this pr, which has passed the local test and pnpm example: build
Xicons.vue. The vue component can not only render an icon with linked text, but also render an icon separately. I think the original intention of this component design. The link has a default value of 'javascript: void (0)', so when using the Xicons component, I just want to get an icon. I did not pass the link to it, but I still got an a tag. This is a bit illogical because it seems that the following code will never be executed:
<component v-else :style="iconStyle" :is="icons[icon]" />
I think whether to use the a tag is decided by the component user, not by Xicons.So I created this pr, which has passed the local test and pnpm example: build