!32 update src/component/noticeBar/index.vue.

Merge pull request !32 from cool314156/N/A
This commit is contained in:
就眠儀式 2022-03-21 03:34:12 +00:00 committed by Gitee
commit 255a8f0b27
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -18,7 +18,15 @@
> >
{{ text }} {{ text }}
</div> </div>
<div class="notice-bar-warp-slot" v-else><slot /></div> <!-- <div class="notice-bar-warp-slot " v-else> -->
<div v-else>
<div class="content_container">
<ul class="content_container_list" >
<li class="content_container_list_item" v-for="(v, index) in textlist" :key="index">{{v}}</li>
</ul>
</div>
</div>
<!-- <slot /> -->
</div> </div>
<lay-icon <lay-icon
:type="rightIcon" :type="rightIcon"
@ -52,6 +60,11 @@ export default defineComponent({
type: String, type: String,
default: () => "", default: () => "",
}, },
//
textlist: {
type: Array,
default: [],
},
// //
color: { color: {
type: String, type: String,
@ -225,4 +238,100 @@ export default defineComponent({
.notice-bar .notice-bar-warp .notice-bar-warp-right-icon:hover { .notice-bar .notice-bar-warp .notice-bar-warp-right-icon:hover {
cursor: pointer; cursor: pointer;
} }
.content_container {
font-weight: 600;
overflow: hidden;
height: 40px;
padding: 0 5px;
}
.content_container_list {
margin-top: 0;
padding-left: 0px;
text-align: left;
list-style: none;
-webkit-animation-name: change;
animation-name: change;
-webkit-animation-duration: 10s;
animation-duration: 10s;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
.content_container_list_item {
line-height: 40px;
margin: 0;
}
@-webkit-keyframes opacity {
0%, 100% {
opacity: 0;
}
50% {
opacity: 1;
}
}
@keyframes opacity {
0%, 100% {
opacity: 0;
}
50% {
opacity: 1;
}
}
@-webkit-keyframes change {
0%, 12.66%, 100% {
transform: translate3d(0, 0, 0);
}
16.66%, 29.32% {
transform: translate3d(0, -25%, 0);
}
33.32%, 45.98% {
transform: translate3d(0, -50%, 0);
}
49.98%, 62.64% {
transform: translate3d(0, -75%, 0);
}
66.64%, 79.3% {
transform: translate3d(0, -50%, 0);
}
83.3%, 95.96% {
transform: translate3d(0, -25%, 0);
}
}
@keyframes change {
0%, 12.66%, 100% {
transform: translate3d(0, 0, 0);
}
16.66%, 29.32% {
transform: translate3d(0, -25%, 0);
}
33.32%, 45.98% {
transform: translate3d(0, -50%, 0);
}
49.98%, 62.64% {
transform: translate3d(0, -75%, 0);
}
66.64%, 79.3% {
transform: translate3d(0, -50%, 0);
}
83.3%, 95.96% {
transform: translate3d(0, -25%, 0);
}
}
</style> </style>