refactor(components): 移除空状态并调整操作按钮条件

移除未使用格口的空状态显示,并调整操作按钮的显示条件。物品暂存按钮现在会根据是否有可用格口来禁用状态,而物品取出按钮不再受此限制
This commit is contained in:
dzq 2025-12-31 16:17:42 +08:00
parent fa46750951
commit 37b0a4522f
1 changed files with 5 additions and 9 deletions

View File

@ -306,12 +306,6 @@ onMounted(() => {
<wd-button size="small" type="primary" @click="refresh">重试</wd-button>
</view>
<!-- 空状态 -->
<view v-else-if="!hasAvailableCells" class="empty-state">
<wd-icon name="box" size="48px" color="#C0C4CC" />
<text class="empty-text">暂无可用格口</text>
</view>
<!-- 格口类型选择区域 -->
<view v-else class="cell-type-selection">
<view class="cell-type-grid">
@ -339,13 +333,15 @@ onMounted(() => {
</view>
<!-- 操作按钮区域 -->
<view v-if="props.showButtons && hasAvailableCells && !loading" class="action-buttons">
<view v-if="props.showButtons && !loading" class="action-buttons">
<wd-row :gutter="16">
<wd-col :span="12">
<wd-button type="primary" block @click="handleDeposit" :loading="depositLoading" :disabled="depositLoading || retrieveLoading">物品暂存</wd-button>
<wd-button type="primary" block @click="handleDeposit" :loading="depositLoading"
:disabled="depositLoading || !hasAvailableCells || retrieveLoading">物品暂存</wd-button>
</wd-col>
<wd-col :span="12">
<wd-button type="success" block @click="handleRetrieve" :loading="retrieveLoading" :disabled="depositLoading || retrieveLoading">物品取出</wd-button>
<wd-button type="success" block @click="handleRetrieve" :loading="retrieveLoading"
:disabled="depositLoading || retrieveLoading">物品取出</wd-button>
</wd-col>
</wd-row>
</view>