Files
nl-blogs/blog-wot-uniapp/.cursor/rules/wot-ui.mdc
李琦 4e245f789b 1. 小程序端
2. 视频优化2
2026-07-30 14:14:28 +08:00

13 lines
815 B
Plaintext
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.
---
description: 小程序端优先使用 wot-ui 组件
alwaysApply: true
---
# Wot UI 使用规范blog-wot-uniapp
1. UI 优先使用 `@wot-ui/ui` 已有组件(`wd-*`),例如底部菜单用 `wd-action-sheet`,对话框用 `wd-dialog`,表单用 `wd-input` / `wd-button`。
2. 现有组件能力不足时:先二次封装(在 wot 外包一层交互与 art 样式,如 `ArtMenuItem`),再自研通用组件,放到主包 `components/` 或分包 `components/`。
3. 禁止为同一交互再造一套原生弹层/列表(例如自写底部菜单替代 `wd-action-sheet`)。
4. 抽屉类仍遵守工作区规则:小程序端用 `page-container`,防止用户意外退出页面。
5. C 端视觉用 art token / `themeVars` 覆盖 wot 主题色与深色背景,而不是放弃 wot 组件。