Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
69f2f814
Commit
69f2f814
authored
Jul 16, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应用部署排名分析自动轮播
parent
9ecf0b10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
1 deletion
+50
-1
src/components/e-charts/toplist.vue
src/components/e-charts/toplist.vue
+50
-1
No files found.
src/components/e-charts/toplist.vue
View file @
69f2f814
<
template
>
<
template
>
<div
class=
"top_list apass_scroll"
>
<div
class=
"top_list apass_scroll"
@
mouseenter=
"mouseenter"
@
mouseleave=
"mouseleave"
>
<ul>
<ul>
<li
class=
"item_list"
v-for=
"(option, index) in options"
:key=
"index"
>
<li
class=
"item_list"
v-for=
"(option, index) in options"
:key=
"index"
>
<div
class=
"item_index"
>
<div
class=
"item_index"
>
...
@@ -40,10 +44,55 @@ export default {
...
@@ -40,10 +44,55 @@ export default {
default
:
()
=>
1000
,
default
:
()
=>
1000
,
},
},
},
},
data
()
{
return
{
timer
:
null
,
};
},
watch
:
{
text
()
{
this
.
autoScroll
();
},
},
methods
:
{
methods
:
{
getPercent
(
value
)
{
getPercent
(
value
)
{
return
Math
.
min
((
value
/
this
.
targetValue
)
*
100
,
100
);
return
Math
.
min
((
value
/
this
.
targetValue
)
*
100
,
100
);
},
},
autoScroll
()
{
if
(
this
.
timer
)
{
clearInterval
(
this
.
timer
);
}
this
.
$el
.
scrollTop
=
0
;
this
.
timer
=
setInterval
(()
=>
{
let
curScrollTop
=
this
.
$el
.
scrollTop
+
1
;
if
(
curScrollTop
>
this
.
$el
.
scrollHeight
-
this
.
$el
.
clientHeight
)
{
curScrollTop
=
0
;
}
this
.
$el
.
scrollTop
=
curScrollTop
;
},
50
);
},
mouseenter
()
{
if
(
this
.
timer
)
{
clearInterval
(
this
.
timer
);
}
},
mouseleave
()
{
this
.
autoScroll
();
},
},
mounted
()
{
this
.
autoScroll
();
window
.
addEventListener
(
"
resize
"
,
()
=>
{
this
.
autoScroll
();
});
},
destroyed
()
{
if
(
this
.
timer
)
{
clearInterval
(
this
.
timer
);
}
},
},
};
};
</
script
>
</
script
>
...
...
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