Files
fitness-coach/miniprogram/components/fc-icon/index.js
wm b94eb706ff feat: Kinetic Dark 设计语言 + Lucide 图标迁移 + 首页轻量个性化
- 建立 Lucide 子集 iconfont(49 字形),全站 emoji 替换为 fc-icon 组件
- 重塑 Design Token(冷中性近黑底 + Volt 荧光绿 #B6F24E),消除硬编码颜色
- 首页登录后个性化:我的计划 / 我的收藏 / 今日推荐(纯前端复用现有 API)
- 后端 DEFAULT_EMOJI→Lucide 名,PALETTE 对齐 Kinetic Dark 语义色板
- 修复 person-standing 缺失字形;14 个官方组合 seed emoji 全部映射到现有字形
2026-07-22 21:38:56 +08:00

24 lines
598 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const iconMap = require('../../utils/icon-map');
Component({
properties: {
// Lucide 图标名,如 search / dumbbell / heart
name: { type: String, value: '' },
// 字号rpx
size: { type: Number, value: 20 },
// 颜色默认跟随当前文字色currentColor 在 iconfont 下用具体色)
color: { type: String, value: '' },
},
data: { glyph: '' },
observers: {
name(n) {
this.setData({ glyph: (iconMap[n] || '') });
},
},
lifetimes: {
attached() {
this.setData({ glyph: (iconMap[this.data.name] || '') });
},
},
});