updated format code

This commit is contained in:
Warunee Tamkoo 2024-09-03 11:28:01 +07:00
parent b75d69ea08
commit b14bad2249
241 changed files with 14012 additions and 13811 deletions

View file

@ -1,5 +1,4 @@
<script setup lang="ts">
/** รับค่ามาจากหน้าหลัก */
const props = defineProps({
editvisible: Boolean,
@ -32,41 +31,40 @@ const emit = defineEmits([
* งช update
* @param value true/false
*/
function updateEdit(value: Boolean){
function updateEdit(value: Boolean) {
emit("update:editvisible", value);
};
}
/** update edit */
async function edit(){
async function edit() {
updateEdit(!props.editvisible);
props.edit();
};
}
/** save */
function checkSave(){
function checkSave() {
props.validate();
props.save();
};
}
</script>
<template>
<q-card-actions class="text-primary">
<q-space />
<q-btn
v-if="!editvisible"
<q-btn
v-if="!editvisible"
outline
:disabled="editvisible"
:disabled="editvisible"
:color="editvisible ? 'grey-7' : 'primary'"
@click="edit"
>
@click="edit"
>
</q-btn>
<div v-else>
<q-btn
<q-btn
unelevated
label="บันทึก"
:disabled="!editvisible"
:color="!editvisible ? 'grey-7' : 'public'"
:disabled="!editvisible"
:color="!editvisible ? 'grey-7' : 'public'"
@click="checkSave"
>
</q-btn>