亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

您的位置:首頁技術文章
文章詳情頁

vue時間線組件的使用方法

瀏覽:7日期:2023-02-15 17:13:33

本文實例為大家分享了vue時間線組件的具體實現代碼,供大家參考,具體內容如下

效果

vue時間線組件的使用方法

vue-時間線組件(時間軸組件)代碼

<template> <ul class='timeline-wrapper'><li v-for='t in timelineList' :key='t.id'><div class='timeline-box'> <div class='out-circle'><div class='in-circle'></div> </div> <div class='long-line'></div></div><div class='timeline-content'> <div class='timeline-date'>{{t.date}}</div> <div class='timeline-title'>{{ t.title}}</div> <div class='timeline-desc'>{{ t.content}}</div></div> </li> </ul></template><script type='text/babel'> import Vue from ’vue’ export default Vue.component(’Timeline’,{name: 'Timeline',props: { timelineList: {type: Array,default: () => { return []} }} })</script><style scoped lang='scss'> ul.timeline-wrapper {list-style: none;margin: 0;padding: 0; } /* 時間線 */ .timeline-item {position: relative;.timeline-box { text-align: center; position: absolute; .out-circle {width: 16px;height: 16px;background: rgba(14, 116, 218, 0.1);box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);/*opacity: 0.1;*/border-radius: 50%;display: flex;align-items: center;.in-circle { width: 8px; height: 8px; margin: 0 auto; background: rgba(14, 116, 218, 1); border-radius: 50%; box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);} } .long-line {width: 2px;height: 98px;background: rgba(14, 116, 218, 1);box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);opacity: 0.1;margin-left: 8px; }}.timeline-content { box-sizing: border-box; margin-left: 20px; height: 106px; padding: 0 0 0 20px; text-align: left; margin-bottom: 30px; .timeline-title {font-size: 14px;word-break: break-all;margin-bottom: 16px;color: #333;font-weight: 500;/*display: inline;*/ } .timeline-date {font-size: 16px;color: #333;font-weight: 500;margin-bottom: 16px; } .timeline-desc {font-size: 14px;color: #999999; }} } .timeline-item:last-of-type .timeline-content {margin-bottom: 0; }</style>

應用

// 父組件引用<timeline :timeline-list='dongtai'></timeline>

// 引入組件,記得組件路徑要根據自己的來import Timeline from './Timeline';// 在data()返回的對象里聲明數組dongtai:[]

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持好吧啦網。

標簽: Vue
相關文章:
主站蜘蛛池模板: 国产三香港三韩国三级不卡 | 精品高清写真视频在线 | 最新国产v亚洲v欧美v专区 | 亚洲日本在线免费观看 | 国产激情一区二区三区在线观看 | 国产小视频2023 | 日产国产精品久久久久久 | 国产成年网站v片在线观看 国产成版人视频网站免费下 | 日日噜噜夜夜狠狠视频无 | 久久国产精品老人性 | 国产综合在线视频 | 国产精品国产三级国快看 | 国产三级在线免费观看 | 国内精品视频一区二区三区 | 亚洲欧洲精品在线 | 国内精品久久久久久影院老狼 | 国产大片免费在线观看 | 精品国产福利在线观看网址2022 | 日日摸夜夜添夜夜添破第一 | 在线观看成人免费 | 日本特黄色大片 | 日韩精品免费一区二区三区 | 日本一级毛片一级裸片 | 1000部未满岁18在线观看网站 | 香港三级做爰大爽视频 | 黄网址在线观看 | 中文字幕乱码一区三区免费 | 亚洲综合免费 | 99精品国产成人一区二区在线 | 亚洲欧美视频一区 | 亚洲国产精品第一区二区三区 | 日本0930免费视频 | 国产在线不卡免费播放 | 久久这里只有精品免费看青草 | 丁香五婷婷 | 美国大片黄色 | 免费一级毛片在线视频观看 | 久久精品国产精品亚洲20 | 精品国产品欧美日产在线 | 精品久久久久久午夜 | 国产在线观看不卡免费高清 |