Merge pull request #227 from jamebal/dev

perf: 优化删除文章和移动端删除文件
This commit is contained in:
jmal 2024-07-10 10:13:56 +08:00 committed by GitHub
commit 8853bc3c12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 9 deletions

View File

@ -3240,7 +3240,7 @@ export default {
// 根据权限设置菜单
this.setMenusByPermission(row)
} else {
if (row.suffix && row.suffix === 'md') {
if (row.suffix && row.suffix === 'md' && this.queryFileType !== 'trash') {
this.menus.splice(2, 0, {
iconClass: 'menu-edit1',
label: '编辑',

View File

@ -670,7 +670,8 @@ export default {
api.delete({
currentDirectory: this.rowContextData.path,
username: this.$store.state.user.name,
fileIds: fileIds
fileIds: fileIds,
sweep: true
}).then(() => {
// 刷新列表
this.getFileList()

View File

@ -300,16 +300,11 @@ export default {
api.delete({
currentDirectory: '',
username: this.$store.state.user.name,
fileIds: fileIds
fileIds: fileIds,
sweep: true
}).then(() => {
// 移除列表
this.getArticleList()
}).then(() => {
this.$notify({
title: '删除成功',
type: 'success',
duration: 1000
})
})
})
},