feat: 接入小程序品牌组件基础层
This commit is contained in:
1 parent
8fd399f4c2
commit
1a9dc426f6
27 files changed
+158
-9
No files matched your search
@@ -0,0 +1,17 @@
|
||||
# 小程序 UI 基础层
|
||||
|
||||
小程序使用 `tdesign-miniprogram` 提供成熟的交互控件,再由 `apps/miniapp/components/ui/` 提供品牌层封装。行业模板只负责内容和字段配置,不直接依赖 TDesign 组件名。
|
||||
|
||||
## 首次预览
|
||||
|
||||
在微信开发者工具中打开 `apps/miniapp` 后执行「工具 → 构建 npm」。构建完成后,工具会生成被 `.gitignore` 忽略的 `miniprogram_npm/` 目录,页面即可解析 `tdesign-miniprogram/*` 组件路径。
|
||||
|
||||
依赖升级后需要重新执行一次「构建 npm」。CI 或发布流程也必须先完成该步骤,再上传小程序代码。
|
||||
|
||||
## 组件边界
|
||||
|
||||
- `BrandButton`、`BrandField`、`BrandEmpty`、`BrandLoading`:稳定的品牌交互契约,页面只依赖这些封装。
|
||||
- `tdesign-miniprogram`:输入、按钮、弹层、加载等基础行为和无障碍细节。
|
||||
- 页面和行业模板:只消费统一字段与状态,不出现 `templateKey === "food"` 一类分支。
|
||||
|
||||
品牌颜色、圆角和间距统一维护在 `apps/miniapp/styles/tokens.wxss`。
|
||||
Reference in new issue
Block a user