|
|
@@ -119,7 +119,7 @@ git commit -m "feat: add CapsuleSafeArea component for weapp capsule button safe
|
|
|
- Consumes: `CapsuleSafeArea.vue`(默认 slot wrapper)
|
|
|
- Produces: 右侧 `<slot name="right" />` 自动被 `CapsuleSafeArea` 包裹,页面无需感知胶囊安全区
|
|
|
|
|
|
-- [ ] **Step 1: 修改模板结构**
|
|
|
+- [x] **Step 1: 修改模板结构**
|
|
|
|
|
|
将 `src/components/common/TopBar.vue` 的 `<template>` 部分替换为:
|
|
|
|
|
|
@@ -153,7 +153,7 @@ git commit -m "feat: add CapsuleSafeArea component for weapp capsule button safe
|
|
|
1. 左侧内容区从 `flex items-center flex-1` 改为 `flex items-center flex-1 min-w-0`,确保 `truncate` 生效。
|
|
|
2. 右侧 `<slot name="right" />` 外层包裹 `<CapsuleSafeArea>`,内部保留 `<view class="flex items-center">` 保持 flex 布局。
|
|
|
|
|
|
-- [ ] **Step 2: 添加组件导入**
|
|
|
+- [x] **Step 2: 添加组件导入**
|
|
|
|
|
|
在 `<script setup>` 顶部添加导入:
|
|
|
|
|
|
@@ -197,7 +197,7 @@ function goBack() {
|
|
|
</script>
|
|
|
```
|
|
|
|
|
|
-- [ ] **Step 3: Commit**
|
|
|
+- [x] **Step 3: Commit**
|
|
|
|
|
|
```bash
|
|
|
git add src/components/common/TopBar.vue
|