UNPKG

@knockout-js/org

Version:
61 lines (60 loc) 1.5 kB
import { ModalProps } from 'antd'; import { SearchProps } from "antd/lib/input"; import { Org } from '@knockout-js/api/ucenter'; import { ProTableProps } from '@ant-design/pro-components'; declare enum OrgKind { Org = "org", Root = "root" } export interface OrgSelectLocale { placeholder: string; title: string; } export interface OrgSelectProps { /** * 值 */ value?: Org | Org['id']; /** * 禁用 */ disabled?: boolean; /** * 根据orgId过滤pathHasPrefix */ orgId?: string; /** * appId授权的组织列表 */ appId?: string; /** * 类型 */ kind: OrgKind; /** * ant SearchProps api */ searchProps?: SearchProps; /** * ant ModalProps api */ modalProps?: ModalProps; /** * ProTable api */ proTableProps?: ProTableProps<Org, Record<string, any>, 'text'>; /** * 有缓存列表可以快速提供初始化值配合value传入的是id处理 */ dataSource?: Org[]; /** * changeValue=id: onChange的第一个参数值就为id的值 */ changeValue?: keyof Org; /** * 值变更事件 (value?: Org[keyof Org] | Org, original?: Org) => void; */ onChange?: (value?: Org[keyof Org] | Org, original?: Org) => void; } declare const OrgSelect: (props: OrgSelectProps) => import("react/jsx-runtime").JSX.Element; export default OrgSelect;