luyilin/vue-cute-timeline
关于
一个可爱的 Vue.js 时间线组件。
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文vue-cute-timeline
Introduction
A cute timeline component for Vue.js.
Install
yarn add vue-cute-timeline --save
Usage
<template>
<timeline>
<timeline-title>title</timeline-title>
<timeline-item bg-color="#9dd8e0">item1</timeline-item>
<timeline-item :hollow="true">item2</timeline-item>
</timeline>
</template>
<script>
import { Timeline, TimelineItem, TimelineTitle } from 'vue-cute-timeline'
import 'vue-cute-timeline/dist/index.css'
export default {
components: {
Timeline,
TimelineItem,
TimelineTitle
}
}
</script>
API
<timeline> props
It will be better to use hyphenated attributes instead of camelcase attributes. The discussion explained why.
timeline-themeThe theme color of the timeline component.
Set the line's and circle's color.
Type: string Default: #dbdde0timeline-bgThe background color of the timeline circle component (for hollow and others if needed).
Set the hollow circle's and other timeline symbol's default background color.
Type: string Default: #dbdde0
<timeline-item> / <timeline-title> props
bg-colorSet the circle's and the circle's border color.
Type: string Default: #dbdde0line-colorSet only the circle's border color.
Type: string Default: #dbdde0hollowControl whether the circle is hollow or not. _Note** When
hollowcannot be used together withbg-color, unless you wish to change the hollow background color.Type: boolean Default: falsefont-colorSet the timeline item or title font color. Or you can set font color by add a className, as the content of the timeline item/title is a slot.
Type: string Default: #37414aicon-sizeSet the timeline item or title icon size. Control the size of the circle or of the image set using
slots="others".Type: string ('small'| 'medium'|'large') Default: ''
Slots
othersDon't like the circle? You can set it to a image, iconfont or anything you want.
<timeline-item> <img src="https://user-images.githubusercontent.com/12069729/36057805-80cfc3d2-0e4e-11e8-8851-6fda091ff389.png" class="icon-heart" slot="others" /> </timeline-item>
License
MIT © luyilin
minemine.cc · GitHub @luyilin · Twitter @luyilin12
探索相关项目
加载中…