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 🙏

© 2026 – Pkg Stats / Ryan Hefner

eco-image-picker

v2.0.7-beta.2

Published

基于react的移动端图片/文件上传组件

Downloads

383

Readme

eco-image-picker

npm GitHub

基于 react 扩展的移动端图片/文件上传、预览组件

查看文档和示例

使用

npm 或 yarn 安装

npm install eco-image-picker
# or
yarn add eco-image-picker

示例

import React, { useState } from 'react';
import { ImagePicker } from 'eco-image-picker';

type FileItem = {
  url: string, // 图片url
  loading?: boolean, // 图片是否加载中
  errorTip?: string, // 错误提示
  name?: string, // 文件说明
  fileName?: string, // 文件名称,包含后缀
  [index: string]: any
};

export default () => {
  const [value, setValue] = useState<FileItem[]>([]);

  // 数组改变
  const onChange = (arr: FileItem[]) => setValue(arr);

  return <ImagePicker value={value} onChange={onChange} />;
};

对应版本

| eco-image-picker | antd-mobile | | ---------------- | ----------- | | v1.x | v2.x | | v2.x | 不依赖 |

API

第三方插件

贡献

commit 格式

  • 格式
type(scope?): subject
  • 示例
chore: run tests on travis ci
fix(server): send cors headers
feat(blog): add comment section
  • type

| 值 | 说明 | | -------- | -------------------------------------------------------------------------------- | | build | 影响构建系统或外部依赖项的更新(示例范围:gulp, broccoli, npm) | | ci | 对 CI 配置文件和脚本的更改(例如 scopes: Travis, Circle, BrowserStack, SauceLabs) | | chore | 其他不修改 src 或测试文件的更改 | | docs | 只改变文档 | | feat | 新功能 | | fix | bug 修复 | | perf | 改进性能的代码更改 | | refactor | 既不修复 bug 也不添加新功能的代码更改 | | revert | 还原以前的提交 | | style | 不影响代码含义的更改(white-space、格式、缺少分号等) | | test | 添加缺失的测试或纠正现有的测试 |

  • 使用 cz 生成

格式参考 What is commitlint

原来使用 git commit -m "xx" 改为以下命令(交互方式填写提交信息):

yarn commit

npm run commit