|
|
@ -553,6 +553,9 @@ const adjustFooterPosition = (height) => { |
|
|
|
}, 200); |
|
|
|
}; |
|
|
|
|
|
|
|
// 是否正在输入法组合 |
|
|
|
const inputing = ref(false); |
|
|
|
|
|
|
|
const onFocus = function () { |
|
|
|
const visualViewport = window.visualViewport; |
|
|
|
// 获取可视区域高度 |
|
|
@ -569,6 +572,7 @@ const onFocus = function () { |
|
|
|
}; |
|
|
|
|
|
|
|
const onBlur = function () { |
|
|
|
inputing.value = false; |
|
|
|
const visualViewport = window.visualViewport; |
|
|
|
setTimeout(() => { |
|
|
|
console.log("输入框失焦"); |
|
|
@ -896,13 +900,15 @@ onUnmounted(() => { |
|
|
|
@focus="onFocus" |
|
|
|
@blur="onBlur" |
|
|
|
:autosize="{ minRows: 1, maxRows: 4 }" |
|
|
|
placeholder="请输入股票名称或股票代码..." |
|
|
|
class="msg-input" |
|
|
|
@keydown.enter.exact.prevent=" |
|
|
|
isLoading || isInputDisabled ? null : sendMessage() |
|
|
|
" |
|
|
|
:disabled="isInputDisabled" |
|
|
|
resize="none" |
|
|
|
:class="{ input: !message && !inputing }" |
|
|
|
@compositionstart="inputing = true" |
|
|
|
@compositionend="inputing = false" |
|
|
|
> |
|
|
|
</el-input> |
|
|
|
<img |
|
|
@ -1520,12 +1526,6 @@ body { |
|
|
|
padding-right: 45px !important; |
|
|
|
} |
|
|
|
|
|
|
|
.msg-input:deep(.el-textarea__inner::placeholder) { |
|
|
|
white-space: nowrap !important; |
|
|
|
overflow: hidden !important; |
|
|
|
text-overflow: ellipsis !important; |
|
|
|
} |
|
|
|
|
|
|
|
.msg-input { |
|
|
|
min-height: 34px; |
|
|
|
width: 100%; |
|
|
@ -1545,6 +1545,20 @@ body { |
|
|
|
outline: none; |
|
|
|
} |
|
|
|
|
|
|
|
.input::before { |
|
|
|
content: "请输入股票名称或股票代码..."; |
|
|
|
position: absolute; |
|
|
|
left: 11px; |
|
|
|
top: 5px; |
|
|
|
color: var(--el-text-color-secondary); |
|
|
|
pointer-events: none; |
|
|
|
white-space: nowrap ; |
|
|
|
overflow-x: hidden ; |
|
|
|
text-overflow: ellipsis ; |
|
|
|
width: 80%; |
|
|
|
z-index: 6; |
|
|
|
} |
|
|
|
|
|
|
|
@media (max-width: 768px) { |
|
|
|
.action-btn { |
|
|
|
height: 21px; |
|
|
|