修改上传按钮禁用逻辑
This commit is contained in:
@@ -9,11 +9,17 @@
|
||||
@click="handleUpload"
|
||||
:loading="loading"
|
||||
size="small"
|
||||
:disabled="disableHandleUpload"
|
||||
:disabled="offLineFileList.length == 0 || disableHandleUpload"
|
||||
>
|
||||
开始上传
|
||||
</el-button>
|
||||
<el-button type="primary" @click="removeAllFile" size="small" :loading="loading" :disabled="offLineFileList.length == 0">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="removeAllFile"
|
||||
size="small"
|
||||
:loading="loading"
|
||||
:disabled="offLineFileList.length == 0"
|
||||
>
|
||||
清空文件
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -101,13 +107,12 @@ const submitUpload = e => {
|
||||
offLineFileList.value.map((item: any) => {
|
||||
item.status = 0
|
||||
})
|
||||
disableHandleUpload.value = false
|
||||
}
|
||||
disableHandleUpload.value = false
|
||||
}
|
||||
//清空文件
|
||||
const removeAllFile = () => {
|
||||
offLineFileList.value = []
|
||||
disableHandleUpload.value = true
|
||||
}
|
||||
//移除文件
|
||||
const removeFile = async (file: any) => {
|
||||
@@ -138,6 +143,7 @@ const handleUpload = () => {
|
||||
})
|
||||
// 操作数据后更新视图
|
||||
updateKey.value += 1
|
||||
disableHandleUpload.value = true
|
||||
// return;
|
||||
uploadOffLineDataFile(subForm).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
|
||||
Reference in New Issue
Block a user