import './css/scrollbar.css'; import './css/style.css'; import type { DragableConfType } from './models/DraggableInterface'; import type { InitLogType } from './models/LogInterface'; import type { CommandType } from './models/CommandInterface'; import TerminalFlash from './TerminalFlash'; import TerminalAsk from './TerminalAsk'; import type { MessageType } from './models/MessageInterface'; export interface TerminalProps { /** 终端唯一名称 */ name?: string; /** 终端标题 */ title?: string; /** 初始化日志内容 */ initLog?: InitLogType; /** 上下文 */ context?: string; /** 命令行搜索以及help指令用 */ commandStore?: CommandType[]; /** 命令行排序方式 */ commandStoreSort?: (a: CommandType, b: CommandType) => number; /** 是否开启命令提示 */ enableExampleHint?: boolean; /** 输入过滤器 */ inputFilter?: (value: string) => string; /** * 命令显示格式化函数,一般用于输入命令高亮显示,传入当前命令返回新的命令,支持html。 * 如果不设置将使用内部定义的高亮样式 */ commandFormatter?: (cmd: string) => string; /** 按下Tab键处理函数 */ tabKeyHandler?: (e: KeyboardEvent) => void; /** 记录条数超出此限制会发出警告 */ warnLogCountLimit?: number; /** 自动搜索帮助 */ autoHelp?: boolean; /** 显示终端头部 */ showHeader?: boolean; /** 拖拽配置 */ dragConf?: DragableConfType; } declare const _default: __VLS_WithTemplateSlots, { name: string; title: string; showHeader: boolean; initLog: () => InitLogType; context: string; warnLogCountLimit: number; autoHelp: boolean; enableExampleHint: boolean; }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { click: (key: string, name: string) => void; } & { onClick: (key: string, name: string) => void; } & { keydown: (event: KeyboardEvent, name: string) => void; } & { onKeydown: (event: KeyboardEvent, name: string) => void; } & { beforeExecCmd: (cmdKey: string, cmdValue: string, name: string) => void; } & { execCmd: (cmdKey: string, cmdValue: string, success: (message: MessageType | TerminalFlash | TerminalAsk) => void, failed: (msg: string) => void, name: string) => void; } & { destroyed: (name: string) => void; } & { initBefore: (name: string) => void; } & { initComplete: (name: string) => void; }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly, { name: string; title: string; showHeader: boolean; initLog: () => InitLogType; context: string; warnLogCountLimit: number; autoHelp: boolean; enableExampleHint: boolean; }>>> & { onKeydown?: ((event: KeyboardEvent, name: string) => any) | undefined; onClick?: ((key: string, name: string) => any) | undefined; onOnKeydown?: ((event: KeyboardEvent, name: string) => any) | undefined; onOnClick?: ((key: string, name: string) => any) | undefined; onBeforeExecCmd?: ((cmdKey: string, cmdValue: string, name: string) => any) | undefined; onExecCmd?: ((cmdKey: string, cmdValue: string, success: (message: MessageType | TerminalFlash | TerminalAsk) => void, failed: (msg: string) => void, name: string) => any) | undefined; onDestroyed?: ((name: string) => any) | undefined; onInitBefore?: ((name: string) => any) | undefined; onInitComplete?: ((name: string) => any) | undefined; }, { title: string; showHeader: boolean; name: string; initLog: InitLogType; context: string; enableExampleHint: boolean; warnLogCountLimit: number; autoHelp: boolean; }>, { header: (_: {}) => any; normal: (_: { message: { time?: any; class?: "success" | "error" | "system" | "info" | "warning" | undefined; type?: "normal" | "json" | "code" | "table" | "cmdLine" | "splitLine" | "html" | undefined; content: any; tag?: any; depth?: number | undefined; }; }) => any; json: (_: { message: { time?: any; class?: "success" | "error" | "system" | "info" | "warning" | undefined; type?: "normal" | "json" | "code" | "table" | "cmdLine" | "splitLine" | "html" | undefined; content: any; tag?: any; depth?: number | undefined; }; }) => any; code: (_: { message: { time?: any; class?: "success" | "error" | "system" | "info" | "warning" | undefined; type?: "normal" | "json" | "code" | "table" | "cmdLine" | "splitLine" | "html" | undefined; content: any; tag?: any; depth?: number | undefined; }; }) => any; table: (_: { message: { time?: any; class?: "success" | "error" | "system" | "info" | "warning" | undefined; type?: "normal" | "json" | "code" | "table" | "cmdLine" | "splitLine" | "html" | undefined; content: any; tag?: any; depth?: number | undefined; }; }) => any; html: (_: { message: { time?: any; class?: "success" | "error" | "system" | "info" | "warning" | undefined; type?: "normal" | "json" | "code" | "table" | "cmdLine" | "splitLine" | "html" | undefined; content: any; tag?: any; depth?: number | undefined; }; }) => any; flash: (_: { content: string; }) => any; helpCmd: (_: { item: { key: string; title: string; group: string; usage: string; description: string; example: { cmd: string; des?: string | undefined; }[]; } | undefined; }) => any; helpBox: (_: { showHeader: boolean; item: { key: string; title: string; group: string; usage: string; description: string; example: { cmd: string; des?: string | undefined; }[]; } | undefined; }) => any; }>; export default _default; type __VLS_NonUndefinedable = T extends undefined ? never : T; type __VLS_TypePropsToRuntimeProps = { [K in keyof T]-?: {} extends Pick ? { type: import('vue').PropType<__VLS_NonUndefinedable>; } : { type: import('vue').PropType; required: true; }; }; type __VLS_WithDefaults = { [K in keyof Pick]: K extends keyof D ? P[K] & { default: D[K]; } : P[K]; }; type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; };