fix(placement): condition edit
This commit is contained in:
parent
24c307e076
commit
b1ae19afa7
2 changed files with 5 additions and 4 deletions
|
|
@ -53,6 +53,7 @@ const saveData = async () => {
|
|||
changeBtn();
|
||||
onEdit.value = false;
|
||||
edit.value = false;
|
||||
emit("update:statusEdit", false);
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue