diff --git a/src/routes/admin/categories/+page.svelte b/src/routes/admin/categories/+page.svelte index 3ee2183..36dfeeb 100644 --- a/src/routes/admin/categories/+page.svelte +++ b/src/routes/admin/categories/+page.svelte @@ -4,6 +4,9 @@ import { createSlugAutoHandler } from '$lib/utils/slugify'; import { confirmState } from '$lib/stores/confirm.svelte'; import TextInput from '$lib/components/admin/TextInput.svelte'; + import Button from '$lib/components/admin/Button.svelte'; + import DataTable from '$lib/components/admin/DataTable.svelte'; + import Alert from '$lib/components/admin/Alert.svelte'; let { data, form }: { data: PageData; form: ActionData } = $props(); @@ -36,9 +39,7 @@ {#if form?.error} -
暂无任何{$page.data.aliases?.category || '分类'}
-| ID | +{$page.data.aliases?.category || '分类'}名称 | +别名 | +关联文章数 | +操作 | +|||||
|---|---|---|---|---|---|---|---|---|---|
| ID | -{$page.data.aliases?.category || '分类'}名称 | -别名 | -关联文章数 | -操作 | +{category.id} | +
+ {#if editingId === category.id}
+ |
+
+ {#if editingId === category.id}
+ |
+ {category.post_count} 篇文章 | ++ {#if editingId === category.id} + + + {:else} + + + {/if} + |
| {category.id} | -
- {#if editingId === category.id}
- |
-
- {#if editingId === category.id}
- |
- {category.post_count} 篇文章 | -- {#if editingId === category.id} - - - {:else} - - - {/if} - | -