fix: match project input heights and remove default script style

This commit is contained in:
GouJ
2026-09-14 16:16:20 +08:00
parent b7bc199e10
commit 665d2b169b
@@ -14,7 +14,7 @@ const emit = defineEmits<{ created: [projectId: string] }>()
const open = ref(false) const open = ref(false)
const busy = ref(false) const busy = ref(false)
const error = ref('') const error = ref('')
const form = reactive({ topic: '', style: '爽文反转', episodeCount: 3 }) const form = reactive({ topic: '', style: '', episodeCount: 3 })
/** 校验正整数集数和主题,禁止双击产生重复项目。 */ /** 校验正整数集数和主题,禁止双击产生重复项目。 */
async function submit() { async function submit() {
@@ -25,7 +25,7 @@ async function submit() {
const result = await projectsApi.create({ const result = await projectsApi.create({
...form, ...form,
topic: form.topic.trim(), topic: form.topic.trim(),
style: form.style.trim() || '爽文反转' style: form.style.trim()
}) })
open.value = false open.value = false
form.topic = '' form.topic = ''
@@ -74,9 +74,10 @@ const rules = { topic: requiredTextRule('故事主题'), episodeCount: integerRu
placeholder="如:都市悬疑、爽文反转" placeholder="如:都市悬疑、爽文反转"
:disabled="busy" :disabled="busy"
:input-props="{ id: 'style' }" :input-props="{ id: 'style' }"
class="min-h-32 resize-y"
v-model:value="form.style" v-model:value="form.style"
type="textarea" type="textarea"
:autosize="{ minRows: 10, maxRows: 10 }" :autosize="{ minRows: 3, maxRows: 12 }"
></NInput ></NInput
></NFormItem> ></NFormItem>
<NFormItem path="episodeCount" label="计划集数" :label-props="{ for: 'episode-count' }" <NFormItem path="episodeCount" label="计划集数" :label-props="{ for: 'episode-count' }"