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

fui-uikit

v1.0.0

Published

## 安装 需要先连公司 VPN,然后使用公司私有 npm 包源 http://npm.yonghuivip.com,再执行以下脚本进行安装 ```bash npm install @fui/bs ```

Downloads

2

Readme

财务中台 UIKit

安装

需要先连公司 VPN,然后使用公司私有 npm 包源 http://npm.yonghuivip.com,再执行以下脚本进行安装

npm install @fui/bs

使用方法

引用方式:

import { CommonTable, FormItemGroup }  from '@fui/bs';

或者

import UIKit from '@fui/bs';
const { CommonTable, FormItemGroup } = UIKit;

支持按需引用

import CommonTable from '@fui/bs/lib/CommonTable';
import FormItemGroup from '@fui/bs/lib/FormItemGroup';

组件示例展示

1. CommonTable组件说明

CommonTable组件示例

示例代码

import React, { Component } from 'react'
import { CommonTable } from '@/components'

export default class Basic extends Component {
    static propTypes = {}

    commonTableRef = {}

    columns = [
        {
            title: '姓名',
            dataIndex: 'name',
            key: 'name',
        },
        {
            title: '年龄',
            dataIndex: 'age',
            key: 'age',
        },
        {
            title: '爱好',
            dataIndex: 'habit',
            key: 'habit',
        },
        {
            title: '性别',
            dataIndex: 'sex',
            key: 'sex',
        },
        {
            title: '住址',
            dataIndex: 'address',
            key: 'address',
        },
    ]

    render() {
        const tableProps = {
            url: 'xxxxxx',
            isGeneralParamsFormat: true,
            isShowSetTableColumns: true,
            method: 'POST',
            columns: this.columns,
            refCallback: ref => {
                this.commonTableRef = ref
            },
            search: {
                datas: [
                    {
                        name: 'name',
                        type: 'input',
                        formProps: {
                            label: '姓名',
                        },
                    },
                    {
                        name: 'age',
                        type: 'input',
                        formProps: {
                            label: '年龄',
                        },
                    },
                ],
            },
        }

        return <CommonTable {...tableProps} />
    }
}

CommonTable组件文档


2. FormItemGroup组件说明

FormItemGroup组件示例

示例代码

import React from 'react'
import { Form, Row, Col, Button } from 'antd'
import PropTypes from 'prop-types'

import { FormItemGroup } from '@/components'
import './index.less'
class Basic extends React.Component {
    static propTypes = {
        form: PropTypes.shape({
            current: PropTypes.shape({}),
        }).isRequired,
    }

    formRef = React.createRef()

    handleSave = async () => {
        try {
            await this.formRef.current.validateFields()
        } catch (e) {
            console.log('[表单报错]', e)
        }
    }

    render() {
        const items = [
            {
                name: 'name',
                label: '姓名',
                type: 'input',
                rules: [{ required: true }],
            },
            {
                name: 'age',
                label: '年龄',
                type: 'inputNumber',
                rules: [{ required: true }],
            },
            {
                name: 'sex',
                label: '性别',
                type: 'select',
                data: [
                    {
                        label: '男',
                        value: 1,
                    },
                    {
                        label: '女',
                        value: 2,
                    },
                ],
                rules: [{ required: true }],
            },
            {
                name: 'city',
                label: '所在城市',
                type: 'select',
                data: [
                    { label: '上海', value: 'shanghai' },
                    { label: '北京', value: 'beijing' },
                ],
                rules: [{ required: true }],
            },
            {
                name: 'date',
                label: '提交日期',
                type: 'date',
                rules: [{ required: true }],
            },
            {
                name: 'customer',
                label: '自定义组件',
                render: () => <span>我是自定义组件</span>,
            },
        ]

        const form = this.formRef.current

        return (
            <div className="basic">
                <Form ref={this.formRef} name="basic" form={form} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
                    <FormItemGroup items={items} cols={2} layout={8} form={this.props.form} />

                    <Row justify="center">
                        <Col>
                            <Button type="primary" onClick={this.handleSave}>
                                保存
                            </Button>
                        </Col>
                    </Row>
                </Form>
            </div>
        )
    }
}

export default Basic

FormItemGroup组件文档