Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
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
3a556c59
authored
2022-11-18 16:13:16 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:系统通知
1 parent
3c4455f3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
20 deletions
src/components/NoticeBar/index.vue
src/layout/components/Navbar.vue
src/components/NoticeBar/index.vue
View file @
3a556c5
...
...
@@ -7,8 +7,8 @@
<div
style=
"margin-right:5px"
></div>
<div
ref=
"back"
class=
"back"
>
<div
ref=
"text"
class=
"text"
@
mouseover=
"mouseOver"
@
mouseleave=
"mouseLeave"
>
<p
v-for=
"(item, index) in noticeList"
:key=
"index"
>
{{
item
.
t
itle
}}
<p
v-for=
"(item, index) in noticeList"
:key=
"index"
@
click=
"handleNotice(item)"
>
{{
item
.
noticeT
itle
}}
</p>
</div>
</div>
...
...
@@ -34,7 +34,22 @@ export default {
secondAnimationTime
:
''
,
// 状态二动画效果
};
},
watch
:
{
noticeList
:
{
handler
(
newName
,
oldName
)
{
let
that
=
this
this
.
Listener
();
setTimeout
(
res
=>
{
that
.
getData
();
},
100
);
},
deep
:
true
}
},
methods
:
{
handleNotice
(
item
)
{
this
.
$alertMes
(
item
.
noticeTitle
,
item
.
noticeContent
)
},
// 获取数据
getData
()
{
let
style
=
document
.
styleSheets
[
0
];
...
...
@@ -53,7 +68,7 @@ export default {
);
setTimeout
(
res
=>
{
this
.
changeState
();
},
10
00
);
},
3
00
);
},
// 用速度计算时间(想要保持速度一样,2种状态时间不同需算出)
ComputationTime
()
{
...
...
@@ -89,12 +104,6 @@ export default {
let
text
=
this
.
$refs
.
text
;
text
.
style
.
animationPlayState
=
''
}
},
mounted
()
{
this
.
Listener
();
setTimeout
(
res
=>
{
this
.
getData
();
},
100
);
}
};
</
script
>
...
...
src/layout/components/Navbar.vue
View file @
3a556c5
...
...
@@ -21,8 +21,11 @@
</div>
</
template
>
<
script
>
import
NoticeBar
from
'@/components/NoticeBar/index'
import
{
mapGetters
}
from
'vuex'
import
NoticeBar
from
'@/components/NoticeBar/index'
import
{
getHomeNoticeList
}
from
"@/api/home.js"
export
default
{
components
:
{
NoticeBar
...
...
@@ -33,20 +36,20 @@ export default {
data
()
{
return
{
logo
:
require
(
'../../image/logo.png'
),
noticeList
:
[
{
title
:
'6666666666666666666'
noticeList
:
[]
}
},
{
title
:
'3333333333333333333'
created
()
{
this
.
queryNoticeList
()
},
{
title
:
'6666666666666666666'
}
]
methods
:
{
queryNoticeList
()
{
getHomeNoticeList
().
then
(
res
=>
{
if
(
res
.
result
)
{
this
.
noticeList
=
res
.
result
.
noticeList
}
})
},
methods
:
{
themeChange
(
val
)
{
this
.
$store
.
dispatch
(
'app/updateTheme'
,
val
)
},
...
...
Please
register
or
sign in
to post a comment