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

wanghaoui

v1.1.10

Published

``` **yarn add wanghaoUI

Downloads

15

Readme

yarn add wanghaoUI

main.js:
import wanghaoUI  from 'wanghaoUI'
Vue.use(wanghaoUI)

组件:

列表滚动 whScrollList:

浏览器全屏功能 whScreenfull:

饼图组件 whPie:

列表滚动 whScrollList:

<!-- 0 往下 1 往上  -->
<wh-scroll-list 
  :data="listData"
  :class-option="classOption"
  :max="50"
  class="warp"
>
  <ul class="upDownUl">
    <li class="upDownLi" v-for="(item, index) in listData" :key="index">
      <span class="title" v-text="item.name"></span>
    </li>
  </ul>
</wh-scroll-list>

<!-- 2向左 3向右 -->
<!-- <wh-scroll-list 
  :data="listData"
  :class-option="classOption"
  :max="50"
  class="leftRightWarp"
  :style="{width: 130 * 4 + 'px'}"
>
  <ul class="leftRightUl">
    <li class="leftRightLi" v-for="(item, index) in listData" :key="index">
      {{ index }}
    </li>
  </ul>
</wh-scroll-list> -->

export default {
  name: 'ScrollList',
  data() {
    return {
      listData: [{
        'name': '无缝滚动1',
      }, {
        'name': '无缝滚动2',
      }, {
        'name': '无缝滚动3',
      }, {
        'name': '无缝滚动4',
      }, {
        'name': '无缝滚动5',
      }, {
        'name': '无缝滚动6',
      }, {
        'name': '无缝滚动7',
      }, {
        'name': '无缝滚动8',
      }, {
        'name': '无缝滚动9',
      }],
      classOption: {
        limitMoveNum: 5, //启动无缝滚动最小数据数
        hoverStop: true, //是否启用鼠标hover控制
        direction: 1, // 0 往下 1 往上 2向左 3向右
        openTouch: true, //开启移动端touch
        autoPlay: true,
        isSingleRemUnit: false // singleWidth/singleHeight 是否开启rem度量
      }
    }
  },
  mounted() {
  },
  methods: {
  }
}
</script>
<style scoped>
 .warp {
    height: 270px;
    width: 360px;
    margin: 0 auto;
    overflow: hidden;
  }
  .upDownUl {
    list-style: none;
    padding: 0;
    margin: 0 auto;
  }
  .upDownLi{
    display: block;
    height: 30px;
    line-height: 30px;
    display: flex;
    justify-content: space-between;
    font-size: 15px;
  }

  .leftRightWarp{
    width: 520px;
    height: 120px;
    margin: 0 auto;
    overflow: hidden;
  }
  .leftRightUl{
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 auto;
  }
  .leftRightLi{
    width: 120px;
    height: 120px;
    margin-right: 10px;
    line-height: 120px;
    background-color: #999;
    color: #fff;
    text-align: center;
    font-size: 30px;
  }
</style>

浏览器全屏功能 whScreenfull:

<wh-screenfull ref="screenfull" @getFullScreenStatus="getFullScreenStatus">
  <div class="btn" @click="clickFullscreen()">{{ isFullscreen ? '退出全屏' : '全屏' }}</div>
</wh-screenfull>
export default {
  name: 'screenfull',
  data() {
    return {
      isFullscreen: false,
    }
  },
  mounted() {
  },
  methods: {
    getFullScreenStatus(status) {
      this.isFullscreen = status
    },
    clickFullscreen() {
      this.$refs.screenfull.toggleFullscreen()
    },
  }
}
</script>
<style scoped>
 .btn{
   color: white;
   cursor: pointer;
 }
</style>

饼图组件 whPie:

<wh-pie :chartData.sync="chartData" width="443px" height="278px"></wh-pie>
mounted () {
  setTimeout(() => {
    this.chartData =  [{
      name: '测试1',
      value: 1
    }, {
      name: '测试2',
      value: 2
    }, ]
  }, 2000)
},