Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
lvjiaxuan committed Jun 11, 2023
1 parent 74a4a5c commit 8a1d5a7
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 6 deletions.
48 changes: 47 additions & 1 deletion README.md
@@ -1,5 +1,51 @@
# vue-seamless-roll

[![](https://img.shields.io/npm/v/vue-seamless-roll?color=a1b858&label=npm)](https://www.npmjs.com/package/vue-seamless-roll)
![](https://img.shields.io/badge/supports-vue%202%2F3-brightgreen)
[![](https://img.shields.io/npm/dependency-version/vue-seamless-roll/vue-demi)](https://github.com/vueuse/vue-demi)

[Vue3 Demo](https://lvjiaxuan.github.io/vue-seamless-roll)

[Vue2 Demo](https://lvjiaxuan.github.io/vue-seamless-roll/vue2)

## Install

```sh
npm i vue-seam-roll
```

## Props

<!-- eslint-skip -->
```ts
props: {
rollList: {
// As the name implies.
type: Array as PropType<(string | number)[]>,
default: () => [],
},
interval: {
// How long is the item Staying.
type: [ Number, String ],
default: 2000,
},
transitions: {
// No need to describe more.
type: Object as PropType<{
'transition-delay': string
'transition-duration': string
'transition-timing-function': string
}>,
default: () => ({
'transition-delay': '0',
'transition-duration': '1s', // Actually, the whole duration time is added with the `transition-delay`.
'transition-timing-function': 'linear',
}),
},
},
```

## TODO

- [ ] Support slot.
- [ ] Support slot.
- [ ] Expose methods like `startRoll` \ `stopRoll` \ `rollTo` .
9 changes: 4 additions & 5 deletions src/index.ts
Expand Up @@ -12,27 +12,26 @@ export default defineComponent({
name: 'VueSeamlessRoll',

props: {
debug: {
type: Boolean,
default: false,
},
rollList: {
// As the name implies.
type: Array as PropType<(string | number)[]>,
default: () => [],
},
interval: {
// How long is the item Staying.
type: [ Number, String ],
default: 2000,
},
transitions: {
// No need to describe more.
type: Object as PropType<{
'transition-delay': string
'transition-duration': string
'transition-timing-function': string
}>,
default: () => ({
'transition-delay': '0',
'transition-duration': '1s',
'transition-duration': '1s', // Actually, the whole duration time is added with the `transition-delay`.
'transition-timing-function': 'linear',
}),
},
Expand Down

0 comments on commit 8a1d5a7

Please sign in to comment.