UserListPage.tsx
735 Bytes
import { useState } from 'react'
import { Table } from 'antd'
import { PermButton } from '../../components/PermButton'
import UserFormDrawer from './UserFormDrawer'
export default function UserListPage() {
const [drawerOpen, setDrawerOpen] = useState(false)
return (
<div>
<div style={{ marginBottom: 16 }}>
<PermButton
permission="usr:create"
type="primary"
onClick={() => setDrawerOpen(true)}
>
新增
</PermButton>
</div>
<Table dataSource={[]} columns={[]} rowKey="sId" />
<UserFormDrawer
open={drawerOpen}
onClose={() => setDrawerOpen(false)}
onSuccess={() => setDrawerOpen(false)}
/>
</div>
)
}