mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-08-06 02:47:29 +08:00
feat: 添加图标映射功能
- 新增 iconMap.js 文件,集中管理应用中的图标资源。 - 提供 getIconUrl 函数以便根据名称获取对应图标的 URL,提升代码可维护性。
This commit is contained in:
29
buyer/src/assets/iconfont/iconMap.js
Normal file
29
buyer/src/assets/iconfont/iconMap.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import back from "./back.png";
|
||||||
|
import carts from "./carts.png";
|
||||||
|
import collage from "./collage.png";
|
||||||
|
import feedback from "./feedback.png";
|
||||||
|
import notice from "./notice.png";
|
||||||
|
import notification from "./notification.png";
|
||||||
|
import shop from "./shop.png";
|
||||||
|
import story from "./story.png";
|
||||||
|
import support from "./support.png";
|
||||||
|
import user from "./user.png";
|
||||||
|
|
||||||
|
const iconMap = {
|
||||||
|
back,
|
||||||
|
carts,
|
||||||
|
collage,
|
||||||
|
feedback,
|
||||||
|
notice,
|
||||||
|
notification,
|
||||||
|
shop,
|
||||||
|
story,
|
||||||
|
support,
|
||||||
|
user,
|
||||||
|
};
|
||||||
|
|
||||||
|
export function getIconUrl(name) {
|
||||||
|
return iconMap[name] || "";
|
||||||
|
}
|
||||||
|
|
||||||
|
export default iconMap;
|
||||||
Reference in New Issue
Block a user