欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Vue實現(xiàn)時間軸功能

 更新時間:2022年02月27日 14:53:57   作者:張建宇.  
這篇文章主要為大家詳細(xì)介紹了Vue實現(xiàn)時間軸功能,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下

本文實例為大家分享了Vue實現(xiàn)時間軸功能的具體代碼,供大家參考,具體內(nèi)容如下

<template>
? <div class="container">
? ? <div class="content">
? ? ? <div class="coin" v-for="(item,index1) in Math.ceil((list.length+1)/4)" :key="index1" v-show="isShow==index1">
? ? ? ? <div class="xs_one"></div>
? ? ? ? <div
? ? ? ? ? class="coinAll"
? ? ? ? ? v-for="(item, index) in list"
? ? ? ? ? :key="index"
? ? ? ? ? :class="{ one: index%4==0 }"
? ? ? ? ? v-show="index<(index1+1)*4 && index+1>(index1)*4"
? ? ? ? >
? ? ? ? ? <span
? ? ? ? ? ? :class="{
? ? ? ? ? ? ? two: (index + 1) % 2 == 0,
? ? ? ? ? ? ? text_active: index == isIndex,
? ? ? ? ? ? }"
? ? ? ? ? >
? ? ? ? ? ? {{ item }}
? ? ? ? ? </span>
? ? ? ? ? <div class="xs" :class="{ xs_active: index == isIndex }"></div>
? ? ? ? ? <img src="../assets/img/coin1.png" alt="" v-show="index == isIndex" />
? ? ? ? ? <img src="../assets/img/coin2.png" alt="" v-show="index != isIndex" />
? ? ? ? </div>
? ? ? </div>
? ? ? <div class="paging" :style="{width:Math.ceil((list.length+1)/4)*20+'px'}">
? ? ? ? <div class="pagings" v-for="(item,index1) in Math.ceil((list.length+1)/4)" :key="index1" @click="tabList(index1)" :class="{is_activ:isShow==index1}">{{index}}</div>
? ? ? </div>
? ? </div>
? </div>
</template>
?
?
<script>
export default {
? data() {
? ? return {
? ? ? list: ["實施方案", "任務(wù)書", "中期檢查", "項目驗收", "分頁功能1","分頁功能1","分頁功能1","分頁功能1","分頁功能2"], //列表
? ? ? isIndex: 0, //高亮顯示
? ? ? isShow: 1, //顯示
? ? };
? },
? methods:{
? ? tabList(idx){
? ? ? this.isShow=idx
? ? }
? }
};
</script>
?
?
<style scoped>
.content {
? width: 400px;
? height: 120px;
? background: rgb(9, 27, 70);
? position: relative;
}
.paging{
? height: 20px;
? position: absolute;
? bottom: 10px;
? left: 50%;
? transform: translate(-50%);
}
.paging div{
? width: 15px;
? height: 15px;
? border-radius: 50%;
? background: rgb(120, 120, 120);
? float: left;
? margin-left: 5px;
}
.coin {
? width: 100%;
? height: 80px;
? background: rgb(9, 27, 70);
? position: relative;
? overflow-x: hidden;
}
.xs_one {
? width: 100%;
? height: 5px;
? background: rgb(61, 183, 270);
? position: absolute;
? top: 50%;
? left: 0;
? transform: translate(0, -50%);
}
.coin .coinAll {
? width: 100px;
? height: 100%;
? float: left;
? position: relative;
}
?
.coin .one {
? margin-left: -50px;
}
.coin .coinAll img {
? position: absolute;
? top: 50%;
? right: 0;
? transform: translate(0, -50%);
}
.coin .coinAll .xs {
? width: 100%;
? height: 5px;
? background: rgb(61, 183, 270);
? position: absolute;
? top: 50%;
? left: 0;
? transform: translate(0, -50%);
}
?
.coin .coinAll span {
? width: 100%;
? color: #fff;
? font-size: 16px;
? position: absolute;
? top: 5px;
}
.coin .coinAll .two {
? width: 100%;
? color: #fff;
? font-size: 16px;
? position: absolute;
? top: 55px;
}
?
/* 文字高亮 */
.coin .coinAll .text_active {
? color: rgb(245, 189, 39);
}
?
/* 線條高亮 */
.coin .coinAll .xs_active {
? background: rgb(245, 189, 39);
}
.paging .is_activ{
? background: rgb(26, 82, 229);
}
</style>

效果如圖

新增分頁

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • Vue如何使用Element-ui表單發(fā)送數(shù)據(jù)與多張圖片到后端詳解

    Vue如何使用Element-ui表單發(fā)送數(shù)據(jù)與多張圖片到后端詳解

    在做項目的時候遇到一個問題,前端需要上傳表單到后端,表單數(shù)據(jù)包括文本內(nèi)容和圖片,這篇文章主要給大家介紹了關(guān)于Vue如何使用Element-ui表單發(fā)送數(shù)據(jù)與多張圖片到后端的相關(guān)資料,需要的朋友可以參考下
    2022-04-04
  • Vue中CSS?scoped的原理詳細(xì)講解

    Vue中CSS?scoped的原理詳細(xì)講解

    在組件中增加的css加了scoped屬性之后,就在會在當(dāng)前這個組件的節(jié)點上增加一個data-v-xxx屬性,下面這篇文章主要給大家介紹了關(guān)于Vue中CSS?scoped原理的相關(guān)資料,需要的朋友可以參考下
    2023-01-01
  • Vue中使用和移除總線Bus的注意事項詳解

    Vue中使用和移除總線Bus的注意事項詳解

    Vue中的總線Bus是一種通信機(jī)制,可用于組件間的數(shù)據(jù)傳遞和事件觸發(fā)。使用時需要注意Bus的命名和定義、監(jiān)聽和觸發(fā)事件的方法、移除和銷毀Bus的時機(jī)和方式等問題。合理使用總線Bus可以提高組件的復(fù)用性和可維護(hù)性,但過度依賴可能會導(dǎo)致代碼耦合和難以維護(hù)
    2023-04-04
  • 如何在vue3.0+中使用tinymce及實現(xiàn)多圖上傳文件上傳公式編輯功能

    如何在vue3.0+中使用tinymce及實現(xiàn)多圖上傳文件上傳公式編輯功能

    本文給大家分享tinymce編輯器如何在vue3.0+中使用tinymce及實現(xiàn)多圖上傳文件上傳公式編輯功能,tinymce安裝方法文中也給大家詳細(xì)介紹了,對vue tinymce實現(xiàn)上傳公式編輯相關(guān)知識感興趣的朋友跟隨小編一起學(xué)習(xí)下吧
    2021-05-05
  • vue3使用vite搭建的項目需要安裝的插件/配置方式

    vue3使用vite搭建的項目需要安裝的插件/配置方式

    這篇文章主要介紹了vue3使用vite搭建的項目需要安裝的插件/配置方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2024-03-03
  • Vue.js 實現(xiàn)tab切換并變色操作講解

    Vue.js 實現(xiàn)tab切換并變色操作講解

    這篇文章主要介紹了Vue.js 實現(xiàn)tab切換并變色操作講解,本篇文章通過簡要的案例,講解了該項技術(shù)的了解與使用,以下就是詳細(xì)內(nèi)容,需要的朋友可以參考下
    2021-09-09
  • vue項目實現(xiàn)搜索內(nèi)容變紅色顯示

    vue項目實現(xiàn)搜索內(nèi)容變紅色顯示

    這篇文章主要為大家介紹了vue項目實現(xiàn)搜索內(nèi)容變紅色顯示,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2022-12-12
  • Vue2.0權(quán)限樹組件實現(xiàn)代碼

    Vue2.0權(quán)限樹組件實現(xiàn)代碼

    本文通過實例代碼給大家介紹了Vue2.0權(quán)限樹組件實現(xiàn)代碼,需要的的朋友參考下吧
    2017-08-08
  • vue圖片懶加載代碼實現(xiàn)

    vue圖片懶加載代碼實現(xiàn)

    這篇文章主要給大家介紹了關(guān)于vue圖片懶加載代碼實現(xiàn)的相關(guān)資料,所謂圖片懶加載是指當(dāng)我們?yōu)g覽頁面時,只加載我們?yōu)g覽器可視區(qū)的圖片,向下滾動時再繼續(xù)加載后面的圖片,需要的朋友可以參考下
    2023-07-07
  • 幾個你不知道的技巧助你寫出更優(yōu)雅的vue.js代碼

    幾個你不知道的技巧助你寫出更優(yōu)雅的vue.js代碼

    本文參考自油管上某個國外大神的公開演講視頻,學(xué)習(xí)了一下覺得很不錯,所以在項目中也使用了這些不錯的技巧。趁周末有空,寫個博客記錄一下
    2018-06-06

最新評論