|
@@ -114,9 +114,6 @@ const onSend = (text = '') => {
|
|
|
content: state.params.query + ''
|
|
|
}
|
|
|
state.chats.push(ask)
|
|
|
- const floatingDiv = ref_auto.value
|
|
|
- floatingDiv.style.visibility = 'hidden';
|
|
|
- floatingDiv.style.display = 'flex';
|
|
|
const answer = reactive({
|
|
|
type: 'answer',
|
|
|
content: '',
|
|
@@ -125,6 +122,9 @@ const onSend = (text = '') => {
|
|
|
})
|
|
|
state.chats.push(answer)
|
|
|
scrollToEnd()
|
|
|
+ const floatingDiv = ref_auto.value
|
|
|
+ floatingDiv.style.visibility = 'hidden';
|
|
|
+ floatingDiv.style.display = 'flex';
|
|
|
ssePost(`/installed-apps/${window.czrConfig.dify.appId}/chat-messages`, {
|
|
|
body: state.params,
|
|
|
}, {
|
|
@@ -334,8 +334,10 @@ const initTextHandle = () => {
|
|
|
state.autoList = res?.data?.list.map(v => v.title) || []
|
|
|
if (state.autoList.length > 0) {
|
|
|
setTimeout(() => {
|
|
|
- floatingDiv.style.top = (-floatingDiv.clientHeight - 2 - 20) + 'px';
|
|
|
- floatingDiv.style.visibility = 'visible';
|
|
|
+ if (state.text) {
|
|
|
+ floatingDiv.style.top = (-floatingDiv.clientHeight - 2 - 20) + 'px';
|
|
|
+ floatingDiv.style.visibility = 'visible';
|
|
|
+ }
|
|
|
}, 10)
|
|
|
}
|
|
|
})
|