eliminar lista
This commit is contained in:
@@ -24,7 +24,11 @@
|
||||
>
|
||||
<p class="bg-cyan-7 q-pa-md text-weight-bold text-h6">
|
||||
{{ lista.nombre
|
||||
}}<q-icon class="float-right cursor-pointer" name="delete" />
|
||||
}}<q-icon
|
||||
class="float-right cursor-pointer q-mt-xs"
|
||||
name="delete"
|
||||
@click="eliminarLista(lista)"
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,6 +89,19 @@ const crearLista = () => {
|
||||
console.log(e);
|
||||
});
|
||||
};
|
||||
|
||||
const eliminarLista = (l) => {
|
||||
console.log(l.id);
|
||||
$q.dialog({
|
||||
title: l.nombre,
|
||||
message: "Está seguro de querer eliminar " + l.nombre + "?",
|
||||
cancel: true,
|
||||
persistent: true,
|
||||
}).onOk(async () => {
|
||||
await listaStore.pb.collection("lista").delete(l.id);
|
||||
listListas();
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
listListas();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user