首页选中工作流时禁用底部输入与发送按钮,占位提示引导填写表单
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
v-model="message"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 1, maxRows: 6 }"
|
||||
:disabled="generating || isWorkflowRunning"
|
||||
:disabled="generating || isWorkflowRunning || selectedWorkflowId !== null"
|
||||
:placeholder="inputPlaceholder"
|
||||
class="message-input"
|
||||
@focus="isFocused = true"
|
||||
@@ -51,7 +51,7 @@
|
||||
<button
|
||||
class="send-btn"
|
||||
:class="{ 'is-stop': generating && !isWorkflowRunning }"
|
||||
:disabled="isWorkflowRunning || (!generating && sendDisabled)"
|
||||
:disabled="selectedWorkflowId !== null || isWorkflowRunning || (!generating && sendDisabled)"
|
||||
@click="generating && !isWorkflowRunning ? emit('stop') : handleSend()"
|
||||
>
|
||||
<el-icon v-if="generating && !isWorkflowRunning"><VideoPause /></el-icon>
|
||||
@@ -133,7 +133,11 @@ const lockAll = computed(() => props.isWorkflowRunning || props.generating);
|
||||
|
||||
// 输入框占位符:工作流执行中给出明确提示
|
||||
const inputPlaceholder = computed(() =>
|
||||
props.isWorkflowRunning ? '工作流执行中,请稍候...' : '有什么想聊的?按 Enter 发送,Shift+Enter 换行',
|
||||
props.isWorkflowRunning
|
||||
? '工作流执行中,请稍候...'
|
||||
: selectedWorkflowId.value !== null
|
||||
? '请填写上方工作流表单,提交后开始执行'
|
||||
: '有什么想聊的?按 Enter 发送,Shift+Enter 换行',
|
||||
);
|
||||
|
||||
const fetchWorkflows = async () => {
|
||||
|
||||
Reference in New Issue
Block a user