UNPKG

@ithinkdt/naive

Version:

iThinkDT Naive UI

350 lines (300 loc) 10.3 kB
export * from './frame' export * from './components/Form' export * from './components/Table' export * from './components/Pagin' export * from './components/Radios' export * from './components/Checkboxs' export * from './components/Files' export * from './components/ImportBtn' export * from './components/Selection' export * from './components/IconSelect' export * from './components/UserDept' export * from './components/Suffix' export * from './components/TreeInput' export * from './components/ArrayInput' export * from './components/CustomColumns' export * from './directives' export {} declare module 'vue' { export interface AllowedComponentProps { // eslint-disable-next-line @typescript-eslint/no-explicit-any onClick?(e: MouseEvent): any } } declare module 'vue-router' { export interface RouteMeta { hideWatermark?: boolean } export interface RouterLinkProps { target?: '_blank' | '_self' | '_parent' | '_top' } } import { GlobalThemeOverrides, WatermarkProps, DrawerProps, DrawerContentProps, CardProps, ButtonProps, DialogOptions as NDialogOptions, DialogReactive as NDialogReactive, NotificationOptions as NNotificationOptions, NotificationReactive as NNotificationReactive, } from 'ithinkdt-ui' import { DtFormProps } from './components/Form' import { TooltipDirectiveOptions } from './directives' declare module '@ithinkdt/core' { type NaiveThemeCommonVars = NonNullable<GlobalThemeOverrides['common']> type MenuIcon = import('vue').Component | import('vue').FunctionalComponent type MenuIconLoader = (name: string) => MenuIcon | undefined | Promise<MenuIcon | undefined> interface PageTheme { _vars: (isDark: boolean) => Partial<import('@ithinkdt/core').ThemeVars> _naiveThemeOverrides: (isDark: boolean) => PageTheme['naiveThemeOverrides'] _watermark: (ops: { isDark: boolean user: import('@ithinkdt/core').UserInfo | undefined app: import('@ithinkdt/core').AppInfo | undefined }) => void | undefined | false | WatermarkProps showChangePwd: boolean usernamePlacement: 'outlet' | 'dropdown' logoutPlacement: 'outlet' | 'dropdown' | 'none' accordionMenu: boolean naiveThemeOverrides: Omit<GlobalThemeOverrides, 'common'> menuIconLoader: MenuIconLoader watermark: undefined | false | WatermarkProps } interface ThemeVars extends NaiveThemeCommonVars {} interface TooltipDirectiveProps extends TooltipDirectiveOptions {} interface ModalDrawerOptions extends DrawerProps, DrawerContentProps {} interface ModalDialogOptions extends Pick< CardProps, | 'contentClass' | 'contentStyle' | 'headerClass' | 'headerStyle' | 'footerClass' | 'footerStyle' | 'segmented' > { nativeScrollbar?: boolean } // eslint-disable-next-line @typescript-eslint/no-unused-vars interface UseModalAction<Model extends BaseEntity> extends Omit<ButtonProps, 'onClick' | 'text'> { tip?: TooltipDirectiveOptions } // eslint-disable-next-line @typescript-eslint/no-unused-vars interface _DataOpBtnType { default: true tertiary: true primary: true info: true success: true warning: true error: true } interface DialogOptions extends NDialogOptions {} interface DialogReturn extends NDialogReactive {} interface NotificationOptions extends NNotificationOptions {} interface NotificationReturn extends NNotificationReactive {} type _GridItemProps = import('ithinkdt-ui').GridItemProps type _FormItemProps = import('ithinkdt-ui').FormItemProps interface FormItemSchema<Entity extends {}> extends Omit<_GridItemProps, 'span'>, Omit<_FormItemProps, 'label' | 'required' | 'rule'> { __m?: Entity } type _VNode = import('vue').VNodeChild type _DateType = import('ithinkdt-ui').DatePickerProps['type'] interface FormTypeSchema { input: { props: Omit<import('ithinkdt-ui').InputProps, 'pair'> param: number | `${number}~${number}` | `~${number}` valueType?: string inst: {} slots?: { prefix?: () => _VNode suffix?: () => _VNode count?: () => _VNode clearIcon?: () => _VNode passwordInvisibleIcon?: () => _VNode passwordVisibleIcon?: () => _VNode } } text: FormTypeSchema['input'] number: { props: import('ithinkdt-ui').InputNumberProps param: number | `${number}~${number}` | `~${number}` valueType?: number inst: {} slots?: { prefix?: () => _VNode suffix?: () => _VNode addIcon?: () => _VNode minusIcon?: () => _VNode } } int: FormTypeSchema['number'] select: { props: import('ithinkdt-ui').SelectProps & { multiple?: never } param: string valueType?: string inst: {} slots?: { action?: () => _VNode empty?: () => _VNode arrow?: () => _VNode } } selects: { props: import('ithinkdt-ui').SelectProps & { multiple?: never } param: string valueType?: string[] inst: {} slots?: { action?: () => _VNode empty?: () => _VNode arrow?: () => _VNode } } datepicker: { props: import('ithinkdt-ui').DatePickerProps param: _DateType valueType?: number | [number, number] inst: {} slots?: { footer?: () => _VNode dateIcon?: () => _VNode nextMonth?: () => _VNode nextYear?: () => _VNode prevMonth?: () => _VNode prevYear?: () => _VNode separator?: () => _VNode } } timepicker: { props: import('ithinkdt-ui').TimePickerProps param: never valueType?: number inst: {} slots?: { icon?: () => _VNode } } radio: { props: import('ithinkdt-ui').RadioProps param: never valueType?: string | number slots?: {} inst: {} } radios: { props: import('./components/Radios').RadiosProps param: string valueType?: string | number slots?: {} inst: {} } checkbox: { props: import('ithinkdt-ui').CheckboxProps param: never valueType?: boolean | string | number slots?: {} inst: {} } checkboxs: { props: import('./components/Checkboxs').CheckboxsProps param: string valueType?: string[] | number[] slots?: {} inst: {} } switch: { props: import('ithinkdt-ui').SwitchProps param: never valueType?: boolean | string | number slots?: {} inst: {} } upload: { props: import('ithinkdt-ui').UploadProps param: number valueType?: import('ithinkdt-ui').UploadFileInfo[] slots?: {} inst: {} } file: { props: import('ithinkdt-ui').UploadProps param: number valueType?: string slots?: {} inst: {} } image: FormTypeSchema['file'] icon: { props: import('./components/IconSelect').IconSelectProps param: never valueType?: import('./components/IconSelect').FormIcon slots?: {} inst: {} } user: { props: import('./components/UserDept').UserDeptProps & { multiple?: false; type?: 'user' } param: 'dropdown' | 'transfer' valueType?: string inst: {} slots?: {} } users: { props: import('./components/UserDept').UserDeptProps & { multiple?: true; type?: 'user' } param: 'dropdown' | 'transfer' valueType?: string[] inst: {} slots?: {} } dept: { props: import('./components/UserDept').UserDeptProps & { multiple?: false; type?: 'dept' } param: 'dropdown' | 'transfer' valueType?: string inst: {} slots?: {} } depts: { props: import('./components/UserDept').UserDeptProps & { multiple?: true; type?: 'dept' } param: 'dropdown' | 'transfer' valueType?: string[] inst: {} slots?: {} } } type _FormInst = import('ithinkdt-ui').FormInst interface DtFormInst extends _FormInst {} interface TableColumnBase<Model> extends Pick< import('ithinkdt-ui').DataTableBaseColumn<Model>, 'ellipsis' | 'className' | 'cellProps' | 'colSpan' | 'rowSpan' | 'titleColSpan' | 'titleAlign' | 'tree' > {} type _TableInst = import('ithinkdt-ui').DataTableInst interface DtTableInst extends _TableInst {} // eslint-disable-next-line @typescript-eslint/no-unused-vars interface BaseUseFormModalOptions<Model extends BaseEntity> extends Pick< DtFormProps, | 'inline' | 'size' | 'showColon' | 'labelWidth' | 'labelAlign' | 'labelPlacement' | 'showRequireMark' | 'requireMarkPlacement' | 'showFeedback' | 'showLabel' | 'layoutShiftDisabled' | 'responsive' | 'itemResponsive' | 'itemStyle' | 'xGap' | 'yGap' > {} }