mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 22:25:30 +08:00
28 lines
569 B
JavaScript
28 lines
569 B
JavaScript
export default {
|
|
data() {
|
|
return {
|
|
confirmingDelete: false
|
|
};
|
|
},
|
|
methods: {
|
|
showDeleteModal(event) {
|
|
event.stopPropagation();
|
|
this.confirmingDelete = true;
|
|
},
|
|
closeDeleteModal() {
|
|
this.confirmingDelete = false;
|
|
},
|
|
deleteElement() {
|
|
$.ajax({
|
|
url: this.element.attributes.orderable.urls.delete_url,
|
|
type: 'DELETE',
|
|
success: (result) => {
|
|
this.$emit(
|
|
'component:delete',
|
|
this.element.attributes.position
|
|
);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
};
|