1.1.6 • Published 5 years ago

vue-colorful-background v1.1.6

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

vue-colorful-background

Make a colorful background with vue directive

Live demo and usage

Install

npm install vue-colorful-background

Usage

// es6 import
import VueColorfulBackground from 'vue-colorful-background'

// 或者通过<script>引入
<script src="path/to/vue-colorful-background.js"></script>
// main.js
Vue.use(VueColorfulBackground)
<div v-colorful="options"></div>

<script>
// ...
data () {
  return {
    options: {

    }
  }
}
</script>

Options

NameTypeDefaultDescription
durationString2s背景色过渡的耗时,其值与css属性transition-duration一致
timingStringease-in背景色渐变速度曲线,其值与css属性transition-timing-function一致
colorsArray[...]背景色,默认提供250种颜色,颜色引用自http://nipponcolors.com/
delayNumber2000背景色切换间隔

Modifiers

v-colorful默认按照colors数组中的顺序切换背景色,使用.random修饰符可以使背景色随机切换

<div v-colorful.random></div>
1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago