UNPKG

myprint-design

Version:

操作简单,组件丰富的一站式打印解决方案打印设计器

73 lines (72 loc) 5.37 kB
import { Container, elementType, FormatterVariable, MyElement, MyHtmlElement, PageUnit, Panel, Point, PointLabel, PreviewWrapper, Provider, TableCellElement } from '../types/entity'; import { CSSProperties, Ref } from 'vue-demi'; export declare function displayDesign(element: MyElement): boolean; export declare function displayPreview(element: MyElement): boolean; export declare function setCurrentPanel(panel: Panel): void; export declare function getCurrentPanel(panel?: Panel): Panel; export declare function setPreviewData(previewData?: any[]): void; export declare function getPreviewData(): any[]; export declare function setProvider(provider?: Provider): void; export declare function getProvider(): Provider; export declare function getRecursionParentPanel(element: MyElement): Panel; export declare function getCurrentPanelUnit(panel?: Panel): PageUnit; export declare function setCurrentElement(element: MyElement[]): void; export declare function valueUnit(value: number | undefined, panel?: Panel): string; export declare function widthValueUnit(element: MyElement): string; export declare function heightValueUnit(element: MyElement): string; export declare function getPositionX(element: MyElement): number; export declare function getPositionY(element: MyElement): number; export declare function width(element: MyElement): number; export declare function height(element: MyElement): number; export declare function clearPanel(panel: Panel): void; export declare function initPanel(panel: Panel, provider: Ref<Provider>): void; export declare function none(element?: MyElement): void; export declare function handle(element: Container): void; export declare function recursionForElement(container: Panel, callback: (element: MyElement) => void): void; export declare function recursionElement(container: Container, callback: (element: MyElement) => void): void; export declare function innerElementIs(point: Point, element: MyElement, parentElement: MyElement): boolean; export declare function parentInitElement(panel: Panel, parent: Container, element: MyElement, index: number): void; export declare function initElement(panel: Panel, element: MyElement, index: number): void; export declare function elementGroup(htmlElementList: Array<MyHtmlElement>): void; export declare function groupListToMap(groupList: string[][]): Record<string, number>; export declare function elementUngroup(htmlElementList: Array<MyHtmlElement>): void; export declare function elementDown(elementList: MyElement[], layer: number): void; export declare function elementUp(elementList: MyElement[], layer: number): void; export declare function element2PreviewWrapper(element: MyElement | PreviewWrapper): PreviewWrapper; export declare function installPanelParentElement(panel: Panel): void; export declare function installListParentElement(parent: Container, elementList?: Array<MyElement>): void; export declare function installParentElement(parent?: Container, element?: MyElement): void; export declare function clearParent(element: MyElement): void; export declare function addElement(panel: Panel, parent: Container, element: MyElement): void; export declare function removeElement(element: MyElement): void; export declare function handleElementType(element: Container): { handle(type: elementType, callback: () => void): any; pageHeader(callback: () => void): any; pageFooter(callback: () => void): any; end(callback: () => void): void; }; export declare function defaultPreviewData(previewData: any): any; export declare function elementCommonPositionStyle(element: MyElement): CSSProperties; export declare function elementBarCodeValueStyle(element: MyElement, cssStyle?: CSSProperties): CSSProperties; export declare function elementCommonStyle(element: MyElement, cssStyle?: CSSProperties): CSSProperties; export declare function isPageHeader(element: Container): boolean; export declare function isPageFooter(element: Container): boolean; export declare function formatter(element: MyElement, variable?: FormatterVariable): string; export declare function extractVariableNames(template: string): string[]; export declare function replaceVariables(str: string, params: { [key: string]: any; }): string; export declare function changePageSize(val?: any): void; export declare function changePageUnit(): void; export declare function computedShapeBound(points: Array<PointLabel>): Container; export declare function setElementWidthHeightPx(width: number, height: number, element: MyElement): void; export declare function setElementWidthPx(width: number, element: MyElement): void; export declare function setElementHeightPx(height: number, element: MyElement): void; export declare function setElementOffsetWidthPx(offsetWidth: number, element: MyElement): void; export declare function recursionUpdateCellParentWidth(columnElement: TableCellElement, offsetX: number, panel: Panel): void; export declare function recursionUpdateCellParentInitWidth(columnElement: TableCellElement): void; export declare function multipleElementGetValueList(props: string): unknown[]; export declare function multipleElementGetValue(props: string): any; export declare function multipleElementSetValue(props: string, val: any): void; export declare function autoComputedPanelHeight(): void; export declare function getPrintRealHeight(panel?: Panel): number;