feat: Initialized tauri dashboard
This commit is contained in:
21
toos-dashboard/src/components/Greet.vue
Normal file
21
toos-dashboard/src/components/Greet.vue
Normal file
@@ -0,0 +1,21 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { invoke } from "@tauri-apps/api/tauri";
|
||||
|
||||
const greetMsg = ref("");
|
||||
const name = ref("");
|
||||
|
||||
async function greet() {
|
||||
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
|
||||
greetMsg.value = await invoke("greet", { name: name.value });
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<form class="row" @submit.prevent="greet">
|
||||
<input id="greet-input" v-model="name" placeholder="Enter a name..." />
|
||||
<button type="submit">Greet</button>
|
||||
</form>
|
||||
|
||||
<p>{{ greetMsg }}</p>
|
||||
</template>
|
Reference in New Issue
Block a user