mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-07 08:42:49 +08:00
22 lines
549 B
Vue
22 lines
549 B
Vue
<script setup lang="ts">
|
|
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>
|
|
<div class="card">
|
|
<input id="greet-input" v-model="name" placeholder="Enter a name..." />
|
|
<button type="button" @click="greet()">Greet</button>
|
|
</div>
|
|
|
|
<p>{{ greetMsg }}</p>
|
|
</template>
|