fix: 修复用户输入debug问题
This commit is contained in:
parent
8920b71867
commit
9bb226da96
@ -1,6 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="aiChatRef" class="ai-chat" :class="log ? 'chart-log' : ''">
|
<div ref="aiChatRef" class="ai-chat" :class="log ? 'chart-log' : ''">
|
||||||
<div v-if="inputFieldList.length > 0" class="mb-16" style="padding: 0 24px">
|
<div
|
||||||
|
v-if="inputFieldList.length > 0 || apiInputFieldList.length > 0"
|
||||||
|
class="mb-16"
|
||||||
|
style="padding: 0 24px"
|
||||||
|
>
|
||||||
<el-card shadow="always" class="dialog-card">
|
<el-card shadow="always" class="dialog-card">
|
||||||
<div class="flex align-center cursor w-full" @click="showUserInput = !showUserInput">
|
<div class="flex align-center cursor w-full" @click="showUserInput = !showUserInput">
|
||||||
<el-icon class="mr-8 arrow-icon" :class="showUserInput ? 'rotate-90' : ''"
|
<el-icon class="mr-8 arrow-icon" :class="showUserInput ? 'rotate-90' : ''"
|
||||||
@ -9,9 +13,8 @@
|
|||||||
用户输入
|
用户输入
|
||||||
</div>
|
</div>
|
||||||
<el-collapse-transition>
|
<el-collapse-transition>
|
||||||
|
<div v-show="showUserInput" class="mt-16">
|
||||||
<DynamicsForm
|
<DynamicsForm
|
||||||
class="mt-16"
|
|
||||||
v-show="showUserInput"
|
|
||||||
v-model="form_data"
|
v-model="form_data"
|
||||||
:model="form_data"
|
:model="form_data"
|
||||||
label-position="left"
|
label-position="left"
|
||||||
@ -19,6 +22,16 @@
|
|||||||
:render_data="inputFieldList"
|
:render_data="inputFieldList"
|
||||||
ref="dynamicsFormRef"
|
ref="dynamicsFormRef"
|
||||||
/>
|
/>
|
||||||
|
<DynamicsForm
|
||||||
|
v-if="debug"
|
||||||
|
v-model="api_form_data"
|
||||||
|
:model="api_form_data"
|
||||||
|
label-position="left"
|
||||||
|
require-asterisk-position="right"
|
||||||
|
:render_data="apiInputFieldList"
|
||||||
|
ref="dynamicsFormRef2"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</el-collapse-transition>
|
</el-collapse-transition>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
@ -57,32 +70,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="inputFieldList.length > 0 || apiInputFieldList.length > 0">
|
|
||||||
<div class="avatar">
|
|
||||||
<img v-if="data.avatar" :src="data.avatar" height="30px" />
|
|
||||||
<LogoIcon v-else height="30px" />
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<el-card shadow="always" class="dialog-card">
|
|
||||||
<DynamicsForm
|
|
||||||
v-model="form_data"
|
|
||||||
:model="form_data"
|
|
||||||
label-position="left"
|
|
||||||
require-asterisk-position="right"
|
|
||||||
:render_data="inputFieldList"
|
|
||||||
ref="dynamicsFormRef"
|
|
||||||
/>
|
|
||||||
<DynamicsForm
|
|
||||||
v-model="api_form_data"
|
|
||||||
:model="api_form_data"
|
|
||||||
label-position="left"
|
|
||||||
require-asterisk-position="right"
|
|
||||||
:render_data="apiInputFieldList"
|
|
||||||
ref="dynamicsFormRef2"
|
|
||||||
/>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<template v-for="(item, index) in chatList" :key="index">
|
<template v-for="(item, index) in chatList" :key="index">
|
||||||
<!-- 问题 -->
|
<!-- 问题 -->
|
||||||
<div class="item-content mb-16 lighter">
|
<div class="item-content mb-16 lighter">
|
||||||
@ -262,7 +250,11 @@ const props = defineProps({
|
|||||||
chatId: {
|
chatId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
} // 历史记录Id
|
}, // 历史记录Id
|
||||||
|
debug: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['refresh', 'scroll'])
|
const emit = defineEmits(['refresh', 'scroll'])
|
||||||
|
|||||||
@ -138,7 +138,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="scrollbar-height">
|
<div class="scrollbar-height">
|
||||||
<AiChat :data="detail"></AiChat>
|
<AiChat :data="detail" :debug="true"></AiChat>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-collapse-transition>
|
</el-collapse-transition>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user