Merge pull request 'feat: 框选移除文件夹' (#49) from jie into test

Reviewed-on: #49
pull/51/head
lizijie 1 year ago
commit 86b5147295

@ -261,22 +261,19 @@ function closeModal(event: MouseEvent) {
} }
async function remove() { async function remove() {
const arr = listData.value.filter((item) => { if ( !selectIds.value|| selectIds.value.length === 0) {
return item.checked
})
if (arr.length === 0) {
message.error('至少选中一个') message.error('至少选中一个')
return return
} }
const ids = arr.map(item => item.id).join(',') const ids = selectIds.value.join(',')
const res = await removeFiles({ pictureid: ids }) const res = await removeFiles({ pictureid: ids })
if (res.code === 'OK') { if (res.code === 'OK') {
message.success('移除成功') message.success('移除成功')
pagination.pageNo = 1 pagination.pageNo = 1
const list = await featchList() const list = await featchList()
listData.value = list listData.value = list
layout()
} }
} }

Loading…
Cancel
Save