markdown-editor-preview
Version:
基于Vue3和TypeScript的Markdown预览编辑器,支持双向滚动同步、代码高亮和自定义渲染器,提供流畅的编辑和预览体验
60 lines (59 loc) • 2.13 kB
TypeScript
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
interface Props {
direction?: "horizontal" | "vertical";
disabled?: boolean;
defaultSize?: number | string;
size?: number | string;
min?: number | string;
max?: number | string;
resizeTriggerSize?: number;
watchProps?: Array<"defaultSize">;
pane1Class?: string;
pane1Style?: string | Record<string, string>;
pane2Class?: string;
pane2Style?: string | Record<string, string>;
onDragStart?: (e: MouseEvent) => void;
onDragMove?: (e: MouseEvent) => void;
onDragEnd?: (e: MouseEvent) => void;
onUpdateSize?: (size: number | string) => void;
}
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: {
'1'?(_: {}): any;
'resize-trigger'?(_: {}): any;
'2'?(_: {}): any;
};
refs: {
resizeTriggerElRef: HTMLDivElement;
};
rootEl: HTMLDivElement;
};
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
"update:size": (...args: any[]) => void;
"drag-start": (...args: any[]) => void;
"drag-move": (...args: any[]) => void;
"drag-end": (...args: any[]) => void;
}, string, PublicProps, Readonly<Props> & Readonly<{
"onUpdate:size"?: ((...args: any[]) => any) | undefined;
"onDrag-start"?: ((...args: any[]) => any) | undefined;
"onDrag-move"?: ((...args: any[]) => any) | undefined;
"onDrag-end"?: ((...args: any[]) => any) | undefined;
}>, {
defaultSize: number | string;
direction: "horizontal" | "vertical";
disabled: boolean;
min: number | string;
max: number | string;
resizeTriggerSize: number;
}, {}, {}, {}, string, ComponentProvideOptions, false, {
resizeTriggerElRef: HTMLDivElement;
}, HTMLDivElement>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};