vue.js 横向滑动_一个Vue.js插件可以滑动文本

vue.js 横向滑动

Textra (Textra)

Vue js add-on to slide text.

Vue js附加组件可滑动文本。

正在安装 (Installing)

npm i -D vue-textra

Then inside you project, start using it :

然后在您的项目内部,开始使用它:

import Vue from 'vue'
import App from './App.vue'
import Textra from 'vue-textra'

Vue.use(Textra);
new Vue({
  el: '#app',
  render: h => h(App)
})

用法 (Usage)

Inside any of your components:

在任何组件内部:

<textra :data='words' :timer="1.1" filter="flash" />

And in your instance data:

在您的实例数据中:

//...
  data () {
    return {
      words: ["My text to show","palnet","fail","sample text"]
    }
  }
//...

Another example :

另一个例子 :

<textra :data='words' :timer="1.1" :infinite='true' filter="left-right" />

This one will loop around for ever.

这将永远循环。

道具 (Props)

data (data)

Type : Array Description : Should be array of things you want to slide.

类型:数组描述:应该是要滑动的东西的数组。



timer (timer)

Type : Number Description : Defines gap between each slide as second. Default : 1

类型:数字说明:将每张幻灯片之间的间隔定义为秒。 默认值: 1



filter (filter)

Type : String Description : Defines type of filter you want to use when sliding. Default : simple

类型:字符串说明:定义滑动时要使用的过滤器类型。 默认值: simple



infinite (infinite)

Type : Boolean Description : Defines whether your slider should keep looping or not. Default : false

类型:布尔值描述:定义滑块是否应保持循环播放。 默认值: false

筛选器 (Filters)

There are 9 types of filters available for now:

目前有9种类型的过滤器可用:

  • simple

    simple

  • bottom-top

    bottom-top

  • top-bottom

    top-bottom

  • right-left

    right-left

  • left-right

    left-right

  • press

    press

  • scale

    scale

  • flash

    flash

  • flip

    flip

翻译自: https://vuejsexamples.com/a-vue-js-add-on-to-slide-your-text/

vue.js 横向滑动

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值