This commit is contained in:
Viet An
2026-05-21 09:45:01 +07:00
parent a52c33706a
commit 8f95fee8a7
18 changed files with 70 additions and 45 deletions

View File

@@ -1,5 +1,6 @@
<script setup>
const { $empty, $insertapi } = useNuxtApp();
const emit = defineEmits(["modalevent"]);
const isLoading = ref(false);
const body = ref({
@@ -10,7 +11,8 @@ const body = ref({
async function submit() {
isLoading.value = true;
await $insertapi("CPU", body.value);
const newRow = await $insertapi("CPU", body.value);
emit("modalevent", { name: "dataevent", data: newRow });
isLoading.value = false;
}
</script>