[BUGFix]
All checks were successful
Node.js CI / build-and-test (push) Successful in 35s

修复书签删除问题

[Feature]
使用表单保证 HTML 语义化
更新关于页面
This commit is contained in:
2025-05-14 17:48:11 +08:00
parent a59ebeb487
commit 89538823fc
5 changed files with 33 additions and 14 deletions

20
src/ui/Form.vue Normal file
View File

@ -0,0 +1,20 @@
<template>
<form @submit="handleSubmit">
<slot></slot>
</form>
</template>
<script setup>
import { ref } from 'vue'
const emit = defineEmits(['submit'])
function handleSubmit(event) {
event.preventDefault()
const form = event.target
const formData = new FormData(form)
const data = Object.fromEntries(formData.entries())
emit('submit', data, event)
}
</script>