mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-22 12:55:14 +08:00
Merge pull request #892 from BookStackApp/fix/884
Fixes issue with having to click the delete icon for attachment twice.
This commit is contained in:
commit
448068e318
|
@ -52,7 +52,9 @@ let methods = {
|
|||
},
|
||||
|
||||
deleteFile(file) {
|
||||
if (!file.deleting) return file.deleting = true;
|
||||
if (!file.deleting) {
|
||||
return this.$set(file, 'deleting', true);
|
||||
}
|
||||
|
||||
this.$http.delete(window.baseUrl(`/attachments/${file.id}`)).then(resp => {
|
||||
this.$events.emit('success', resp.data.message);
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
<span class="text-primary small" @click="file.deleting = false;">{{ trans('common.cancel') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div @click="startEdit(file)" class="drag-card-action text-center text-primary" style="padding: 0;">@icon('edit')</div>
|
||||
<div @click="deleteFile(file)" class="drag-card-action text-center text-neg" style="padding: 0;">@icon('close')</div>
|
||||
<div @click="startEdit(file)" class="drag-card-action text-center text-primary">@icon('edit')</div>
|
||||
<div @click="deleteFile(file)" class="drag-card-action text-center text-neg">@icon('close')</div>
|
||||
</div>
|
||||
</draggable>
|
||||
<p class="small muted" v-if="files.length === 0">
|
||||
|
|
Loading…
Reference in New Issue
Block a user