处理.File List 列表重新打开的时候没有清空历史记录的问题

This commit is contained in:
renpy 2023-08-28 20:36:36 +08:00
parent 5c6dff9888
commit 74557d5fdb

View File

@ -42,7 +42,7 @@
</template> </template>
<!-- 底部按钮结束 --> <!-- 底部按钮结束 -->
</custom-modal> </custom-modal>
<custom-modal v-model="visible_file" :width="1200" title="File List"> <a-modal v-model="visible_file" :width="1200" title="File List" @cancel="cancelFileModale">
<div style="position: relative;padding-bottom: 40px;height: 460px;overflow: hidden;"> <div style="position: relative;padding-bottom: 40px;height: 460px;overflow: hidden;">
<a-table <a-table
:data-source="list_file" :data-source="list_file"
@ -66,7 +66,13 @@
@showSizeChange="handleSizeChange" @showSizeChange="handleSizeChange"
/> />
</div> </div>
</custom-modal> <template slot="footer">
<a-space class="operators" :size="20">
<a-button type="success">Save</a-button>
<a-button type="warn" @click="cancelFileModale">Cancel</a-button>
</a-space>
</template>
</a-modal>
</div> </div>
</template> </template>
@ -219,6 +225,10 @@ export default {
console.log('selectedRowKeys changed: ', selectedRowKeys); console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
}, },
cancelFileModale() {
this.visible_file = false
this.list_file=[]
},
beforeUpload(file,fileList) { beforeUpload(file,fileList) {
this.fileList = fileList this.fileList = fileList
}, },
@ -352,4 +362,11 @@ export default {
height: 32px; height: 32px;
margin-right: 10px; margin-right: 10px;
} }
.operators {
width: 100%;
justify-content: center;
.ant-btn {
width: 92px;
}
}
</style> </style>