Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
dangan_dataV
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b8d7b673
authored
2025-04-27 18:18:29 +0800
by
zhangmeng
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
看板
1 parent
2a95d8c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
src/viewsPc/vip/centerPage.vue
src/viewsPc/vip/scrollingData.vue
src/viewsPc/vip/centerPage.vue
View file @
b8d7b67
...
...
@@ -297,7 +297,8 @@ async function handelGetYS004() {
async
function
handelGetYS005
()
{
const
res
=
await
getYS005
()
form
.
value
=
res
.
data
console
.
log
(
res
)
console
.
log
(
form
.
value
.
leaderinfo
)
}
...
...
@@ -344,27 +345,25 @@ const handelBing1 = (arr1, arr2) => {
type
:
'pie'
,
radius
:
[
'99%'
,
'100%'
],
center
:
[
'50%'
,
'60%'
],
label
:
{
show
:
false
}
,
emphasis
:
{
scale
:
false
,
// label:
{
// show: true,
//
}
}
,
label
:
{
show
:
false
,
emphasis
:
{
show
:
false
}
}
,
startAngle
:
180
,
endAngle
:
360
,
data
:
[
{
value
:
48
}
,
{
value
:
1
}
,
{
value
:
48
}
],
data
:
[
1
],
itemStyle
:
{
color
:
'rgba(1, 162, 237, 1)'
,
}
,
barWidth
:
2
barWidth
:
2
,
tooltip
:
{
trigger
:
''
}
}
,
{
name
:
'营业收入'
,
...
...
src/viewsPc/vip/scrollingData.vue
View file @
b8d7b67
<
template
>
<div
class=
"scrolling-container"
@
mouseenter=
"pauseScroll"
@
mouseleave=
"resumeScroll"
>
<div
:style=
"
{ transform: `translateY(${offset}px)` }" class="scrolling-content">
<div
v-for=
"(item, index) in
dataL
ist"
:key=
"index"
class=
"scrolling-item"
>
<div
v-for=
"(item, index) in
l
ist"
:key=
"index"
class=
"scrolling-item"
>
<span/>
{{
item
}}
</div>
<!-- 复制一份数据实现无缝滚动 -->
<div
v-for=
"(item, index) in
dataL
ist"
:key=
"`copy-$
{index}`" class="scrolling-item">
<div
v-for=
"(item, index) in
l
ist"
:key=
"`copy-$
{index}`" class="scrolling-item">
<span/>
{{
item
}}
</div>
</div>
...
...
@@ -13,7 +13,7 @@
</
template
>
<
script
setup
>
import
{
ref
,
onMounted
,
onUnmounted
}
from
'vue'
;
import
{
ref
,
onMounted
,
onUnmounted
,
computed
}
from
'vue'
;
const
props
=
defineProps
({
data
:
{
...
...
@@ -30,7 +30,8 @@ const props = defineProps({
}
});
const
dataList
=
ref
([...
props
.
data
]
||
[]);
const
list
=
computed
(()
=>
props
.
data
||
[])
const
offset
=
ref
(
0
);
const
scrollInterval
=
ref
(
null
);
const
isPaused
=
ref
(
false
);
...
...
@@ -46,7 +47,7 @@ const initScroll = () => {
}
// 重置位置到第一条数据
offset
.
value
=
0
;
// 设置定时器
scrollInterval
.
value
=
setInterval
(()
=>
{
if
(
!
isPaused
.
value
)
{
...
...
@@ -75,12 +76,12 @@ onMounted(() => {
const
container
=
document
.
querySelector
(
'.scrolling-container'
);
const
content
=
document
.
querySelector
(
'.scrolling-content'
);
const
firstItem
=
document
.
querySelector
(
'.scrolling-item'
);
if
(
container
&&
content
&&
firstItem
)
{
containerHeight
.
value
=
container
.
clientHeight
;
contentHeight
.
value
=
content
.
clientHeight
;
itemHeight
.
value
=
firstItem
.
clientHeight
;
// 如果内容高度小于容器高度,不需要滚动
if
(
contentHeight
.
value
>
containerHeight
.
value
)
{
// 初始位置设置为显示第一条数据
...
...
@@ -118,7 +119,7 @@ onUnmounted(() => {
color
:
#FFFFFF
;
height
:
calc
(
40
*
100vh
/
1920
);
margin
:
calc
(
8
*
100vw
/
1920
)
0
;
span
{
display
:
inline-block
;
width
:
calc
(
12
*
100vw
/
1920
);
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment