feat(frontend): add none options for category and tag

This commit is contained in:
Tim
2025-07-09 20:28:16 +08:00
parent 72186b8779
commit f0c5780f7a
2 changed files with 13 additions and 5 deletions
@@ -18,7 +18,8 @@ export default {
const fetchCategories = async () => {
const res = await fetch(`${API_BASE_URL}/api/categories`)
if (!res.ok) return []
return await res.json()
const data = await res.json()
return [{ id: '', name: '无分类' }, ...data]
}
const selected = computed({