修复 person-detail 按钮文字未居中
部署到群晖 / deploy (push) Successful in 40s

原因:微信 <button> 自带 min-height 88rpx 和固有 line-height,
会顶歪自定义高度。改用 <view> + flex 居中。

- 5 个 button 改为 view(保留 class/bindtap/data-id)
- action-btn / edit-btn / delete-btn 改 flex 居中
- add-btn 加 inline-flex 居中

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
yuming
2026-06-02 12:54:27 +08:00
parent fb036fd65f
commit 3f30c9c017
2 changed files with 15 additions and 8 deletions
+5 -5
View File
@@ -12,8 +12,8 @@
<text wx:if="{{person.remark}}" class="person-remark">{{person.remark}}</text>
<view class="actions">
<button class="action-btn" bindtap="onEditPerson">编辑</button>
<button class="action-btn danger" bindtap="onDeletePerson">删除</button>
<view class="action-btn" bindtap="onEditPerson">编辑</view>
<view class="action-btn danger" bindtap="onDeletePerson">删除</view>
</view>
</view>
@@ -21,7 +21,7 @@
<view class="section">
<view class="section-header">
<text class="section-title">纪念日列表 ({{anniversaries.length}})</text>
<button class="add-btn" bindtap="onAddAnniversary">+ 添加纪念日</button>
<view class="add-btn" bindtap="onAddAnniversary">+ 添加纪念日</view>
</view>
<view wx:if="{{anniversaries.length === 0}}" class="empty-state">
@@ -54,8 +54,8 @@
<view wx:if="{{item.remark}}" class="anniversary-remark">{{item.remark}}</view>
<view class="anniversary-actions">
<button class="edit-btn" bindtap="onEditAnniversary" data-id="{{item.id}}">编辑</button>
<button class="delete-btn" bindtap="onDeleteAnniversary" data-id="{{item.id}}">删除</button>
<view class="edit-btn" bindtap="onEditAnniversary" data-id="{{item.id}}">编辑</view>
<view class="delete-btn" bindtap="onDeleteAnniversary" data-id="{{item.id}}">删除</view>
</view>
</view>
</view>