fix(admin): prevent edit modal from closing immediately on tap
Fix the card types management edit modal that was closing immediately after opening due to event propagation. Added .stop modifier to all action button tap handlers (edit, toggle, delete) to prevent bubbling to parent modal-mask element. - Changed @tap="openEdit(ct)" to @tap.stop="openEdit(ct)" - Changed @tap="toggleActive(ct)" to @tap.stop="toggleActive(ct)" - Changed @tap="confirmDelete(ct)" to @tap.stop="confirmDelete(ct)" This fixes the bug where the edit modal would open and close in the same event cycle, making it impossible to edit card types. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -64,17 +64,17 @@
|
||||
|
||||
<!-- Actions -->
|
||||
<view class="ct-actions">
|
||||
<view class="ct-action-btn edit-btn" @tap="openEdit(ct)">
|
||||
<view class="ct-action-btn edit-btn" @tap.stop="openEdit(ct)">
|
||||
<text class="ct-action-text">编辑</text>
|
||||
</view>
|
||||
<view
|
||||
class="ct-action-btn toggle-btn"
|
||||
:class="ct.isActive ? 'toggle-off' : 'toggle-on'"
|
||||
@tap="toggleActive(ct)"
|
||||
@tap.stop="toggleActive(ct)"
|
||||
>
|
||||
<text class="ct-action-text">{{ ct.isActive ? '下架' : '上架' }}</text>
|
||||
</view>
|
||||
<view class="ct-action-btn delete-btn" @tap="confirmDelete(ct)">
|
||||
<view class="ct-action-btn delete-btn" @tap.stop="confirmDelete(ct)">
|
||||
<text class="ct-action-text">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user