🎉 first commit
This commit is contained in:
31
app/components/editor/editors/EditorProps.ts
Normal file
31
app/components/editor/editors/EditorProps.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* 编辑器组件的通用接口
|
||||
*/
|
||||
export interface EditorProps {
|
||||
/**
|
||||
* 被编辑的元素
|
||||
*/
|
||||
element: HTMLElement;
|
||||
|
||||
/**
|
||||
* 发送请求到 AI
|
||||
* @param prompt 提示词
|
||||
* @returns
|
||||
*/
|
||||
onSendPrompt: (prompt: string, element: HTMLElement) => Promise<void>;
|
||||
|
||||
/**
|
||||
* 关闭编辑器的回调函数
|
||||
*/
|
||||
onClose: () => void;
|
||||
|
||||
/**
|
||||
* 元素类型
|
||||
*/
|
||||
elementType: string;
|
||||
|
||||
/**
|
||||
* 对话框标题
|
||||
*/
|
||||
title?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user