mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: 快捷问题
This commit is contained in:
parent
e05eca14cf
commit
0d3c6f1bb7
|
|
@ -181,6 +181,7 @@ import useStore from '@/stores'
|
|||
import MdRenderer from '@/components/markdown-renderer/MdRenderer.vue'
|
||||
import { MdPreview } from 'md-editor-v3'
|
||||
import { MsgError } from '@/utils/message'
|
||||
import { debounce } from 'lodash'
|
||||
defineOptions({ name: 'AiChat' })
|
||||
const route = useRoute()
|
||||
const {
|
||||
|
|
@ -266,15 +267,20 @@ function openParagraph(row: any, id?: string) {
|
|||
}
|
||||
|
||||
function quickProblemHandel(val: string) {
|
||||
if (!props.log) {
|
||||
if (!props.log && !loading.value) {
|
||||
// inputValue.value = val
|
||||
// nextTick(() => {
|
||||
// quickInputRef.value?.focus()
|
||||
// })
|
||||
chatMessage(null, val)
|
||||
|
||||
handleDebounceClick(val)
|
||||
}
|
||||
}
|
||||
|
||||
const handleDebounceClick = debounce((val) => {
|
||||
chatMessage(null, val)
|
||||
}, 200)
|
||||
|
||||
function sendChatHandle(event: any) {
|
||||
if (!event.ctrlKey) {
|
||||
// 如果没有按下组合键ctrl,则会阻止默认事件
|
||||
|
|
|
|||
Loading…
Reference in New Issue