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

@chaoswise/ui

v2.6.9

Published

公共UI库

Downloads

560

Readme

项目名称

前端公共组件库

一句话了解我

基于antd3.x根据公司UIUE规范进行二次封装的前端公共组件库,用于统一公司产品风格,提高研发人员开发效率

Features

1. 包含符合UIUE设计规范的公共组件,设计规范和使用规范参考YXD-用户体验设计平台

2. 支持antd全部组件,引用和使用方法参考antd官方文档

3. 支持按需加载

分支说明

master: 主分支 develop: 开发分支 基于develop分支开发,然后提交MR到仓库中

组件开发文档

使用方法

安装

npm i @chaoswise/ui -S

常规组件使用

// antd组件和自定义组件全部使用按需引入形式
import { Button } from '@chaoswise/ui';

const Demo = () => {
  return (
    <Button type='primary'>Submit</Button>
  )
}

export default Demo;

Formily组件使用

// 目前已经集成以下组件和api
import { Form, FormItem, MegaLayout, FieldList, FormButtonGroup, FormPath, Reset, Submit, subscribeFields } from '@chaoswise/ui/formily';
// 如需使用formily相关其它api 从formily引入
import { formily } from '@chaoswise/ui/formily';
const { useEffect } = formily;

脱离公共框架使用需要配置按需引用配置

修改babel-loader下的babel-plugin-import插件配置(脱离公共框架独立使用)

// 引入配置
const babelConfig = require("@chaoswise/ui/config/babel");
const formilyBabel = require("@chaoswise/ui/config/babel/formily");

// 方案1
plugins: [
    [
      "import",
      [
        babelConfig, // @chaoswise/ui 按需引入babel配置
        {
          libraryName: "antd",
          style: true
        },
        formilyBabel, // @chaoswise/ui/formily 按需引入babel配置
      ]
    ]
 ]
 
 
// 方案2
plugins: [
    [
        "import",
         babelConfig, // @chaoswise/ui 按需引入babel配置
         "chaoswise"
    ],
    [
        "import",
        {
          libraryName: "antd",
          style: true
        },
        "antd"
    ],
    [
      "import",
      formilyBabel, // @chaoswise/ui/formily 按需引入babel配置
      "formily"
    ],
 ]

注意:

以下组件基于antd进行了二次封装,请查看相关组件文档

组件名称 | 备注 ---|--- Pagination | 统一UE风格,api不变 Modal | 支持可拖拽 Upload | 基于antd的Upload封装,增加进度条显示,api有变化,具体见文档 ConfigProvider | 在原有基础上增加国际化切换方案 Empty | 统一UE风格,api不变

如需引用antd原生组件

import Upload from '@chaoswise/ui/lib/Antd/Upload';

其它相关文档

  1. 组件预览以及文档地址
  2. 更新日志