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

reactimagescale

v0.1.0

Published

<!-- * Author wangtengyao * Date 2022-11-11 13:23:39 * LastEditors wangtengyao * LastEditTime 2022-11-11 13:23:39 * Description 拖拽、缩放容器组件 -->

Downloads

4

Readme

描述

reactimagescale 是一个 React 图片组件,传入规定的数据类型后,展示图片轮播和支持双指缩放。

安装

npm install reactimagescale --save

使用

  1. 引入
import reactimagescale from 'reactimagescale';
  1. 使用
具体参考example

其中,DragZoomContainer内的 div 即为要拖拽、缩放的内容。

属性

| 属性 | 描述 | 类型 | 默认值 | |:-----------------|:-------------------|:-------|:-----| | imgData | 图片数组 | | [] | | currentIndex | 当前页数 | number | null | | changeCurrent | 改变当前页的操作 | fn | null | | onBackFn | 左上角返回的回调函数 | fn | null |

imgData格式

 [{
    reminder: "", //可省略
    type: 1, //tab的id
    type_list: [{  //tab下的列表
        pic_index: 1, //可省略
        pic_mode: {title: "外观重点", list: ["全车360度影像", "车侧盲区影像", "自动头灯", "转向辅助灯", "大灯延时关闭"]},
        pic_note: "",
        pic_src: "https://c3.xinstatic.com/o/20220626/1835/62b8367277147486905_42.jpg",
        pic_src_big: "https://c3.xinstatic.com/o/20220626/1835/62b8367277147486905_20.jpg",
        pic_src_original: "https://c3.xinstatic.com/o/20220626/1835/62b8367277147486905_40.jpg",
        pic_src_small: "https://c3.xinstatic.com/o/20220626/1835/62b8367277147486905_50.jpg",
        pic_tag_list: [],
        pic_type: "1",
    }],
    type_name: "外观", //tab名称
    //以下有瑕疵的时候使用
    detectitemmapid_place: "",
    flaw_descs: [],
    flaw_on_img: [
        {
            flaw: "5CM以内凹坑",
            flaw_code: "3BX4",
            flaw_code_type: 1,
            flaw_color: "#F3D334",
            flaw_mapid: "0.40541667,0.4975",
            flaw_point: "L",
            flaw_type: "3BX4"
        }
    ],
    image_info: "",
    img_desc: "右后门外侧-5CM以内凹坑",
    pic_car_check_place: "https://c3.xinstatic.com/o/20220626/1836/62b836a81ab4a637554_20.jpg",
    pic_desc: "右后门外侧-5CM以内凹坑",
}]