From 9ae723e62cd1b0d65ee88c777e2df7bb38c06315 Mon Sep 17 00:00:00 2001 From: TheCodeholic Date: Thu, 15 Aug 2024 10:57:18 +0400 Subject: [PATCH] Fix bug of using props before declaration in UserModal.vue --- backend/src/views/Users/UserModal.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/backend/src/views/Users/UserModal.vue b/backend/src/views/Users/UserModal.vue index af469d4..8f38db4 100644 --- a/backend/src/views/Users/UserModal.vue +++ b/backend/src/views/Users/UserModal.vue @@ -77,6 +77,14 @@ import CustomInput from "../../components/core/CustomInput.vue"; import store from "../../store/index.js"; import Spinner from "../../components/core/Spinner.vue"; +const props = defineProps({ + modelValue: Boolean, + user: { + required: true, + type: Object, + } +}) + const user = ref({ id: props.user.id, name: props.user.name, @@ -85,13 +93,6 @@ const user = ref({ const loading = ref(false) -const props = defineProps({ - modelValue: Boolean, - user: { - required: true, - type: Object, - } -}) const emit = defineEmits(['update:modelValue', 'close'])