feat: 引入vue-jsx

This commit is contained in:
lanyeeee
2025-08-03 05:56:12 +08:00
parent b63be91f39
commit 199df5cb81
6 changed files with 444 additions and 2 deletions
+11 -1
View File
@@ -1,4 +1,4 @@
<script setup lang="ts">
<script setup lang="tsx">
import { ref } from 'vue'
import { commands } from './bindings.ts'
@@ -18,6 +18,15 @@ async function test() {
console.log(result2)
}
}
function TestComponent() {
return (
<div>
<h2>Test Component</h2>
<p>This is a test component.</p>
</div>
)
}
</script>
<template>
@@ -43,6 +52,7 @@ async function test() {
</form>
<p class="text-red">{{ greetMsg }}</p>
<n-button @click="test">测试</n-button>
<TestComponent />
</main>
</template>