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