Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
liyeyun
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
cfld-frontend
liyeyun
Commits
8e439087
Commit
8e439087
authored
Dec 22, 2023
by
王玉鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 首页播报元素无限增长修正
parent
8b6455f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
HomeView.vue
src/views/home/HomeView.vue
+9
-4
No files found.
src/views/home/HomeView.vue
View file @
8e439087
...
...
@@ -90,8 +90,10 @@
<img
src=
"@/assets/images/icon-volume.png"
class=
"h-4 w-4"
alt=
""
/>
<div
class=
"relative h-5 w-[180px] overflow-hidden"
>
<ul
ref=
"marquee"
class=
"ml-2 h-5 w-[200px] overflow-hidden text-sm text-white"
>
<li
class=
"name"
>
园区数量
{{
homePageData
?.
parkInfoCount
}}
个
</li>
<li
class=
"name"
>
服务企业
{{
homePageData
?.
enterpriseCount
}}
家
</li>
<template
v-for=
"i of 4"
:key=
"i"
>
<li
class=
"name"
>
园区数量
{{
homePageData
?.
parkInfoCount
}}
个
</li>
<li
class=
"name"
>
服务企业
{{
homePageData
?.
enterpriseCount
}}
家
</li>
</
template
>
</ul>
</div>
</div>
...
...
@@ -99,7 +101,7 @@
<img
src=
"@/assets/images/icon-volume.png"
class=
"h-4 w-4"
alt=
""
/>
<div
style=
"width: calc(850px - 17px)"
class=
"relative h-5 overflow-hidden text-sm"
>
<ul
ref=
"marquee2"
class=
"ml-2 h-5 w-[850px] overflow-hidden text-sm text-white"
>
<li
v-for=
"
item in homePageData.noticeList"
:key=
"item.name
"
class=
"name"
>
<li
v-for=
"
(item, index) in formatedNoticeList"
:key=
"index
"
class=
"name"
>
<p
class=
"w-180 ell"
>
{{ item.name }}
</p>
...
...
@@ -384,6 +386,10 @@ const currentListType = computed(() => {
return
config
[
activeTab
.
value
]
!
;
});
const
formatedNoticeList
=
computed
(()
=>
{
return
Array
.
from
({
length
:
4
},
()
=>
homePageData
.
value
?.
noticeList
||
[]).
flat
();
});
const
toList
=
(
type
:
string
=
'search'
)
=>
{
let
name
:
RouteName
=
RouteName
.
developZoneList
;
let
filterType
:
string
=
searchType
.
value
;
...
...
@@ -470,7 +476,6 @@ const startMarquee = (lh: number, speed: number, delay: number, refName: string)
let
t
:
any
;
const
o
=
proxy
.
$refs
[
refName
];
o
.
innerHTML
+=
o
.
innerHTML
+
o
.
innerHTML
+
o
.
innerHTML
;
o
.
scrollTop
=
0
;
function
scrolling
(
fn
:
any
)
{
...
...
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