|
@@ -174,6 +174,8 @@ function doSelectPrompt(item) {
|
|
promptModel.value.show = false
|
|
promptModel.value.show = false
|
|
promptModel.value.type = ''
|
|
promptModel.value.type = ''
|
|
|
|
|
|
|
|
+ triggerFocus()
|
|
|
|
+
|
|
that.$nextTick(() => {
|
|
that.$nextTick(() => {
|
|
getQuestionInputHeight()
|
|
getQuestionInputHeight()
|
|
})
|
|
})
|
|
@@ -597,6 +599,7 @@ const askModel = ref({
|
|
function resetQuestion(item) {
|
|
function resetQuestion(item) {
|
|
changeInputHeight()
|
|
changeInputHeight()
|
|
questionModel.value.input = item.message
|
|
questionModel.value.input = item.message
|
|
|
|
+ triggerFocus()
|
|
that.$nextTick(() => {
|
|
that.$nextTick(() => {
|
|
getQuestionInputHeight()
|
|
getQuestionInputHeight()
|
|
})
|
|
})
|
|
@@ -855,6 +858,13 @@ function echoPageState() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function triggerFocus () {
|
|
|
|
+ questionInputEl.value.focus()
|
|
|
|
+ that.$nextTick(() => {
|
|
|
|
+ questionInputEl.value.focus()
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
// 初始化事件
|
|
// 初始化事件
|
|
function init() {
|
|
function init() {
|
|
if (localStorage.getItem('ai-search-cache') === 'use') {
|
|
if (localStorage.getItem('ai-search-cache') === 'use') {
|