npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-news-scroll

v1.0.6

Published

A Vue.js project

Downloads

15

Readme

vue-news-scroll

NPM version

  • vue 滚动消息插件👫
  • 滚动样式
  • 滚动时间间隔
  • 滚动自定义插槽
  • 支持异步获取滚动数据

npm


# npm install
npm install vue-news-scroll --save

引入

在main.js中引入

import vueNewsScroll from 'vue-news-scroll'
Vue.use(vueNewsScroll)

使用

滚动消息

<vue-news-scroll
  :listData="listData"
  :liStyle="liStyle"
  :rollTime="1600">
</vue-news-scroll>

| 参数 | 类型 | 备注 | 默认值 | | ------ | ------ | ------ | ------ | | listData | Array | 循环数据 | [] | | liStyle | Object | 循环数据样式(驼峰命名:backgroundColor) | {} | | rollTime | Number | 循环数据停顿时间 | 2000 | | slotShow | Boolean | 是否使用自定义插槽 | false |

使用自定义插槽

  • 设置属性slotShow为true
<vue-news-scroll
  :listData="listData"
  :liStyle="liStyle"
  :slotShow="true"
  :rollTime="1600">
  <template slot-scope="scope">
    <div style="position:relative;">
      {{ scope.item.phone }}
      成功下单
      {{ scope.item.money }}元
      <span style="position:absolute;right:0;">
        {{ scope.item.time }}
      </span>
    </div>
  </template>
</vue-news-scroll>

属性举例

listData: [
  { money: '14000', name: '许小姐', phone: '157****7192', time: '1分钟前' },
  { money: '5000', name: '巢先生', phone: '136****6246', time: '2分钟前' }
]
liStyle: {
  backgroundColor: '#FFFFFF',
  color: '#C79446',
  fontSize: '14px',
  padding: '10px', // 最好设置一点padding
  paddingLeft: '40px',
  paddingRight: '40px'
}

效果展示

录制gif出来效果有点卡顿,实际没有,我也不知道为什么

avatar

源码地址:https://github.com/liqin1059/vue-news-scroll