用途:把 uView 2.0 设计规范变成可执行的 Stitch 提示词。仅在用户明确提到 Stitch 时使用;若用户说 uView Pro 或 uviewpro,应改用 stitch-ui-design-spec-uviewpro。触发关键词包括 uview、uview2、uview2.0、u-view,以及中文的 uview 风格、美化、优化。
主要能力:两种模式。前缀模式输出一段可直接粘贴的 [Hard constraints prefix],包含框架(uView 2.0 / uni-app / Vue 2)、设计令牌(主色 #3c9cff、成功 #5ac725、警告 #f9ae3d、错误 #f56c6c、信息 #909399;背景 #f3f4f6;边框 #dadbde;间距 4/8/12/16/20/24/32/40 px;圆角 8/12/999 px)、组件契约(布局用 <u-row> 与 <u-col span="...">;表单用 <u--form> 与 <u--input border="surround">;按钮用 <u-button type="primary">;导航栏用 <u-navbar title="..." :autoBack="true">;列表用 <u-swipe-action>、<u-index-list>、<u-waterfall>;反馈用 this.$refs.uToast.show({...}) 与 <u-code>)以及布局不变量(默认不用渐变、阴影最小化、过渡 200ms ease-out)。选择器模式先输出 CONTRACT_SELECTION_JSON_V1(designSystem 为 uview2,contracts.include 与 states.include 为空数组),再输出组装后的 Stitch 提示词,含 [Context]、[Layout]、[Components] 三段。
使用方式:用户要求美化、优化或精修现有界面,或要求 selector / JSON / contracts.include / states.include 时用选择器模式;否则用前缀模式。
限制:资料未提供安装命令、收费与平台信息;输出格式严格,选择器模式只返回两个代码块且不加额外说明。执行前需确认目标、输入、约束与验收标准,写入、发布等不可逆动作需明确授权。