Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Y
yishuju-ui
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
何远江
yishuju-ui
Commits
e757dd75
Commit
e757dd75
authored
Apr 22, 2025
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页报错
parent
2f3d7fed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
CardList.vue
src/views/home/components/CardList.vue
+14
-10
No files found.
src/views/home/components/CardList.vue
View file @
e757dd75
...
...
@@ -2,7 +2,15 @@
<ul
class=
"card-list"
:style=
"
{ marginTop: '10px' }">
<li
class=
"art-custom-card"
v-for=
"(item, index) in dataList"
:key=
"index"
>
<span
class=
"des subtitle"
>
{{
item
.
des
}}
</span>
<CountTo
class=
"number box-title"
:endVal=
"item.num"
:duration=
"1000"
separator=
""
:suffix=
"item.unit + item.suffix"
></CountTo>
<el-tooltip
v-if=
"item.num"
effect=
"dark"
:content=
"item.num"
placement=
"top"
>
<div
class=
"number box-title"
>
{{
item
.
num
}}{{
item
.
unit
}}{{
item
.
suffix
}}
</div>
<!--
<CountTo
class=
"number box-title"
:endVal=
"item.num"
:duration=
"1000"
separator=
""
:suffix=
"item.unit + item.suffix"
></CountTo>
-->
</el-tooltip>
<el-icon
class=
"iconfont-sys"
>
<component
:is=
"item.icon"
/></el-icon>
</li>
</ul>
...
...
@@ -22,14 +30,7 @@
return
'0'
;
}
const
num
=
Number
(
number
);
if
(
num
>
100000000
)
{
return
Decimal
(
num
).
div
(
Decimal
(
100000000
)).
toNumber
().
toFixed
(
2
)
+
'亿'
;
}
else
if
(
num
>
10000
)
{
return
Decimal
(
num
).
div
(
Decimal
(
10000
)).
toNumber
().
toFixed
(
2
)
+
'万'
;
}
else
if
(
num
>
1000
)
{
return
Decimal
(
num
).
div
(
Decimal
(
1000
)).
toNumber
().
toFixed
(
2
)
+
'千'
;
}
return
num
.
toFixed
(
2
);
return
num
+
''
;
};
const
dataList
=
reactive
([
{
...
...
@@ -161,8 +162,11 @@
.number
{
display
:
block
;
margin-top
:
10px
;
font-size
:
28px
;
font-weight
:
400
;
font-size
:
23px
;
width
:
calc
(
100%
-
52px
);
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
}
...
...
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