Commit a18de181 by chenwq

fix(SignDialog): 修复按钮加载状态和禁用状态的逻辑

添加loading状态变量并与btnLoading共同控制按钮状态
确保按钮在加载或禁用状态下正确显示
1 parent 9b7ec5a0
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<span>{{ dayjs(detailInfo.deliveryDate).format('YYYY-MM-DD HH:mm:ss') }}</span> <span>{{ dayjs(detailInfo.deliveryDate).format('YYYY-MM-DD HH:mm:ss') }}</span>
</div> </div>
</div> </div>
<div v-loading="btnLoading"> <div v-loading="loading || btnLoading">
<div class="table-wrap"> <div class="table-wrap">
<el-form ref="addForm" :model="detailInfo" size="small"> <el-form ref="addForm" :model="detailInfo" size="small">
<GLTable :tableData="detailInfo.deliveryDetailList" :noDataImg="url" :tableParams="tableParams" :hasPage="false"> <GLTable :tableData="detailInfo.deliveryDetailList" :noDataImg="url" :tableParams="tableParams" :hasPage="false">
...@@ -48,9 +48,9 @@ ...@@ -48,9 +48,9 @@
</div> </div>
<template slot="footer"> <template slot="footer">
<span class="dialog-footer"> <span class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="clear" v-loading="btnLoading">重写</el-button> <el-button plain size="small" class="btn-three" @click="clear" :disabled="loading || btnLoading">重写</el-button>
<el-button v-show="activeSignIdx == -1" plain size="small" class="btn-three" style="margin-left: 10px;" @click="undo" v-loading="btnLoading">撤销</el-button> <el-button v-show="activeSignIdx == -1" plain size="small" class="btn-three" style="margin-left: 10px;" @click="undo" :disabled="loading ||btnLoading">撤销</el-button>
<el-button type="primary" size="small" style="margin-left: 10px;" @click="save" v-loading="btnLoading">确定</el-button> <el-button type="primary" size="small" style="margin-left: 10px;" @click="save" v-loading="loading || btnLoading">确定</el-button>
</span> </span>
</template> </template>
</GLDialog> </GLDialog>
...@@ -94,6 +94,7 @@ export default { ...@@ -94,6 +94,7 @@ export default {
velocityFilterWeight: 0.7, velocityFilterWeight: 0.7,
backgroundColor: 'rgba(255, 255, 255, 0.0)' backgroundColor: 'rgba(255, 255, 255, 0.0)'
}, },
loading: false,
btnLoading: false, btnLoading: false,
activeSignIdx: -1, activeSignIdx: -1,
signList: [], signList: [],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!