fix(placement): condition edit

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-03-27 16:07:14 +07:00
parent 24c307e076
commit b1ae19afa7
2 changed files with 5 additions and 4 deletions

View file

@ -53,6 +53,7 @@ const saveData = async () => {
changeBtn();
onEdit.value = false;
edit.value = false;
emit("update:statusEdit", false);
})
.catch((e: any) => {
messageError($q, e);

View file

@ -1,7 +1,7 @@
<!-- วนหวของ อมลสวนต และ อย -->
<script setup lang="ts">
import { checkPermission } from "@/utils/permissions";
import { ref } from "vue";
import { computed } from "vue";
import { useRoute } from "vue-router";
const route = useRoute();
@ -62,9 +62,9 @@ const props = defineProps({
});
const emit = defineEmits(["update:edit"]);
const isEdit = ref<boolean>(
checkPermission(route)?.attrIsUpdate ? true : false
);
const isEdit = computed(() => {
return checkPermission(route)?.attrIsUpdate ? true : false;
});
const updateEdit = (value: any) => {
emit("update:edit", value);