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
@@ -1,8 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
import { NCheckbox, NFormItem, NInput, NInputNumber, NSelect } from 'naive-ui'
|
||||
import FieldLabel from '../../../components/ui/FieldLabel.vue'
|
||||
import type { GenerationOptionSchema, GenerationOptions } from '../types'
|
||||
|
||||
defineProps<{ schemas: GenerationOptionSchema[]; modelValue: GenerationOptions; disabled?: boolean }>()
|
||||
/** 动态模型参数字段,实际说明由后端 schema 提供。 */
|
||||
defineProps<{
|
||||
/** 当前模型开放的参数列表。 */
|
||||
schemas: GenerationOptionSchema[]
|
||||
/** 本次实际参数值。 */
|
||||
modelValue: GenerationOptions
|
||||
/** 上游操作期间禁止编辑。 */
|
||||
disabled?: boolean
|
||||
}>()
|
||||
/** 字段编辑后通知上游更新参数。 */
|
||||
const emit = defineEmits<{ 'update:modelValue': [value: GenerationOptions] }>()
|
||||
|
||||
function update(model: GenerationOptions, key: string, value: string | number | boolean | null) {
|
||||
@@ -70,9 +80,15 @@ function constrainedOptions(schema: GenerationOptionSchema, current: string | nu
|
||||
v-for="schema in schemas"
|
||||
:key="schema.key"
|
||||
:label="`${schema.label}${schema.required ? ' *' : ''}`"
|
||||
:feedback="schema.description"
|
||||
:show-feedback="!!schema.description"
|
||||
:show-feedback="false"
|
||||
>
|
||||
<!-- 以下是参数标签与按需说明模块 -->
|
||||
<template #label>
|
||||
<FieldLabel
|
||||
:label="`${schema.label}${schema.required ? ' *' : ''}`"
|
||||
:description="schema.description"
|
||||
/>
|
||||
</template>
|
||||
<NCheckbox
|
||||
v-if="schema.type === 'boolean'"
|
||||
:checked="modelValue[schema.key] === true"
|
||||
@@ -131,11 +147,6 @@ function constrainedOptions(schema: GenerationOptionSchema, current: string | nu
|
||||
min-height: 34px;
|
||||
align-items: center;
|
||||
}
|
||||
.generation-option-grid :deep(.n-form-item-feedback-wrapper:not(:empty)) {
|
||||
min-height: 0;
|
||||
padding: 8px 0 0;
|
||||
line-height: 1.55;
|
||||
}
|
||||
@media (max-width: 760px) {
|
||||
.generation-option-grid {
|
||||
@apply grid-cols-[minmax(0,_1fr)];
|
||||
|
||||
Reference in new issue
Block a user