perf: 文件增加取消选择按钮

This commit is contained in:
Mr.Huan 2022-01-27 14:33:08 +08:00
parent 305af935a7
commit 34772ef2bf

View File

@ -56,6 +56,7 @@
@click="deleteSelectFile">{{$L('删除')}}
</Button>
</template>
<Button v-if="selectFile.length > 0" type="primary" size="small" @click="clearSelect">{{$L('取消选择')}}</Button>
<div v-if="loadIng > 0" class="nav-load"><Loading/></div>
<div class="flex-full"></div>
<div :class="['switch-button', tableMode ? 'table' : '']" @click="tableMode=!tableMode">
@ -66,6 +67,7 @@
<div v-if="tableMode" class="file-table" @contextmenu.prevent="handleRightClick">
<Table
ref="fileListTable"
:columns="columns"
:data="fileList"
:height="tableHeight"
@ -1383,6 +1385,14 @@ export default {
$A.modalError(msg);
});
},
clearSelect() {
this.shearFiles = [];
this.selectFile = [];
this.fileChecked = [];
if ( this.tableMode ) //
this.$refs.fileListTable.selectAll(false);
},
}
}
</script>