upgrade vue 3.2 to 3.4
This commit is contained in:
parent
1f8c166175
commit
9d28a3f03f
5 changed files with 51 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -26,3 +26,5 @@ coverage
|
|||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
package-lock.json
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
15
src/components/TestUpgrade.vue
Normal file
15
src/components/TestUpgrade.vue
Normal 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>
|
||||
23
src/modules/01_dashboard/views/test.vue
Normal file
23
src/modules/01_dashboard/views/test.vue
Normal 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>
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue