This commit is contained in:
2024-06-19 12:16:09 +08:00
parent eff22cf95e
commit c8b30b50dc

View File

@@ -16,13 +16,13 @@ const [ready, toggleReady] = useToggle()
const announcement = reactive<AnnouncementEdit>({
id: 0,
title: "",
tag: "",
tag: "公告",
content: "",
visible: false,
})
const tags: SelectOption[] = [
{ label: "空白", value: "" },
{ label: "公告", value: "公告" },
{ label: "更新", value: "更新" },
]
@@ -76,7 +76,11 @@ onMounted(init)
<n-input class="contestTitle" v-model:value="announcement.title" />
</n-form-item>
<n-form-item label="标签">
<n-select class="select" v-model:value="announcement.tag" :options="tags" />
<n-select
class="select"
v-model:value="announcement.tag"
:options="tags"
/>
</n-form-item>
<n-form-item label="可见">
<n-switch v-model:value="announcement.visible" />