@mingyunsnpm/picker
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

picker

it is a react picker component.

使用示例:

import Picker from "@mingyunsnpm/picker";

const DATA = [
  {
    text: "小明",
    value: 1,
  },
  {
    text: "小红",
    value: 2,
  },
  {
    text: "小张",
    value: 3,
  },
  {
    text: "小王",
    value: 4,
  },
];

// 命令式调用
Picker.show({
  list: DATA,
  onConfirm(index) {
    console.log(index);
  },
});

// 或者申明式调用
<Picker
  show
  list={DATA}
  onConfirm={(index) => {
    console.log(index);
  }}
/>;

Readme

Keywords

Package Sidebar

Install

npm i @mingyunsnpm/picker

Weekly Downloads

1

Version

1.0.7

License

MIT

Unpacked Size

97.6 kB

Total Files

24

Last publish

Collaborators

  • mingyunsnpm