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

lx-data-run

v1.0.22

Published

A Vue.js project

Downloads

53

Readme

欢迎使用 lx-data-run 数据轮播表组件

相信大家在做大数据大屏展示的时候都用过 vue Data V,这是一个很不错的大屏数据展示组件库,但是这个组件库的轮播表组件就有很大的局限性。例如:自定义 dome 比较繁琐。
lx-data-run 解决的就是自定义 dome 滚动列表功能。支持动态增删数据。

组件 Prop:

| Prop 名称 | 数据类型 | 默认值 | 说明 | | -------------- | -------- | ------ | -------------------------------- | | itemShowLength | Number | 3 | 展示的数据条数 | | hoverStop | Boolean | false | 是否开启鼠标移入暂停滚动 | | cycle | Number | 2000 | 滚动一次需要的时间(单位:毫秒) | | data | Array | [] | 数据源 |

组件 slot:

| 插槽名称: | 插槽 Prop | | --------------- | -------------------- | | 匿名(default) | val (当前展示的数据) | | 匿名(default) | ind (当前展示的数据index) |

组件 自定义事件:

| 事件名称: | 返回值 | | ----------- | -------------- | | getShowList | 当前展示的数据 |

例子:

<template>
  <div>
    <lx-data-run
      :data="list"
      :item-show-length="2"
      :cycle="1000"
      @getShowList="getShowListFun"
      :hoverStop="true"
      #default="{val}"
    >
      <div class="page-box">
        <img :src="val" alt width="1000" height="375" />
      </div>
    </lx-data-run>
    <button @click="add">动态添加</button>
  </div>
</template>

<script>
import LxDataRun from "./components/LxDataRun";
export default {
  components: {
    LxDataRun,
  },
  data() {
    return {
      list: [
        "https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/db18a7bce84b7ee7c8411da8613cf051.jpg?w=2452&h=920",
        "https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/9ebff5f5c1f52f2dbdd611897adbefd4.jpg?thumb=1&w=1226&h=460&f=webp&q=90",
        "https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/84cec825f1cd04ea6554fece8ecbc236.jpg?thumb=1&w=1226&h=460&f=webp&q=90",
      ],
      showList: [],
    };
  },
  methods: {
    getShowListFun(data) {
      this.showList = data[0];
    },
    add() {
      this.list = [
        "https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/db18a7bce84b7ee7c8411da8613cf051.jpg?w=2452&h=920",
        "https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/9ebff5f5c1f52f2dbdd611897adbefd4.jpg?thumb=1&w=1226&h=460&f=webp&q=90",
        "https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/84cec825f1cd04ea6554fece8ecbc236.jpg?thumb=1&w=1226&h=460&f=webp&q=90",
        "https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/da777ad36da9d71f470464e5a20174d8.jpg?thumb=1&w=1226&h=460&f=webp&q=90",
      ];
    },
  },
};
</script>

<style>
* {
  margin: 0;
  padding: 0;
}
.page-box {
  width: 1000px;
  height: 375px;
  background-color: #999;
  border: 1px solid #fff;
  text-align: center;
  line-height: 375px;
  color: #fff;
  font-size: 20px;
  box-sizing: border-box;
  overflow: hidden;
}
</style>