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

icon不能動態加載? #44

Closed
mngogo opened this issue Nov 15, 2022 · 6 comments
Closed

icon不能動態加載? #44

mngogo opened this issue Nov 15, 2022 · 6 comments
Assignees
Labels
good issue Good for newcomers pr welcome

Comments

@mngogo
Copy link

mngogo commented Nov 15, 2022

icon 自動按需加載,能否優化,自動按需動態加載?
例如:<i-mdi:{var} /> ??

@markthree markthree self-assigned this Nov 15, 2022
@markthree markthree added good issue Good for newcomers pr welcome labels Nov 15, 2022
@markthree
Copy link
Member

@mngogo 靓仔你好,目前不支持该特性,欢迎 pricon 目前由该插件提供支持 👉 unplugin-icons,可以看看是否为你提供实现思路。

@mngogo
Copy link
Author

mngogo commented Nov 15, 2022

能力不足啊。看了插件,感覺不如徹底自己重寫還簡單點。他這個就沒邏輯可下手啊。直接使用模板替換的方式測了一晚,還是差點。 回頭有思路了,來PR吧。

@mngogo
Copy link
Author

mngogo commented Nov 17, 2022

折騰了2天。插件試試換個:vite-plugin-purge-icons, 你這模板就完美了

@mngogo
Copy link
Author

mngogo commented Nov 19, 2022

hi,經過驗證測試,vite-plugin-purge-icons確實可以實現動態按需加載, 嘗試PR了一天,沒成功。可能網絡卡,也和我本人初次使用不會有關。你後面遇到需要的時候,可以更新。當然不介意指導我PR的話,歡迎聯係老聃科技,vx: Monatech :)
另:參考 viteses <div i=“mdi:${var”}" />亦可支持。

markthree added a commit that referenced this issue May 19, 2023
@markthree
Copy link
Member

@mngogo 靓仔你好,该功能已支持,具体可见 👉 dishait/tov-template#8-%E5%

@mngogo
Copy link
Author

mngogo commented May 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good issue Good for newcomers pr welcome
Projects
None yet
Development

No branches or pull requests

2 participants