@matechat/core
Version:
前端智能化场景解决方案UI库,轻松构建你的AI应用。
119 lines (118 loc) • 2.84 kB
TypeScript
import type { ExtractPropTypes, PropType, Ref } from "vue";
export declare enum DisplayType {
Simple = "simple",
Full = "full"
}
export declare enum InputVariant {
Bordered = "bordered",
BorderLess = "borderless"
}
export declare enum SendBtnVariant {
Simple = "simple",
Full = "full"
}
export declare enum SubmitShortKey {
Enter = "enter",
ShiftEnter = "shiftEnter"
}
export interface ThemeTagItem {
type: 'themeTag';
themeTagKey?: string;
themeTagText: string;
clearInput?: boolean;
popoverContent: string;
}
export interface TipTagOption {
tipTagKey?: string;
tipTagText: string;
clearInput?: boolean;
popoverContent: string;
}
export interface FormatTextItem {
type: 'text';
key: string;
content: string;
}
export interface FormatInputItem {
type: 'input';
key: string;
placeholder?: string;
content?: string;
}
export type FormatContentItem = FormatTextItem | FormatInputItem | ThemeTagItem;
export interface FormatContentOptions {
formatContent: FormatContentItem[];
}
export type TextareaAutoSize = {
minRows?: number;
maxRows?: number;
} | boolean;
export declare const DEFAULT_AUTOSIZE: {
minRows: number;
maxRows: number;
};
export declare const inputProps: {
value: {
type: StringConstructor;
default: string;
};
formatContentOptions: {
type: PropType<FormatContentOptions>;
default: () => void;
};
placeholder: {
type: StringConstructor;
};
disabled: {
type: BooleanConstructor;
default: boolean;
};
displayType: {
type: PropType<DisplayType>;
default: DisplayType;
};
variant: {
type: PropType<InputVariant>;
default: InputVariant;
};
sendBtnVariant: {
type: PropType<SendBtnVariant>;
default: SendBtnVariant;
};
loading: {
type: BooleanConstructor;
default: boolean;
};
showCount: {
type: BooleanConstructor;
default: boolean;
};
maxLength: {
type: NumberConstructor;
};
submitShortKey: {
type: PropType<SubmitShortKey | null>;
default: SubmitShortKey;
};
autofocus: {
type: BooleanConstructor;
default: boolean;
};
autosize: {
type: PropType<TextareaAutoSize>;
default: boolean;
};
autoClear: {
type: BooleanConstructor;
default: boolean;
};
};
export type InputProps = ExtractPropTypes<typeof inputProps>;
export interface InputContext {
inputValue: Ref<string>;
rootProps: InputProps;
rootEmits: (event: string, ...args: any[]) => void;
clearInputAfterSubmit: () => void;
}
export declare const inputEmits: string[];
export declare const inputInjectionKey = "mc-input";