inputgreen

This commit is contained in:
setthawutttty 2023-12-08 18:00:25 +07:00
parent 90c263aa45
commit 301e4f9dab
2 changed files with 25 additions and 4 deletions

View file

@ -5,7 +5,7 @@ import { useDisciplineChannelDataStore } from "@/modules/11_discipline/store/Cha
const dataStore = useDisciplineChannelDataStore();
const channel = ref<string>(dataStore.type);
const channelRef = ref<any>();
const isReadonly = ref<boolean>(false); //
/**
* props มาจาก page หล
*/
@ -26,7 +26,6 @@ const props = defineProps({
* เกบขอมลลง formData
*/
/** ฟังชั่นตรวจสอบความถูกต้องก่อน บันทึก */
function save() {
channelRef.value.validate().then(async (result: boolean) => {
@ -38,6 +37,13 @@ function save() {
}
});
}
function inputEdit(val: boolean) {
return {
"full-width cursor-pointer ": val,
"full-width cursor-pointer inputgreen": !val,
};
}
</script>
<template>
<q-form ref="channelRef">
@ -48,7 +54,7 @@ function save() {
<q-separator />
<div class="col-12 row q-pa-sm q-col-gutter-sm">
<q-input
class="col-12"
:class="inputEdit(isReadonly)"
dense
outlined
v-model="channel"