inputgreen
This commit is contained in:
parent
90c263aa45
commit
301e4f9dab
2 changed files with 25 additions and 4 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue