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

sz-ui

v0.1.5

Published

> Szui组件库搭建中 ... 感谢您的测试 我们会让您的编程更简洁、高效

Downloads

8

Readme

Szui组件库搭建中 ... 感谢您的测试 我们会让您的编程更简洁、高效

合作人

舒榆衡 徐子笙 赵恒 李勇 于景尧 王涛 关瑞 伍浙江 张奋强

安装方法

npm i sz-ui

使用方法

// 引入sz-ui组件
import Szui from 'sz-ui'
// 引入css文件
import  'sz-ui/dist/sz-ui.css'
// 使用sz-ui
Vue.use(Szui)

Components

1. sz-Sweiper 轮播图

// 按需导入
import {Sweiper} from '../packages'
import  'sz-ui/dist/sz-ui.css'
Vue.use(Sweiper)

1.使用方法

<template>
  <sz-Sweiper :model="images" width="700" height="400" :time="1" auto>
    <template v-slot:default="{data:data}">
      {{data}}
      <img :src="data.src" width="100%" height="100%" />
    </template>
  </sz-Sweiper>
</template>

<script>
export default {
  data() {
    return {
      // 轮播图数据
      images: [
        {
          src: "http://www.shuyuhng.top:9999/img/aa.bdab5332.jpg"
        },
        {
          src: "http://www.shuyuhng.top:9999/img/aa.bdab5332.jpg"
        },
        {
          src: "http://www.shuyuhng.top:9999/img/aa.bdab5332.jpg"
        },
        {
          src: "http://www.shuyuhng.top:9999/img/aa.bdab5332.jpg"
        }
      ]
    };
  }
};
</script>

配置

属性配置

| 参数 | 说明 | 选填 | 类型 | 可选值 | 默认值 | | :------------: | :--------------: | :--: | :-----------: | :-------------------------: | :-----: | | model | 基础数据 | 否 | Array | ---- | ---- | | width | 轮播图宽度 | 是 | Number/String | ---- | 700 | | height | 轮播图高度 | 是 | Number/String | ----- | 400 | | type | 轮播图类型 | 是 | String | infinite/default/fade/stack | default | | time | 每次滚动时间 | 是 | Number | ---- | 0.8 | | auto | 是否自动播放 | 是 | Boolean | true/false | false | | autoTime | 自动播放的时间 | 是 | Number | ---- | 3000 | | noIndicator | 是否显示指示器 | 是 | Boolean | true/false | false | | noBtn | 是否显示按钮 | 是 | Boolean | true/false | false | | bottomBtnClass | 给指示器绑定类名 | 是 | String | ---- | ---- | | slide | 是否支持滑动 | 是 | Boolean | true/false | false |

slot插槽

| 插槽名称 | 说明 | | :-------: | :--------: | | default | 轮播图内容 | | left-btn | 左边的按钮 | | right-btn | 右边的按钮 |

2. sz-Slide 滑动监听

// 按需导入
import {Slide} from '../packages'
import  'sz-ui/dist/sz-ui.css'
Vue.use(Slide)

使用方法

<template>
   <sz-Slide @direction="direction">
      <div style="width:700px;height:400px;background-color:green;">
      </div>
    </sz-Slide>
</template>

<script>
export default {
 methods: {
    direction(direction) {
      switch (direction) {
        case "left":
          console.log("左滑");
          break;
        case "right":
          console.log("右滑");
          break;
        case "up":
          console.log("上滑");
          break;
        case "down":
          console.log("下滑");
          break;
        default:
          break;
      }
    },
  }
};
</script>

配置

属性配置

| 参数 | 说明 | 选填 | 类型 | 可选值 | 默认值 | | :---------: | :---------------------: | :--: | :-----------: | :----: | :----: | | sensitivity | 灵敏度 例如检测滑动20px | 否 | Number/String | ---- | 40 |

slot插槽

| 插槽名称 | 说明 | | :------: | :------: | | default | 默认内容 |

方法

| 方法名称 | 说明 | 返回值 | | :-------: | :------------: | :-----------------------------------: | | direction | 检测滑动的方向 | direction(direction) {} / String | | move | 滑动的关键数据 | move(moveData) {} / Object |