| | |
| | | :isHome="isHome" |
| | | ref="commonPhrasesRef" |
| | | @updateCommonChatInput="updateCommonChatInput" |
| | | |
| | | /> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | //#region ====================== 常用语功能 ====================== |
| | | const commonPhrasesRef = ref(null); |
| | | const isMessageBoxVisible = ref(false); |
| | | // 常用语功能点击 |
| | | const commonPhrasesClick = () => { |
| | | isShowPhrase.value = true; |
| | | }; |
| | | // 区域关闭常用语功能面板 |
| | | onClickOutside(commonPhrasesRef, () => { |
| | | const messageBoxElement = document.querySelector('.el-message-box'); |
| | | if (messageBoxElement) { |
| | | isMessageBoxVisible.value = true; |
| | | return; |
| | | } |
| | | isShowPhrase.value = false; |
| | | }); |
| | | // 常用语功能输入框更新 |
| | | const updateCommonChatInput = (val) => { |
| | | inputValue.value = val; |
| | | isShowPhrase.value = false; |
| | | }; |
| | | |
| | | watch(setCommonQuestionInfo, (val) => { |
| | | if (!props.isHome) { |
| | | let obj = { |