@vuux/editor
Version:
Vue Nuxt 富文本编辑器
42 lines (41 loc) • 1.31 kB
TypeScript
import { Ref } from 'vue';
import { List, Panel, TopProps } from '../../types';
/**
* 菜单Hook
*
* @param props 组件属性
* @param topRef 实例
* @param fileInputRef 实例
* @param emits 组件事件
*/
export declare const useTop: (props: TopProps, topRef: Ref<HTMLDivElement | null>, fileInputRef: Ref<HTMLInputElement | null>, emits: (event: "success" | "error" | "full", ...args: any[]) => void) => {
state: {
color: string;
isUploadIng: boolean;
percent: number;
imageUrl: string;
rows: number;
cols: number;
isFull: boolean;
};
dropdowns: {
color: boolean;
heading: boolean;
size: boolean;
panel: boolean;
list: boolean;
image: boolean;
table: boolean;
};
toggleDropdown: (key: "table" | "image" | "color" | "size" | "heading" | "panel" | "list") => void;
onColor: () => void;
handleSelectHeading: (level: 1 | 2 | 3 | 4) => void;
handleSelectePanelValue: (type: Panel) => void;
handleSelectSizeValue: (size: number) => void;
handleSelectListValue: (type: List) => void;
handleInsertImage: () => void;
handleFileChange: () => void;
handleFileUpload: () => void;
handeInsertTable: () => void;
handleFull: () => void;
};