fix: rename isDisabledChart to isDisabledChat in chat-input-operate component (#2488)
This commit is contained in:
parent
e420a01e0d
commit
d60836798b
@ -181,11 +181,11 @@
|
|||||||
v-if="!startRecorderTime && !recorderLoading"
|
v-if="!startRecorderTime && !recorderLoading"
|
||||||
text
|
text
|
||||||
class="sent-button"
|
class="sent-button"
|
||||||
:disabled="isDisabledChart || loading"
|
:disabled="isDisabledChat || loading"
|
||||||
@click="sendChatHandle"
|
@click="sendChatHandle"
|
||||||
>
|
>
|
||||||
<img v-show="isDisabledChart || loading" src="@/assets/icon_send.svg" alt="" />
|
<img v-show="isDisabledChat || loading" src="@/assets/icon_send.svg" alt="" />
|
||||||
<SendIcon v-show="!isDisabledChart && !loading" />
|
<SendIcon v-show="!isDisabledChat && !loading" />
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -395,7 +395,7 @@ const showDelete = ref('')
|
|||||||
|
|
||||||
// 定义响应式引用
|
// 定义响应式引用
|
||||||
const mediaRecorder = ref<any>(null)
|
const mediaRecorder = ref<any>(null)
|
||||||
const isDisabledChart = computed(
|
const isDisabledChat = computed(
|
||||||
() => !(inputValue.value.trim() && (props.appId || props.applicationDetails?.name))
|
() => !(inputValue.value.trim() && (props.appId || props.applicationDetails?.name))
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -529,13 +529,13 @@ function sendChatHandle(event?: any) {
|
|||||||
if (!event?.ctrlKey) {
|
if (!event?.ctrlKey) {
|
||||||
// 如果没有按下组合键ctrl,则会阻止默认事件
|
// 如果没有按下组合键ctrl,则会阻止默认事件
|
||||||
event?.preventDefault()
|
event?.preventDefault()
|
||||||
if (!isDisabledChart.value && !props.loading && !event?.isComposing) {
|
if (!isDisabledChat.value && !props.loading && !event?.isComposing) {
|
||||||
if (inputValue.value.trim()) {
|
if (inputValue.value.trim()) {
|
||||||
autoSendMessage()
|
autoSendMessage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果同时按下ctrl+回车键,则会换行
|
// 如果同时按下ctrl+回车键,则会换行
|
||||||
insertNewlineAtCursor()
|
insertNewlineAtCursor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user