upgrade vue 3.2 to 3.4

This commit is contained in:
Warunee Tamkoo 2024-01-24 16:51:53 +07:00
parent 1f8c166175
commit 9d28a3f03f
5 changed files with 51 additions and 1 deletions

2
.gitignore vendored
View file

@ -26,3 +26,5 @@ coverage
*.njsproj
*.sln
*.sw?
package-lock.json

View file

@ -30,7 +30,7 @@
"pinia": "^2.0.29",
"quasar": "^2.11.1",
"structure-chart": "^0.0.9",
"vue": "^3.2.45",
"vue": "^3.4.15",
"vue-router": "^4.1.6",
"vue3-datepicker": "^0.3.4",
"vue3-pdfjs": "^0.1.6"

View file

@ -0,0 +1,15 @@
<!-- Child.vue -->
<script setup lang="ts">
const model = defineModel({ type: Number, required: true });
const total = defineModel("total", { type: Number, required: true });
function update() {
model.value++;
}
</script>
<template>
<div>Child model is: {{ model }}</div>
{{ total }}
<q-btn @click="update">Add +</q-btn>
</template>

View file

@ -0,0 +1,23 @@
<script setup lang="ts">
import Child from "@/components/TestUpgrade.vue";
import { ref } from "vue";
const count = ref<number>(0);
const total = ref<number>(0);
</script>
<template>
<q-card class="q-pa-md">
<!-- Parent.vue -->
<div class="q-mb-md">
<div>Parent count is: {{ count }}</div>
<q-btn @click="count = 0">Reset count</q-btn>
</div>
<q-separator />
<div class="q-mb-md">
<Child v-model="count" v-model:total="total" />
</div>
</q-card>
</template>

View file

@ -2,6 +2,7 @@ import { createRouter, createWebHistory } from "vue-router";
const MainLayout = () => import("@/views/MainLayout.vue");
const Dashboard = () => import("@/modules/01_dashboard/views/Dashboard.vue");
const TestPage = () => import("@/modules/01_dashboard/views/test.vue");
import ModuleTransfer from "@/modules/02_transfer/router";
import ModuleRetire from "@/modules/03_retire/router";
@ -29,6 +30,15 @@ const router = createRouter({
Key: [7],
},
},
{
path: "/test",
name: "test",
component: TestPage,
meta: {
Auth: true,
Key: [7],
},
},
...ModuleTransfer,
...ModuleRetire,
...ModuleCheckin,