feat: Migrate to Nuxt 3 framework (#5184)

Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
This commit is contained in:
Hoa (Kyle) Trinh
2025-06-20 00:09:12 +07:00
committed by GitHub
parent 89ab7fac25
commit c24d532608
403 changed files with 23959 additions and 19557 deletions

View File

@@ -1,5 +1,8 @@
<template>
<div class="d-flex align-center" style="max-width: 60px">
<div
class="d-flex align-center"
style="max-width: 60px"
>
<v-text-field
v-model.number="quantity"
hide-details
@@ -8,17 +11,14 @@
:max="max"
type="number"
class="rounded-xl"
small
text
>
</v-text-field>
size="small"
variant="plain"
/>
</div>
</template>
<script lang="ts">
import { computed, defineComponent } from "@nuxtjs/composition-api";
export default defineComponent({
export default defineNuxtComponent({
name: "VInputNumber",
props: {
min: {
@@ -37,18 +37,19 @@ export default defineComponent({
type: Number,
default: 1,
},
value: {
modelValue: {
type: Number,
default: 0,
},
},
emits: ["update:modelValue"],
setup(props, context) {
const quantity = computed({
get: () => {
return Number(props.value);
return Number(props.modelValue);
},
set: (val) => {
context.emit("input", val);
context.emit("update:modelValue", val);
},
});