Skip to content

Commit

Permalink
Merge pull request #227 from jamebal/dev
Browse files Browse the repository at this point in the history
perf: 优化删除文章和移动端删除文件
  • Loading branch information
jamebal authored Jul 10, 2024
2 parents 955296e + 8158187 commit 8853bc3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/ShowFile/ShowFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: '编辑',
Expand Down
3 changes: 2 additions & 1 deletion src/views/home/mobile/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
9 changes: 2 additions & 7 deletions src/views/setting/articles/articleManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
})
})
},
Expand Down

0 comments on commit 8853bc3

Please sign in to comment.