feat: 对话框焦点问题

This commit is contained in:
wangdan-fit2cloud 2023-12-04 18:02:00 +08:00
parent 95d46388d2
commit 250a19e247

View File

@ -11,7 +11,7 @@
<div class="content"> <div class="content">
<el-card shadow="always" class="dialog-card"> <el-card shadow="always" class="dialog-card">
<h4>您好我是 {{ data?.name || '应用名称'}}</h4> <h4>您好我是 {{ data?.name || '应用名称' }}</h4>
<div class="mt-4" v-if="data?.prologue"> <div class="mt-4" v-if="data?.prologue">
<el-text type="info">{{ data?.prologue }}</el-text> <el-text type="info">{{ data?.prologue }}</el-text>
</div> </div>
@ -97,6 +97,7 @@
<div class="ai-dialog__operate p-24"> <div class="ai-dialog__operate p-24">
<div class="operate-textarea flex"> <div class="operate-textarea flex">
<el-input <el-input
ref="quickInputRef"
v-model="inputValue" v-model="inputValue"
type="textarea" type="textarea"
placeholder="请输入" placeholder="请输入"
@ -135,11 +136,11 @@ const props = defineProps({
}) })
const { application } = useStore() const { application } = useStore()
const quickInputRef = ref()
const scrollDiv = ref() const scrollDiv = ref()
const dialogScrollbar = ref() const dialogScrollbar = ref()
const loading = ref(false) const loading = ref(false)
const inputValue = ref('') const inputValue = ref('')
const problem_text = ref('') //
const chartOpenId = ref('') const chartOpenId = ref('')
const chatList = ref<chatType[]>([]) const chatList = ref<chatType[]>([])
@ -149,6 +150,9 @@ const isDisabledChart = computed(
function quickProblemHandel(val: string) { function quickProblemHandel(val: string) {
inputValue.value = val inputValue.value = val
nextTick(() => {
quickInputRef.value?.focus()
})
} }
function sendChatHandle(event: any) { function sendChatHandle(event: any) {