html部分<div class="notice_index">
<b>公告</b>
<div class="notice_box">
<ul class="marquee_list" :class="{marquee_top:animate}">
<li v-for="(item, index) in marqueeList">
最新消息: <span style="color: #999;">{{item.Title}}</span>
<i style="color: #999;">[ {{item.UpdateTime | moment("YYYY-MM-DD")}} ]</i>
</li>
</ul>
</div>
<div class="option">
<button @click="up" >▲</button>
<button @click="down" >▼</button>
</div></div>vue部分created() {
setInterval(this.showMarquee, 5000)//每5秒调用}
methods: {
showMarquee() { this.animate = true;
setTimeout (() => { this.marqueeList.push (this.marqueeList[0]); this.marqueeList.shift (); this.animate = false;
}, 1000);
},
}我想知道怎么写up和down
添加回答
举报
0/150
提交
取消