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

antd-bonree-test

v0.1.7

Published

An enterprise-class UI design language and React components implementation

Downloads

15

Readme

博睿组件

ant-design 仓库 master 分支保存同步

开发

主要文件目录

├── components    # 组件源码和demo
├── docs          # 文档markdown内容
├── site          # 文档网站布局和代码
└── package.json

本地开发

windows 环境不要使用 power shell

$ npm install
$ npm run start

npm install 时 node-gyp 报错解决方案:

  1. mac 环境报错

    点击查看解决方案

    如何查看 npm 全局安装路径

  2. windows 环境下 node-gyp 提示要安装 Python

    Run CMD as Administrator:
    npm --add-python-to-path='true' install --global windows-build-tools

    如果安装 windows-build-tools 失败,可以尝试安装 python

代码规范

基本原则: 多覆盖,少修改

样式改动

4.17.0 及以上版本代码中存在两套主题 less 文件,npm run build打包时使用components\style\themes\default.less,但npm run start则是使用components\style\themes\variable.less.

  • 所有样式改动只能注释源代码再新增代码

    • css 或者 less 语言缺乏逻辑性,但是互相耦合性又极强,保留源代码可以方便以后进行 debug
  • components\style\themes\index.less中配置主题

    • 不要对components\style\themes\default.less做任何改动
    • 不要对components\style\themes\variable.less做任何改动
    • 如果需要覆盖原有 less 变量,必须重新赋值
    • 如果需要新增 less 变量,必须以br-开头命名变量
    • less 变量必须要有注释
    • 全局元素样式增加在文件底部
    //  全局主色
    @primary-color: #00ccd9;
    //  页面、按钮文字颜色
    @text-color: #4e4e4e;
    //  字体最大
    @br-font-size-largest: 16px;
    //  主要用于页面卡片
    @br-border-radius-lg: 5px;
  • 组件样式改动

    • 不要修改源代码,不要改变代码结构
    • 不要修改源代码,不要改变代码结构
    • 不要修改源代码,不要改变代码结构
    • 必须使用注释源码,新增代码方式修改组件样式文件

组件逻辑改动

参照官方要求Code convention for antd

文档和 demo 改动

参照官方要求Configuration for Documentation and Demo

构建发布

$ npm run build
$ npm run pub

与 UI 规范的差别

select 组件

  • 搜索按钮
    • 规范:可以点击
    • 实际:不能点击
  • 清除按钮
    • 规范:一直显示
    • 实际:在输入框 hover 态才显示

常见问题

antd FAQ

form 表单校验错误提示没有实时同步国际化?

官方 issue

form 表单错误提示的中英文切换需要在项目代码中额外添加

useEff(() => {
  FormInstance.validateFields;
}, [i18n.local]);