@dpdfe/antd-pinyin-select
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

antd-pinyin-select

二次封装 antd 的 Select 组件,支持拼音模糊搜索

安装

npm install --save @dpdfe/antd-pinyin-select babel-plugin-import

使用方式

  1. 正常使用,拥有完整 antd Select 定义

    import {Select} from '@dpdfe/antd-pinyin-select';

  2. 改造已有项目

    无需修改代码,在 babelrc 中更改 Select 的引入位置即可

    // file: babel.config.js
    {
        "plugins":[
            [
                "import",
                {
                    "libraryName": "antd-pinyin-select",
                    "style": true,
                    customName: (name, file) => {
    
                        if (name === 'select') {
                            return '@dpdfe/antd-pinyin-select/es/select';
                        }
    
                        return `antd/es/${name}`;
                    },
                }
            ]
        ]
    }

更多

使用指南

Package Sidebar

Install

npm i @dpdfe/antd-pinyin-select

Weekly Downloads

8

Version

0.0.8

License

MIT

Unpacked Size

1.03 MB

Total Files

36

Last publish

Collaborators

  • pearone
  • superhui
  • yuki_xu
  • jjjkkkhhhggg
  • bh20077