fix: Fallback to fix issues
This commit is contained in:
parent
6d7b5eb219
commit
f6994e16b9
@ -653,23 +653,13 @@ function autoSendMessage() {
|
|||||||
audio_list: uploadAudioList.value,
|
audio_list: uploadAudioList.value,
|
||||||
video_list: uploadVideoList.value
|
video_list: uploadVideoList.value
|
||||||
})
|
})
|
||||||
|
inputValue.value = ''
|
||||||
if (
|
uploadImageList.value = []
|
||||||
props.sendMessage(inputValue.value, {
|
uploadDocumentList.value = []
|
||||||
image_list: uploadImageList.value,
|
uploadAudioList.value = []
|
||||||
document_list: uploadDocumentList.value,
|
uploadVideoList.value = []
|
||||||
audio_list: uploadAudioList.value,
|
if (quickInputRef.value) {
|
||||||
video_list: uploadVideoList.value
|
quickInputRef.value.textareaStyle.height = '45px'
|
||||||
}) !== undefined
|
|
||||||
) {
|
|
||||||
inputValue.value = ''
|
|
||||||
uploadImageList.value = []
|
|
||||||
uploadDocumentList.value = []
|
|
||||||
uploadAudioList.value = []
|
|
||||||
uploadVideoList.value = []
|
|
||||||
if (quickInputRef.value) {
|
|
||||||
quickInputRef.value.textareaStyle.height = '45px'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -357,8 +357,10 @@ const decodeQuery = (query: string) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const confirmHandle = () => {
|
const confirmHandle = () => {
|
||||||
localStorage.setItem(`${accessToken}userForm`, JSON.stringify(form_data_context.value))
|
if (checkInputParam()) {
|
||||||
emit('confirm')
|
localStorage.setItem(`${accessToken}userForm`, JSON.stringify(form_data_context.value))
|
||||||
|
emit('confirm')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const cancelHandle = () => {
|
const cancelHandle = () => {
|
||||||
emit('cancel')
|
emit('cancel')
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
:class="type"
|
:class="type"
|
||||||
:style="{ height: firsUserInput ? '100%' : undefined }"
|
:style="{ height: firsUserInput ? '100%' : undefined }"
|
||||||
>
|
>
|
||||||
<div v-if="showUserInputContent" :class="firsUserInput ? 'firstUserInput' : 'popperUserInput'">
|
<div v-show="showUserInputContent" :class="firsUserInput ? 'firstUserInput' : 'popperUserInput'">
|
||||||
<UserForm
|
<UserForm
|
||||||
v-model:api_form_data="api_form_data"
|
v-model:api_form_data="api_form_data"
|
||||||
v-model:form_data="form_data"
|
v-model:form_data="form_data"
|
||||||
@ -193,23 +193,21 @@ watch(
|
|||||||
|
|
||||||
const toggleUserInput = () => {
|
const toggleUserInput = () => {
|
||||||
showUserInput.value = !showUserInput.value
|
showUserInput.value = !showUserInput.value
|
||||||
if (showUserInput.value) {
|
// if (showUserInput.value) {
|
||||||
// 保存当前数据作为初始数据(用于可能的恢复)
|
// // 保存当前数据作为初始数据(用于可能的恢复)
|
||||||
initialFormData.value = JSON.parse(JSON.stringify(form_data.value))
|
// initialFormData.value = JSON.parse(JSON.stringify(form_data.value))
|
||||||
initialApiFormData.value = JSON.parse(JSON.stringify(api_form_data.value))
|
// initialApiFormData.value = JSON.parse(JSON.stringify(api_form_data.value))
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
function UserFormConfirm() {
|
function UserFormConfirm() {
|
||||||
if (userFormRef.value?.checkInputParam()) {
|
firsUserInput.value = false
|
||||||
firsUserInput.value = false
|
showUserInput.value = false
|
||||||
showUserInput.value = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function UserFormCancel() {
|
function UserFormCancel() {
|
||||||
// 恢复初始数据
|
// // 恢复初始数据
|
||||||
form_data.value = JSON.parse(JSON.stringify(initialFormData.value))
|
// form_data.value = JSON.parse(JSON.stringify(initialFormData.value))
|
||||||
api_form_data.value = JSON.parse(JSON.stringify(initialApiFormData.value))
|
// api_form_data.value = JSON.parse(JSON.stringify(initialApiFormData.value))
|
||||||
showUserInput.value = false
|
showUserInput.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user