@zstark/permission-table
v1.1.0
Published
[![publish](https://github.com/PinghuaZhuang/permission-table/actions/workflows/publish.yml/badge.svg)](https://github.com/PinghuaZhuang/permission-table/actions/workflows/publish.yml) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https:
Downloads
2
Readme
Permission-Table
权限选择. 表格形式.
Example
🚀 Quick Start
import { useMemo } from 'react';
import PermissionTable from '@zstark/permission-table';
const App = () => {
const dataSource = useMemo(
() => ({
id: 0,
name: 'title1',
childList: [
{ id: 1, name: 'title2' },
{ id: 2, name: 'title3' },
],
}),
[],
);
return <PermissionTable dataSource={dataSource} onChange={console.log} />;
};
Props
- loading: boolean; loading 动效.
- value: Id[]; 一般用户 form 表单. 或者初始化选中.
- columns: { title: string }[]; 表头.
- onChange: (ids: Id[]) => void;