forked from TuguldurJ/primevue-quickstart-nuxt3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.vue
46 lines (43 loc) · 961 Bytes
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<template>
<div>
<MenuBar :model="items"></MenuBar>
<div class="container">
<div class="flex flex-column align-items-center mt-1">
<img alt="Vue logo" src="./assets/primevue-logo.png" />
<Toast />
<div class="mt-4">
<form @submit.prevent="greet">
<InputText type="text" v-model="text" />
<Button type="submit" label="Submit" />
</form>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref } from "vue";
import MenuBar from "primevue/menubar";
import { MenuItem } from "primevue/menuitem";
import { useToast } from "primevue/usetoast";
const items: MenuItem[] = [
{
label:'File',
icon:'pi pi-fw pi-file',
}
]
const text = ref();
const toast = useToast();
const greet = () => {
toast.add({ severity: "info", summary: "Hello " + text.value });
};
</script>
<style>
.container {
margin: 0 auto;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
</style>