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
eb581b8c
Commit
eb581b8c
authored
Oct 31, 2024
by
tyyin lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(首页): 推荐问题更换按钮调整
parent
f7c6a93c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
8 deletions
+28
-8
zh-cn.yaml
src/locales/langs/zh-cn.yaml
+1
-0
zh-hk.yaml
src/locales/langs/zh-hk.yaml
+1
-0
agent-about.vue
src/views/home/components/agent-about.vue
+25
-8
locales.d.ts
types/locales.d.ts
+1
-0
No files found.
src/locales/langs/zh-cn.yaml
View file @
eb581b8c
...
...
@@ -52,6 +52,7 @@ common_module:
deletion_failed_please_try_again
:
'
删除失败,请重试'
select_all
:
'
全选'
quit
:
'
退出'
retry
:
'
重试'
dialogue_module
:
continue_question_message
:
'
你可以继续提问'
...
...
src/locales/langs/zh-hk.yaml
View file @
eb581b8c
...
...
@@ -52,6 +52,7 @@ common_module:
deletion_failed_please_try_again
:
'
刪除失敗,請重試'
select_all
:
'
全選'
quit
:
'
退出'
retry
:
'
重試'
dialogue_module
:
continue_question_message
:
'
你可以繼續提問'
...
...
src/views/home/components/agent-about.vue
View file @
eb581b8c
...
...
@@ -23,6 +23,7 @@ const questionContent = defineModel<string>('questionContent', { required: true
const
{
t
}
=
useI18n
()
const
recommendQuestionList
=
ref
<
RecommendQuestionItem
[]
>
([])
const
promptChangeBtnStatus
=
ref
<
'normal'
|
'loading'
|
'failed'
>
(
'normal'
)
const
isShowAgentAbout
=
computed
(()
=>
{
return
props
.
messageListLength
===
0
...
...
@@ -50,10 +51,18 @@ function handleQuestionClick(question: string) {
const
handleRecommendQuestionListUpdate
=
debounce
(
()
=>
{
const
loadingCtl
=
window
.
$message
.
loading
(
`
${
t
(
'common_module.updating'
)}
...`
)
if
(
promptChangeBtnStatus
.
value
===
'loading'
)
{
return
}
getRecommendQuestionList
().
then
(()
=>
{
loadingCtl
.
destroy
()
promptChangeBtnStatus
.
value
=
'loading'
getRecommendQuestionList
()
.
then
(()
=>
{
promptChangeBtnStatus
.
value
=
'normal'
})
.
catch
(()
=>
{
promptChangeBtnStatus
.
value
=
'failed'
})
},
700
,
...
...
@@ -99,13 +108,21 @@ const handleRecommendQuestionListUpdate = debounce(
<li
class=
"mt-[10px] pl-[20px] text-[12px]"
>
<span
class=
"group cursor-pointer text-[#0B7DFF] transition hover:text-[#096EE0]"
class=
"group cursor-pointer text-[#0B7DFF] transition"
:class=
"{
'hover:text-[#096EE0]': promptChangeBtnStatus !== 'loading',
'cursor-not-allowed': promptChangeBtnStatus === 'loading',
'text-[#BDBDBD]': promptChangeBtnStatus === 'loading',
}"
@
click=
"handleRecommendQuestionListUpdate"
>
<i
class=
"iconfont icon-huanyihuan group-active:rotate-360 mr-[2px] inline-block text-[11px] transition-[rotate] duration-150 ease-in-out"
class=
"iconfont icon-huanyihuan mr-[2px] inline-block text-[11px] transition-[rotate] duration-150 ease-in-out"
:class=
"{ 'group-active:rotate-360': promptChangeBtnStatus !== 'loading' }"
></i>
<span>
{{ t('common_module.exchange') }}
</span>
<span>
{{ promptChangeBtnStatus === 'failed' ? t('common_module.retry') : t('common_module.exchange') }}
</span>
</span>
</li>
</ul>
...
...
types/locales.d.ts
View file @
eb581b8c
...
...
@@ -53,6 +53,7 @@ declare namespace I18n {
deletion_failed_please_try_again
:
string
select_all
:
string
quit
:
string
retry
:
string
dialogue_module
:
{
continue_question_message
:
string
...
...
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