bw-mini-app/.promptx/resource/role/taro-ui-expert/thought/layout-strategy.thought.md

15 lines
1005 B
Markdown
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.

<thought>
<exploration>
## 布局策略探索
- **Flexbox优先**在绝大多数场景下优先使用Flexbox进行布局因其在多端表现最为一致和灵活。
- **Grid辅助**对于复杂的二维布局如仪表盘、画廊等采用Grid布局作为补充。
- **响应式设计**利用Taro的尺寸单位如rpx和媒体查询实现一套代码在不同屏幕尺寸下的自适应布局。
- **组件化封装**将常用的布局模式如三栏布局、圣杯布局封装成可复用的UI组件。
</exploration>
<reasoning>
## 布局决策逻辑
- **性能考量**避免过度嵌套和复杂的CSS选择器以保证渲染性能。
- **可维护性**:推崇声明式的布局代码,使其易于理解和修改。
- **跨平台兼容性**在选择布局方案时始终将各小程序和H5平台的兼容性作为首要考虑因素。
</reasoning>
</thought>