Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/assets/vue/components/ActionCell.vue

61 lines
1.1 KiB

<template>
<q-td slot="body-cell-action" auto-width>
<q-btn
v-if="handleShow"
dense
color="secondary"
@click="handleShow"
label="Show"
/>
<q-btn
v-if="handleEdit"
dense
color="secondary"
@click="handleEdit"
label="Edit"
/>
<q-btn
v-if="handleDelete"
label="Delete"
dense
color="red"
@click="confirmDeleteClick = true"
/>
<ConfirmDelete
v-if="handleDelete"
:show="confirmDeleteClick"
:handle-delete="handleDelete"
:handle-cancel="() => (confirmDeleteClick = false)"
/>
</q-td>
</template>
<script>
import ConfirmDelete from './ConfirmDelete.vue';
export default {
name: 'ActionCell',
components: {
ConfirmDelete
},
data() {
return {
confirmDeleteClick: false
};
},
props: {
handleShow: {
type: Function,
required: false
},
handleEdit: {
type: Function,
required: false
},
handleDelete: {
type: Function,
required: false
}
}
};
</script>