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 🙏

© 2025 – Pkg Stats / Ryan Hefner

jxy-identity-popover

v2.1.12

Published

| Name | Description | Default | Control | |------|-------------|---------|---------| | labelType | 编码类型, sku:商品编码, spu:款式编码 | 'sku' | - | | onFeedbackSuccess | 反馈成功回调函数<br/>`() => void` | - | - | | onFeedbackError | 反馈失败回调函数<br/>`(error: unknown) => void

Readme

API

| Name | Description | Default | Control | |------|-------------|---------|---------| | labelType | 编码类型, sku:商品编码, spu:款式编码 | 'sku' | - | | onFeedbackSuccess | 反馈成功回调函数() => void | - | - | | onFeedbackError | 反馈失败回调函数(error: unknown) => void | - | - | | onSearchSuccess | 搜索成功回调函数(result: SearchResult[]) => void | - | - | | onSearchError | 搜索失败回调函数(error: unknown) => void | - | - | | onItemClick | 点击识别结果项的回调函数(item: SearchResult) => void | - | - | | onVideoInitialSuccess | 摄像头初始化成功回调函数() => void | - | - | | onVideoInitialError | 摄像头初始化失败回调函数(error: unknown) => void | - | - | | onUploadSuccess | 上传成功回调函数() => void | - | - | | onUploadError | 上传失败回调函数(error: unknown) => void | - | - |

SearchResult 类型定义

interface SearchResult {
  sku_id: string;        // 商品ID
  i_id: string;          // 图片ID
  pic: string;           // 图片URL
  prop_value: string;    // 属性值
  pic_id: string;        // 图片ID
  pic_hash: string;      // 图片哈希值
  is_spu_pic: boolean;   // 是否为SPU图片
  search_score: number;  // 搜索匹配度分数
}

ERPAIIdentityPopoverRef 类型定义

interface ERPAIIdentityPopoverRef {
  show: () => void;      // 显示弹层
  hide: () => void;      // 隐藏弹层
}

Demo

import {ERPAIIdentityPopover, type ERPAIIdentityPopoverRef,} from 'jxy-identity-popover';
 render: (args) => {
    const skuPopoverRef = useRef<ERPAIIdentityPopoverRef>(null);
    const spuPopoverRef = useRef<ERPAIIdentityPopoverRef>(null);

    return (
      <Space direction="vertical" size="middle">
        <Space>
          <Button
            onClick={() => {
              skuPopoverRef.current?.show();
            }}
          >
            打开商品编码识别
          </Button>
          <Button
            onClick={() => {
              spuPopoverRef.current?.show();
            }}
          >
            打开款式编码识别
          </Button>
        </Space>
        <ERPAIIdentityPopover
          ref={skuPopoverRef}
          onItemClick={(item) => console.log('点击结果项:', item)}
          onSearchSuccess={(result) => console.log('搜索成功:', result)}
          onSearchError={(error) => console.error('搜索失败:', error)}
          onVideoInitialSuccess={() => console.log('摄像头初始化成功')}
          onVideoInitialError={(error) => console.error('摄像头初始化失败:', error)}
          onUploadSuccess={() => console.log('上传成功')}
          onUploadError={(error) => console.error('上传失败:', error)}
          onFeedbackSuccess={() => console.log('反馈成功')}
          onFeedbackError={(error) => console.error('反馈失败:', error)}
          labelType="sku"
        />
        <ERPAIIdentityPopover
          ref={spuPopoverRef}
          onItemClick={(item) => console.log('点击结果项:', item)}
          onSearchSuccess={(result) => console.log('搜索成功:', result)}
          onSearchError={(error) => console.error('搜索失败:', error)}
          onVideoInitialSuccess={() => console.log('摄像头初始化成功')}
          onVideoInitialError={(error) => console.error('摄像头初始化失败:', error)}
          onUploadSuccess={() => console.log('上传成功')}
          onUploadError={(error) => console.error('上传失败:', error)}
          onFeedbackSuccess={() => console.log('反馈成功')}
          onFeedbackError={(error) => console.error('反馈失败:', error)}
          labelType="spu"
        />
      </Space>
    );
  }

组件临时调试说明

一、清理 HSTS

打开chrome ,进入 页面 chrome://net-internals/#hsts, 在Delete domain security policies 中输入 w.erp321.com, 点击Delete清除强制https

hosts添加解析

127.0.0.1 w.erp321.com

middleware中添加erp cookies