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
287eb221
Commit
287eb221
authored
Oct 29, 2024
by
shirlyn.guo
🤡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 卡片样式优化
parent
4304ccaf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
68 deletions
+73
-68
app.vue
src/app.vue
+13
-15
personal-app.vue
src/views/personal-space/personal-app/personal-app.vue
+60
-53
No files found.
src/app.vue
View file @
287eb221
...
@@ -48,20 +48,18 @@ useResizeObserver(rootContainer, (entries) => {
...
@@ -48,20 +48,18 @@ useResizeObserver(rootContainer, (entries) => {
</
script
>
</
script
>
<
template
>
<
template
>
<n-dialog-provider>
<div
ref=
"rootContainer"
class=
"h-full w-full"
>
<div
ref=
"rootContainer"
class=
"h-full w-full"
>
<MessageTipModal
/>
<MessageTipModal
/>
<NConfigProvider
<NConfigProvider
class=
"h-full w-full"
class=
"h-full w-full"
:locale=
"currentLocale"
:locale=
"currentLocale"
:date-locale=
"currentDateLocale"
:date-locale=
"currentDateLocale"
:theme-overrides=
"themeOverrides"
:theme-overrides=
"themeOverrides"
>
>
<RouterView
v-slot=
"
{ Component }">
<RouterView
v-slot=
"
{ Component }">
<Component
:is=
"Component"
/>
<Component
:is=
"Component"
/>
</RouterView>
</RouterView>
</NConfigProvider>
</NConfigProvider>
</div>
</div>
</n-dialog-provider>
</
template
>
</
template
>
src/views/personal-space/personal-app/personal-app.vue
View file @
287eb221
...
@@ -196,7 +196,7 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
...
@@ -196,7 +196,7 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"h-full
min-w-[900px]
"
>
<div
class=
"h-full"
>
<div
class=
"mb-[13px] flex justify-between"
>
<div
class=
"mb-[13px] flex justify-between"
>
<n-space
vertical
class=
"w-[118px]"
>
<n-space
vertical
class=
"w-[118px]"
>
<n-select
<n-select
...
@@ -223,65 +223,72 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
...
@@ -223,65 +223,72 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
</
template
>
</
template
>
</NInput>
</NInput>
</div>
</div>
<div
ref=
"cardContentWrapRef"
class=
"mb-[50px] h-full overflow-y-auto pb-[16px]"
style=
"scrollbar-width: none"
>
<div
ref=
"cardContentWrapRef"
class=
"h-full w-full overflow-y-auto pb-[16px]"
style=
"scrollbar-width: none"
>
<div
class=
"flex justify-center"
>
<div
class=
"flex justify-center"
>
<n-spin
v-show=
"agentAppListLoading"
size=
"large"
/>
<n-spin
v-show=
"agentAppListLoading"
size=
"large"
/>
</div>
</div>
<div
v-show=
"!agentAppListLoading"
>
<div
v-show=
"!agentAppListLoading"
class=
"mt-[5px]"
>
<n-grid
v-if=
"agentAppList.length"
cols=
"l:3 xl:4"
responsive=
"screen"
>
<n-grid
v-if=
"agentAppList.length"
cols=
"l:3 xl:4"
responsive=
"screen"
>
<n-grid-item
v-for=
"item in agentAppList"
:key=
"item.baseInfo.agentId"
class=
"mb-[20px] mr-[15px]"
>
<n-grid-item
<n-card
class=
"rounded-[10px]! max-w-[380px] shadow-[0_4px_10px_0px_rgba(103,103,103,.3)]"
>
v-for=
"agentAppItem in agentAppList"
:key=
"agentAppItem.baseInfo.agentId"
class=
"mb-[20px] mr-[15px]"
>
<div
class=
"rounded-[10px]! ml-[5px] max-w-[380px] px-[24px] pb-[19px] pt-[13px] shadow-[0_4px_10px_0px_rgba(103,103,103,.3)]"
>
<div
<div
class=
"mt-[6px] flex cursor-pointer justify-between"
class=
"mt-[6px] flex cursor-pointer justify-between"
@
click=
"handleEditPersonalApp(
i
tem.baseInfo.agentId)"
@
click=
"handleEditPersonalApp(
agentAppI
tem.baseInfo.agentId)"
>
>
<div
class=
"m
r-[20
px] text-[14px]"
>
<div
class=
"m
b-[19px] mr-[15
px] text-[14px]"
>
<n-popover
trigger=
"hover"
>
<n-popover
trigger=
"hover"
>
<
template
#
trigger
>
<
template
#
trigger
>
<div
class=
"h-[23px] max-w-[140px] cursor-pointer truncate font-medium text-[#333333]"
>
<div
{{
item
.
baseInfo
.
agentTitle
||
'--'
}}
class=
"popover-trigger h-[23px] w-full max-w-[160px] cursor-pointer truncate font-medium text-[#333333]"
>
{{
agentAppItem
.
baseInfo
.
agentTitle
||
'--'
}}
</div>
</div>
</
template
>
</
template
>
<span>
{{
i
tem.baseInfo.agentTitle || '--' }}
</span>
<span>
{{
agentAppI
tem.baseInfo.agentTitle || '--' }}
</span>
</n-popover>
</n-popover>
<div
class=
"
my-[18px] h-[44px] max-w-[18
0px] text-[#999999]"
>
<div
class=
"
agent-desc my-[18px] h-[44px] w-full max-w-[16
0px] text-[#999999]"
>
<n-ellipsis
:line-clamp=
"2"
>
<n-ellipsis
:line-clamp=
"2"
>
{{
i
tem.baseInfo.agentDesc }}
{{
agentAppI
tem.baseInfo.agentDesc }}
</n-ellipsis>
</n-ellipsis>
</div>
</div>
<n-button
<n-button
:color=
"
i
tem.baseInfo.agentPublishStatus === 'draft' ? '#CCCCCC' : '#000DFF'"
:color=
"
agentAppI
tem.baseInfo.agentPublishStatus === 'draft' ? '#CCCCCC' : '#000DFF'"
class=
"h-[27px] w-[71px] rounded-[13px] border-[1px] text-[13px]"
class=
"h-[27px] w-[71px] rounded-[13px] border-[1px] text-[13px]"
ghost
ghost
round
round
>
>
{{
{{
i
tem.baseInfo.agentPublishStatus === 'draft'
agentAppI
tem.baseInfo.agentPublishStatus === 'draft'
? t('common_module.unpublished')
? t('common_module.unpublished')
: t('common_module.published')
: t('common_module.published')
}}
</n-button
}}
</n-button
>
>
</div>
</div>
<div
class=
"h-[99px] w-[101px]"
>
<div
class=
"h-[99px] w-[101px]"
>
<img
:src=
"
item.baseInfo.agentAvatar"
class=
"h-[99px] min-w-[101
px]"
/>
<img
:src=
"
agentAppItem.baseInfo.agentAvatar"
class=
"h-[99px] min-w-[101px] rounded-[10
px]"
/>
</div>
</div>
</div>
</div>
<
template
#
footer
>
<
div
>
<div
class=
"flex justify-between"
>
<div
class=
"flex justify-between"
>
<div
class=
"text-[12px] text-[#999999]"
>
<div
class=
"text-[12px] text-[#999999]"
>
{{ t('personal_space_module.agent_module.agent_list_module.modified_time') }}
{{ t('personal_space_module.agent_module.agent_list_module.modified_time') }}
{{
formatDateTime
(
i
tem
.
modifiedTime
)
}}
{{ formatDateTime(
agentAppI
tem.modifiedTime) }}
</div>
</div>
<div
class=
"flex"
>
<div
class=
"flex"
>
<Star
<Star
v-show=
"
i
tem.baseInfo.agentPublishStatus !== 'draft'"
v-show=
"
agentAppI
tem.baseInfo.agentPublishStatus !== 'draft'"
theme=
"two-tone"
theme=
"two-tone"
size=
"18"
size=
"18"
:fill=
"
i
tem.isCollect === 'Y' ? ['#ffc06d', '#ffc06d'] : ['#333', '#fff']"
:fill=
"
agentAppI
tem.isCollect === 'Y' ? ['#ffc06d', '#ffc06d'] : ['#333', '#fff']"
:stroke-width=
"2"
:stroke-width=
"2"
class=
"cursor-pointer transition-all delay-150 duration-300 ease-in-out"
class=
"cursor-pointer transition-all delay-150 duration-300 ease-in-out"
@
click=
"handleApplicationsCollect(
i
tem)"
@
click=
"handleApplicationsCollect(
agentAppI
tem)"
/>
/>
<n-popover
<n-popover
placement=
"bottom-end"
placement=
"bottom-end"
...
@@ -299,20 +306,20 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
...
@@ -299,20 +306,20 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
/>
/>
</
template
>
</
template
>
<div
<div
v-show=
"
i
tem.baseInfo.agentPublishStatus !== 'draft'"
v-show=
"
agentAppI
tem.baseInfo.agentPublishStatus !== 'draft'"
class=
"mb-[10px] w-full rounded-[5px] py-[4px] pl-[5px] text-[14px] text-[#333333] hover:bg-[#f1f1f1]"
class=
"mb-[10px] w-full rounded-[5px] py-[4px] pl-[5px] text-[14px] text-[#333333] hover:bg-[#f1f1f1]"
@
click=
"handleAnalysisPersonalApp(
i
tem)"
@
click=
"handleAnalysisPersonalApp(
agentAppI
tem)"
>
>
{{ t('common_module.data_table_module.analysis') }}
{{ t('common_module.data_table_module.analysis') }}
</div>
</div>
<div
v-show=
"
i
tem.baseInfo.agentPublishStatus !== 'draft'"
>
<div
v-show=
"
agentAppI
tem.baseInfo.agentPublishStatus !== 'draft'"
>
<div
v-show=
"
i
tem.isSale === 'Y'"
>
<div
v-show=
"
agentAppI
tem.isSale === 'Y'"
>
<n-popconfirm
<n-popconfirm
:show-icon=
"false"
:show-icon=
"false"
class=
"w-[170px]"
class=
"w-[170px]"
:positive-text=
"t('common_module.confirm_btn_text')"
:positive-text=
"t('common_module.confirm_btn_text')"
:negative-text=
"t('common_module.cancel_btn_text')"
:negative-text=
"t('common_module.cancel_btn_text')"
@
positive-click=
"handleChangeApplicationsSaleStatus(
i
tem)"
@
positive-click=
"handleChangeApplicationsSaleStatus(
agentAppI
tem)"
>
>
<
template
#
trigger
>
<
template
#
trigger
>
<div
<div
...
@@ -326,10 +333,10 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
...
@@ -326,10 +333,10 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
}}
}}
</n-popconfirm>
</n-popconfirm>
</div>
</div>
<div
v-show=
"
i
tem.isSale === 'N'"
>
<div
v-show=
"
agentAppI
tem.isSale === 'N'"
>
<div
<div
class=
"mb-[10px] w-full rounded-[5px] py-[4px] pl-[5px] text-[14px] text-[#333333] hover:bg-[#f1f1f1]"
class=
"mb-[10px] w-full rounded-[5px] py-[4px] pl-[5px] text-[14px] text-[#333333] hover:bg-[#f1f1f1]"
@
click=
"handleChangeApplicationsSaleStatus(
i
tem)"
@
click=
"handleChangeApplicationsSaleStatus(
agentAppI
tem)"
>
>
{{ t('common_module.data_table_module.listing_applications') }}
{{ t('common_module.data_table_module.listing_applications') }}
</div>
</div>
...
@@ -338,22 +345,22 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
...
@@ -338,22 +345,22 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
<div
<div
class=
"w-[96px] rounded-[5px] py-[4px] pl-[8px] text-[14px] text-[#F25744] hover:bg-[#f1f1f1]"
class=
"w-[96px] rounded-[5px] py-[4px] pl-[8px] text-[14px] text-[#F25744] hover:bg-[#f1f1f1]"
@
click=
"handleDeletePersonalApp(
i
tem.baseInfo.agentId)"
@
click=
"handleDeletePersonalApp(
agentAppI
tem.baseInfo.agentId)"
>
>
{{ t('common_module.delete') }}
{{ t('common_module.delete') }}
</div>
</div>
</n-popover>
</n-popover>
</div>
</div>
</div>
</div>
</
template
>
</
div
>
</
n-card
>
</
div
>
</n-grid-item>
</n-grid-item>
<div
v-for=
"
item in 4"
v-show=
"agentAppListBottomLoadingMore"
:key=
"item
"
class=
"w-[380px]"
>
<div
v-for=
"
number in 4"
v-show=
"agentAppListBottomLoadingMore"
:key=
"number
"
class=
"w-[380px]"
>
<n-skeleton
text
:repeat=
"12"
/>
<n-skeleton
text
:repeat=
"12"
/>
</div>
</div>
</n-grid>
</n-grid>
<div
v-else
>
<div
v-else
>
<div
class=
"flex h-[650px] w-
[full]
items-center justify-center"
>
<div
class=
"flex h-[650px] w-
full
items-center justify-center"
>
<div
class=
"flex flex-col items-center justify-center"
>
<div
class=
"flex flex-col items-center justify-center"
>
<img
:src=
"emptyTableImage"
alt=
"empty"
class=
"mb-[20px] h-[68px] w-[68px]"
/>
<img
:src=
"emptyTableImage"
alt=
"empty"
class=
"mb-[20px] h-[68px] w-[68px]"
/>
<p
class=
"mb-[14px] text-[14px] text-[#999999]"
>
<p
class=
"mb-[14px] text-[14px] text-[#999999]"
>
...
@@ -371,16 +378,16 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
...
@@ -371,16 +378,16 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
<div
v-show=
"pagingInfo.pageNo === pagingInfo.totalPages && agentAppList.length !== 0"
v-show=
"pagingInfo.pageNo === pagingInfo.totalPages && agentAppList.length !== 0"
class=
"mb-[50px] mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
class=
"mb-[50px] mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
>
>
<div
class=
"relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"
></div>
<div
class=
"relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"
></div>
<div
class=
"mb-[8px] w-[80px]"
>
<div
class=
"mb-[8px] w-[80px]"
>
{{ t('personal_space_module.agent_module.agent_list_module.already_bottom') }}
{{ t('personal_space_module.agent_module.agent_list_module.already_bottom') }}
</div>
<div
class=
"relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"
></div>
</div>
</div>
<div
class=
"relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"
></div>
</div>
</div>
</div>
</div>
<SaleApplicationsConfigurationModal
<SaleApplicationsConfigurationModal
...
@@ -392,19 +399,19 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
...
@@ -392,19 +399,19 @@ function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
</template>
</template>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
:deep
(
.n-card
)
{
@media
(
width
>=
1536px
)
and
(
width
<=
1670px
)
{
>
.n-card__content
{
.popover-trigger
,
&
:first-child
{
.agent-desc
{
padding-top
:
13px
!
important
;
width
:
100%
;
padding-bottom
:
19px
!
important
;
max-width
:
110px
;
}
}
}
}
>
.n-card__footer
{
@media
(
width
<=
1370px
)
{
&
:first-child
{
.popover-trigger
,
padding-top
:
13px
!
important
;
.agent-desc
{
padding-bottom
:
19px
!
important
;
width
:
100%
;
}
max-width
:
120px
;
}
}
}
}
</
style
>
</
style
>
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