sm-component
TypeScript icon, indicating that this package has built-in type declarations

0.0.21 • Public • Published

Getting Started

yarn install sm-component

组件依赖ProFrom ProTable Antd

Demo

import { TablePiece } from "sm-component";
// 封装了一个上传按钮,外部自定义url 和上传成功逻辑
import { UploadBtn } from "sm-component";

import 'sm-component/dist/lib/index.css';

<TablePiece
  columns={[
    {
      title: "tttt",
      dataIndex: "ttt",
      width: "200",
      useSearch: true, // 放在搜索按钮 旁边的输入搜索项
    },
  ]}
  headerTitle={<UploadBtn />}
  tableActions={{
    column: { title: "TEst2222" }, // 操作栏的columns
    actions: [
      { key: "EDIT" }, // 内置两个按钮 配置一下就行
      { key: "DELETE" },
    ],
    // 事件
    onHandleActionClick: (key, record) => {
      console.log("props", key, record);
    },
  }}
/>;

Package Sidebar

Install

npm i sm-component

Weekly Downloads

1

Version

0.0.21

License

MIT

Unpacked Size

20.3 kB

Total Files

22

Last publish

Collaborators

  • pluto06