feat(short-drama-agent-front): 完善镜头定位与项目配置
This commit is contained in:
1 parent
470b52e26d
commit
5b134207b8
66 files changed
+2042
-984
No files matched your search
@@ -31,11 +31,23 @@ watch(
|
||||
{ immediate: true }
|
||||
)
|
||||
async function save() {
|
||||
if (!props.project || state.pending || !dirty.value || !form.title.trim() || !form.topic.trim() || !form.style.trim()) return
|
||||
if (
|
||||
!props.project ||
|
||||
state.pending ||
|
||||
!dirty.value ||
|
||||
!form.title.trim() ||
|
||||
!form.topic.trim() ||
|
||||
!form.style.trim()
|
||||
)
|
||||
return
|
||||
state.pending = true
|
||||
state.error = ''
|
||||
try {
|
||||
await projectsApi.update(props.project.id, { title: form.title.trim(), topic: form.topic.trim(), style: form.style.trim() })
|
||||
await projectsApi.update(props.project.id, {
|
||||
title: form.title.trim(),
|
||||
topic: form.topic.trim(),
|
||||
style: form.style.trim()
|
||||
})
|
||||
emit('changed')
|
||||
open.value = false
|
||||
} catch (cause) {
|
||||
@@ -46,16 +58,32 @@ async function save() {
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<AppDialog v-model:open="open" :title="`编辑项目 · ${project?.title || project?.topic || ''}`" description="仅更新项目基础信息,不自动重生成剧本或 Production 资产。">
|
||||
<AppDialog
|
||||
v-model:open="open"
|
||||
:title="`编辑项目 · ${project?.title || project?.topic || ''}`"
|
||||
description="仅更新项目基础信息,不自动重生成剧本或 Production 资产。"
|
||||
>
|
||||
<NAlert v-if="state.error" type="error" :show-icon="false" class="mt-4">{{ state.error }}</NAlert>
|
||||
<section class="dialog-form-stack">
|
||||
<label class="block text-xs">项目名称<NInput v-model:value="form.title" class="mt-2" /></label>
|
||||
<label class="block text-xs">故事主题<NInput v-model:value="form.topic" type="textarea" :autosize="{ minRows: 3, maxRows: 8 }" class="mt-2" /></label>
|
||||
<label class="block text-xs"
|
||||
>故事主题<NInput
|
||||
v-model:value="form.topic"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 3, maxRows: 8 }"
|
||||
class="mt-2"
|
||||
/></label>
|
||||
<label class="block text-xs">风格<NInput v-model:value="form.style" class="mt-2" /></label>
|
||||
</section>
|
||||
<template #footer>
|
||||
<NButton @click="open = false">取消</NButton>
|
||||
<NButton type="primary" :loading="state.pending" :disabled="!dirty || !form.title.trim() || !form.topic.trim() || !form.style.trim()" @click="save">保存项目</NButton>
|
||||
<NButton
|
||||
type="primary"
|
||||
:loading="state.pending"
|
||||
:disabled="!dirty || !form.title.trim() || !form.topic.trim() || !form.style.trim()"
|
||||
@click="save"
|
||||
>保存项目</NButton
|
||||
>
|
||||
</template>
|
||||
</AppDialog>
|
||||
</template>
|
||||
Reference in new issue
Block a user