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
960fc374
Commit
960fc374
authored
Nov 12, 2024
by
shirlyn.guo
👌🏻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 个人应用&应用广场搜索优化
parent
dff9ac99
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
26 deletions
+25
-26
applications-square.vue
src/views/applications-square/applications-square.vue
+9
-10
personal-app.vue
src/views/personal-space/personal-app/personal-app.vue
+16
-16
No files found.
src/views/applications-square/applications-square.vue
View file @
960fc374
...
...
@@ -36,7 +36,7 @@ const cardContentWrapRef = useTemplateRef<HTMLDivElement>('cardContentWrapRef')
const
isShowCarousel
=
ref
(
true
)
const
smooth
=
ref
(
false
)
const
agentApplicationBottomIsLoading
=
ref
(
false
)
const
agentApplicationClassifyIsLoading
=
ref
(
fals
e
)
const
agentApplicationClassifyIsLoading
=
ref
(
tru
e
)
const
emptyTableText
=
ref
(
t
(
'personal_space_module.agent_module.agent_list_module.empty_agent_list'
))
const
emptyTableImage
=
ref
(
applicationEmptyImage
)
...
...
@@ -45,7 +45,6 @@ const { arrivedState } = useScroll(cardContentWrapRef, { behavior })
;(
function
()
{
handleGetMallCategoryList
()
agentApplicationClassifyIsLoading
.
value
=
true
handleGetAgentApplicationList
()
})()
...
...
@@ -75,12 +74,16 @@ watch(
},
)
function
handleGetAgentApplicationList
(
update
=
false
,
search
=
false
)
{
function
handleGetAgentApplicationList
(
update
=
false
,
search
=
false
,
clear
=
false
)
{
const
agentTypeId
=
ref
<
number
|
null
>
(
0
)
if
(
clear
&&
searchQuery
.
value
.
trim
()
===
''
)
return
if
(
agentApplicationBottomIsLoading
.
value
&&
agentApplicationClassifyIsLoading
.
value
)
return
if
(
search
&&
searchQuery
.
value
.
length
!==
0
)
{
isShowCarousel
.
value
=
false
agentApplicationClassifyIsLoading
.
value
=
true
}
else
{
isShowCarousel
.
value
=
true
}
...
...
@@ -144,10 +147,7 @@ function handleAddAgentApplications() {
function
handleEnterKeypress
(
event
:
KeyboardEvent
)
{
if
(
event
.
code
===
'Enter'
&&
!
event
.
shiftKey
)
{
event
.
preventDefault
()
if
(
searchQuery
.
value
.
trim
()
===
''
)
return
agentApplicationClassifyIsLoading
.
value
=
true
handleGetAgentApplicationList
(
true
,
true
)
handleGetAgentApplicationList
(
true
,
true
,
true
)
}
}
...
...
@@ -155,11 +155,10 @@ function handleSearchGetApplicationList(clear = false) {
if
(
clear
)
{
agentApplicationClassifyIsLoading
.
value
=
true
searchQuery
.
value
=
''
handleGetAgentApplicationList
(
true
,
true
)
}
else
{
if
(
searchQuery
.
value
.
trim
()
===
''
)
return
agentApplicationClassifyIsLoading
.
value
=
true
handleGetAgentApplicationList
(
true
,
true
,
true
)
}
handleGetAgentApplicationList
(
true
,
true
)
}
</
script
>
...
...
src/views/personal-space/personal-app/personal-app.vue
View file @
960fc374
...
...
@@ -56,7 +56,7 @@ const pagingInfo = ref<PaginationInfo>({
const
agentAppList
=
ref
<
PersonalAppConfigState
[]
>
([])
const
agentSearchInputValue
=
ref
(
''
)
const
agentAppListLoading
=
ref
(
fals
e
)
const
agentAppListLoading
=
ref
(
tru
e
)
const
agentAppListBottomLoadingMore
=
ref
(
false
)
const
emptyTableText
=
ref
(
t
(
'personal_space_module.agent_module.agent_list_module.application_empty'
))
...
...
@@ -78,11 +78,15 @@ watch(
},
)
;(
function
()
{
agentAppListLoading
.
value
=
true
getApplicationList
()
})()
function
getApplicationList
(
isLoadMore
=
false
)
{
function
getApplicationList
(
isLoadMore
=
false
,
clear
=
false
)
{
if
(
clear
&&
agentSearchInputValue
.
value
.
trim
()
===
''
)
{
return
}
else
{
if
(
!
agentAppListBottomLoadingMore
.
value
)
agentAppListLoading
.
value
=
true
}
if
(
!
isLoadMore
)
{
pagingInfo
.
value
.
pageNo
=
1
pagingInfo
.
value
.
totalPages
=
0
...
...
@@ -122,16 +126,6 @@ function handleBasePublishingStatusGetAgentList() {
getApplicationList
()
}
function
handleEnterKeypress
(
event
:
KeyboardEvent
)
{
if
(
event
.
code
===
'Enter'
&&
!
event
.
shiftKey
)
{
event
.
preventDefault
()
if
(
agentSearchInputValue
.
value
.
trim
()
===
''
)
return
agentAppListLoading
.
value
=
true
getApplicationList
()
}
}
function
handleDeletePersonalApp
(
agentId
:
string
)
{
window
.
$message
.
ctWarning
(
t
(
'personal_space_module.agent_module.agent_list_module.delete_agent_dialog_title'
))
...
...
@@ -190,11 +184,17 @@ function handleSearchGetApplicationList(clear = false) {
if
(
clear
)
{
agentAppListLoading
.
value
=
true
agentSearchInputValue
.
value
=
''
getApplicationList
()
}
else
{
if
(
agentSearchInputValue
.
value
.
trim
()
===
''
)
return
agentAppListLoading
.
value
=
true
getApplicationList
(
false
,
true
)
}
}
function
handleEnterKeypress
(
event
:
KeyboardEvent
)
{
if
(
event
.
code
===
'Enter'
&&
!
event
.
shiftKey
)
{
event
.
preventDefault
()
getApplicationList
(
false
,
true
)
}
getApplicationList
()
}
const
handleCardContentScrollDebounce
=
debounce
(
...
...
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