vue可視化大屏實(shí)現(xiàn)無線滾動(dòng)列表飛入效果
一、效果如下
二、代碼如下(因項(xiàng)目是vite與vue3.0、element-plus)
<template> ? ?<ul class="IncidentMediateUl clearfix" v-infinite-scroll="infiniteScroll" :infinite-scroll-disabled="Data.disabled" style="overflow: auto"> ? ? ? ? ? <li v-for="(item, index) in Data.IncidentData" :key="index" class="IncidentMediateli clearfix" @click="Details(item)" :style="item.style"> ? ? ? ? ? ? <img :src="getImageUrl(item.status)" alt="" /> ? ? ? ? ? ? <div class="Mediate"> ? ? ? ? ? ? ? <el-tooltip class="item" effect="light" popper-class="tooltipLight" :content="item.name" placement="top"> ? ? ? ? ? ? ? ? <p class="headline">{{ item.name }}</p> ? ? ? ? ? ? ? </el-tooltip> ? ? ? ? ? ? ? <p class="time">{{ item.reportTime }}</p> ? ? ? ? ? ? ? <p class="location">{{ item.eventLocation }}</p> ? ? ? ? ? ? </div> ? ? ? ? ? </li> ? ? ? ? </ul> </template> <script setup> const cssIndex = ref(0) const 列表方法 =()=>{ // 獲取到list列表后處理數(shù)據(jù) res.data ?與Data.IncidentData 均為列表 ? cssIndex.value = 0 ? res.data.forEach((item, index) => { ? ? if (Data.IncidentData.length === 0 || Data.IncidentData.length < index) { ? ? ? cssIndex.value += 1 ? ? ? item.style = { ? ? ? ? animationDelay: `${cssIndex.value * 0.3}s` ?// 加載動(dòng)畫 ? ? ? } ? ? } else { ? ? ? item.style = { ? ? ? ? animationDelay: `0s` ?// 如果滾動(dòng)將以前動(dòng)畫置為0? ? ? ? } ? ? } ? }) ? Data.IncidentData = res.data } </script> <style lang="scss" scoped> .IncidentMediateli { ? transform: translateX(100%); ? animation: rise-in 1s forwards; ? @keyframes rise-in { ? ? to { ? ? ? transform: translateX(0); ? ? } ? } } </style>
到此這篇關(guān)于vue可視化大屏實(shí)現(xiàn)無線滾動(dòng)列表飛入效果的文章就介紹到這了,更多相關(guān)vue 無線滾動(dòng)列表飛入 效果內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
vue-cli3環(huán)境變量與分環(huán)境打包的方法示例
這篇文章主要介紹了vue-cli3環(huán)境變量與分環(huán)境打包的方法示例,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2019-02-02Vue計(jì)算屬性與監(jiān)視屬性實(shí)現(xiàn)方法詳解
最近在學(xué)習(xí)vue,學(xué)習(xí)中遇到了一些感覺挺重要的知識(shí)點(diǎn),感覺有必要整理下來,這篇文章主要給大家介紹了關(guān)于Vue.js中計(jì)算屬性、監(jiān)視屬性的相關(guān)資料,需要的朋友可以參考下2022-08-08解決獲取數(shù)據(jù)后this.$refs.xxx.toggleRowSelection無效的問題
這篇文章主要介紹了解決獲取數(shù)據(jù)后this.$refs.xxx.toggleRowSelection無效的問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2022-10-10vue移動(dòng)端微信授權(quán)登錄插件封裝的實(shí)例
今天小編就為大家分享一篇vue移動(dòng)端微信授權(quán)登錄插件封裝的實(shí)例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2018-08-08一文詳解Vue3中簡單diff算法的實(shí)現(xiàn)
這篇文章主要為大家詳細(xì)介紹Vue3中簡單diff算法的實(shí)現(xiàn)與使用,文中的示例代碼講解詳細(xì),具有一定的借鑒價(jià)值,感興趣的可以了解一下2022-09-09解決VUE打包后與nginx代理出現(xiàn)加載速度超級(jí)慢的問題
這篇文章主要介紹了解決VUE打包后與nginx代理出現(xiàn)加載速度超級(jí)慢的問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-09-09