Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add icon and auto import plugins #16

Merged
merged 1 commit into from
Aug 31, 2024
Merged

Add icon and auto import plugins #16

merged 1 commit into from
Aug 31, 2024

Conversation

rileychh
Copy link
Member

這個 PR 用 unplugin-icons 讓我們能用 Vue 元件形式使用任何圖示,加上 unplugin-vue-components 不用寫 <script> 就能匯入使用。

我在 package.json 中安裝了 Phosphor 圖示包,他有 1,527 個圖示和 6 種字重,採用 MIT 授權。

使用方式

直接在想加入圖示的地方加入 <Icon<圖示包 ID><圖示名稱> /> 就可以了:

<IconPhMapPin style="display: inline" /> 年會地點

@rileychh rileychh self-assigned this Aug 29, 2024
@rileychh rileychh force-pushed the icons-and-auto-import branch from 7d202d4 to 9d34ce0 Compare August 31, 2024 05:11
Copy link
Contributor

@mirumodapon mirumodapon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (怎麼覺得這個 commit 是 feature 呀 XD)
提醒其他人,從網站找到 icon 之後要在最前面加上 Icon 喔!

@rileychh
Copy link
Member Author

雖然對開發者來說算一個大功能,但是輸出成品是一模一樣的,所以我就算它是 chore 了 :)

@rileychh rileychh merged commit f135a50 into main Aug 31, 2024
1 check passed
@rileychh rileychh deleted the icons-and-auto-import branch August 31, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants