jiaqingjiayi-xiaochengxu/甲情_甲意/node_modules/antd-mini/less/RareWordsKeyboard/props.d.ts
2024-11-15 11:51:28 +08:00

77 lines
1.8 KiB
TypeScript

import { IBaseProps } from '../_util/base';
export interface ICommonError {
detail: Error;
errorCode: string;
message: string;
onRetry?: () => Promise<void>;
}
export declare enum InputTypes {
stroke = "stroke",
pinyin = "pinyin",
handwriting = "handwriting"
}
export interface IPinYinMapItem {
label: string;
value: string;
extraClassName?: string;
}
export interface IWordsItem {
charId?: string;
unicodeChar: string;
unicodeCodePoint: string;
unicodeFont: string | null;
pinYinChars: string[];
splitChars: string[];
weight?: number | null;
type?: string;
extInfo?: string | null;
sort?: number;
}
export type IFilterType = 'pinyin' | 'split' | 'all';
export interface IWordsItem {
charId?: string;
unicodeChar: string;
unicodeCodePoint: string;
unicodeFont: string | null;
pinYinChars: string[];
splitChars: string[];
weight?: number | null;
type?: string;
extInfo?: string | null;
sort?: number;
}
export type IWordsData = IWordsItem[];
export interface IRareWordsKeyboardProps extends IBaseProps {
/**
* @title 是否可见
*/
visible?: boolean;
/**
* @title 键盘类型
*/
type?: InputTypes | string;
/**
* @title 是否展示蒙层
* @description 默认 true
*/
showMask?: boolean;
/**
* @description 安全距离
* @default true
*/
safeArea?: boolean;
/**
* @title 关闭的时候触发的回调
*/
onClose?: () => void;
/**
* @title 输入完成的时候触发的回调
*/
onChange?: (value: string) => void;
/**
* @title 组件错误的时候的回调
*/
onError?: (err: Error) => void;
}
export declare const RareWordsKeyboardProps: Partial<IRareWordsKeyboardProps>;