Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
84b868d3
Commit
84b868d3
authored
Dec 17, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into 'master'
fix: 输入框提问内容超出换行 See merge request
!113
parents
36405c96
11d2fe5f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
10 deletions
+41
-10
markdown-render.vue
src/components/markdown-render/markdown-render.vue
+1
-0
footer-operation.vue
...iews/multi-model-dialogue/components/footer-operation.vue
+11
-2
footer-input.vue
...ts/agent-config/agent-preview/components/footer-input.vue
+10
-1
footer-input.vue
src/views/share/components/footer-input.vue
+10
-1
message-item.vue
src/views/share/components/message-item.vue
+9
-6
No files found.
src/components/markdown-render/markdown-render.vue
View file @
84b868d3
...
...
@@ -66,6 +66,7 @@ watchEffect(() => {
.article-container
{
// letter-spacing: 0.1ch;
font-family
:
'Microsoft YaHei UI'
;
word-break
:
break-all
;
background-color
:
unset
;
}
</
style
>
src/views/multi-model-dialogue/components/footer-operation.vue
View file @
84b868d3
...
...
@@ -79,6 +79,13 @@ function messageItemFactory() {
}
as
MessageItemInterface
}
function
handleInputMessageEnter
(
event
:
KeyboardEvent
)
{
if
(
event
.
key
===
'Enter'
)
{
event
.
preventDefault
()
handleQuestionSubmit
()
}
}
function
handleQuestionSubmit
()
{
if
(
isQuestionSubmitDisabled
.
value
||
props
.
isAnswerResponseWait
||
isInputMessageDisabled
.
value
)
return
...
...
@@ -294,13 +301,15 @@ function handleSelectFile(cb: () => void) {
<div
class=
"relative"
>
<n-input
v-model:value=
"questionContent"
type=
"textarea"
:autosize=
"{ minRows: 1, maxRows: 5 }"
:placeholder=
"t('common_module.dialogue_module.question_input_placeholder')"
:disabled=
"isInputMessageDisabled"
class=
"rounded-theme! w-[725px]! border-[#9EA3FF]! border py-[10px] pl-3 pr-[44px]"
@
keydown
.
enter=
"handleQuestionSubmit
"
@
keydown
=
"handleInputMessageEnter
"
/>
<i
class=
"iconfont icon-send-icon absolute
right-6 top-[18px]
text-xl leading-none"
class=
"iconfont icon-send-icon absolute
bottom-[17px] right-6
text-xl leading-none"
:class=
"
isQuestionSubmitDisabled || isAnswerResponseWait || isInputMessageDisabled
? 'text-hover-theme-color cursor-not-allowed'
...
...
src/views/personal-space/personal-app-setting/components/agent-config/agent-preview/components/footer-input.vue
View file @
84b868d3
...
...
@@ -125,6 +125,13 @@ function messageItemFactory(): ConversationMessageItem {
}
}
function
handleInputMessageEnter
(
event
:
KeyboardEvent
)
{
if
(
event
.
key
===
'Enter'
)
{
event
.
preventDefault
()
handleMessageSend
()
}
}
function
handleMessageSend
()
{
if
(
!
inputMessageContent
.
value
.
trim
()
||
isInputMessageDisabled
.
value
)
{
return
...
...
@@ -449,10 +456,12 @@ defineExpose({
<div
class=
"relative flex-1"
>
<n-input
v-model:value=
"inputMessageContent"
type=
"textarea"
:autosize=
"{ minRows: 1, maxRows: 5 }"
:placeholder=
"t('common_module.dialogue_module.question_input_placeholder')"
:disabled=
"isInputMessageDisabled"
class=
"rounded-xl! shadow-[0_1px_#09122105,0_1px_1px_#09122105,0_3px_3px_#09122103,0_9px_9px_#09122103]! py-[4px] pr-[50px]"
@
keydown
.
enter=
"handleMessageSend
"
@
keydown
=
"handleInputMessageEnter
"
/>
<div
...
...
src/views/share/components/footer-input.vue
View file @
84b868d3
...
...
@@ -127,6 +127,13 @@ function messageItemFactory(): ConversationMessageItem {
}
}
function
handleInputMessageEnter
(
event
:
KeyboardEvent
)
{
if
(
event
.
key
===
'Enter'
)
{
event
.
preventDefault
()
handleMessageSend
()
}
}
function
handleMessageSend
()
{
if
(
!
isLogin
.
value
)
{
window
.
$message
.
warning
(
t
(
'common_module.not_login_text'
))
...
...
@@ -434,10 +441,12 @@ defineExpose({
<div
class=
"relative flex-1"
>
<n-input
v-model:value=
"inputMessageContent"
type=
"textarea"
:autosize=
"{ minRows: 1, maxRows: 5 }"
:placeholder=
"inputPlaceholder"
:disabled=
"!isLogin || isInputMessageDisabled"
class=
"rounded-xl! shadow-[0_1px_#09122105,0_1px_1px_#09122105,0_3px_3px_#09122103,0_9px_9px_#09122103]! py-[4px] pr-[50px]"
@
keydown
.
enter=
"handleMessageSend
"
@
keydown
=
"handleInputMessageEnter
"
/>
<div
class=
"bg-px-send-png absolute bottom-2 right-[20px] h-[24px] w-[24px]"
...
...
src/views/share/components/message-item.vue
View file @
84b868d3
...
...
@@ -54,6 +54,14 @@ const isShowWebVoiceLoading = computed(() => {
return
props
.
role
===
'assistant'
&&
!
isMobile
.
value
&&
props
.
messageItem
.
isVoiceLoading
&&
timbreEnabled
.
value
})
const
isShowMobileLoading
=
computed
(()
=>
{
return
(
props
.
role
===
'assistant'
&&
(
props
.
messageItem
.
isAnswerResponseLoading
||
(
isMobile
.
value
&&
props
.
messageItem
.
isVoiceLoading
&&
timbreEnabled
.
value
))
)
})
function
handleAudioControl
()
{
if
(
!
isPlayableAudio
.
value
)
{
return
...
...
@@ -109,12 +117,7 @@ function handleAudioControl() {
/>
</p>
<div
v-show=
"
role === 'assistant' && (messageItem.isAnswerResponseLoading || (isMobile && messageItem.isVoiceLoading))
"
class=
"mb-[5px] mt-4 px-4"
>
<div
v-show=
"isShowMobileLoading"
class=
"mb-[5px] mt-4 px-4"
>
<CustomLoading
/>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment