UNPKG

element-plus

Version:

A Component Library for Vue 3

80 lines (79 loc) 3.16 kB
import type { ExtractPublicPropTypes } from 'vue'; import type Watermark from './watermark.vue'; export interface WatermarkFontType { color?: string; fontSize?: number | string; fontWeight?: 'normal' | 'light' | 'weight' | number; fontStyle?: 'none' | 'normal' | 'italic' | 'oblique'; fontFamily?: string; fontGap?: number; textAlign?: 'start' | 'end' | 'left' | 'right' | 'center'; textBaseline?: 'top' | 'hanging' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom'; } export interface WatermarkProps { /** * @description The z-index of the appended watermark element */ zIndex?: number; /** * @description The rotation angle of the watermark */ rotate?: number; /** * @description The width of the watermark */ width?: number; /** * @description The height of the watermark */ height?: number; /** * @description Image source, it is recommended to export 2x or 3x image, high priority (support base64 format) */ image?: string; /** * @description Watermark text content */ content?: string | string[]; /** * @description Text style */ font?: WatermarkFontType; /** * @description The spacing between watermarks */ gap?: [number, number]; /** * @description The offset of the watermark from the upper left corner of the container. The default is gap/2 */ offset?: [number, number]; } /** * @deprecated Removed after 3.0.0, Use `WatermarkProps` instead. */ export declare const watermarkProps: { readonly zIndex: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 9, boolean>; readonly rotate: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, -22, boolean>; readonly width: NumberConstructor; readonly height: NumberConstructor; readonly image: StringConstructor; readonly content: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | string[]) | (() => string | string[]) | ((new (...args: any[]) => string | string[]) | (() => string | string[]))[], unknown, unknown, "Element Plus", boolean>; readonly font: { readonly type: import("vue").PropType<WatermarkFontType>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly gap: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => [number, number]) | (() => [number, number]) | ((new (...args: any[]) => [number, number]) | (() => [number, number]))[], unknown, unknown, () => number[], boolean>; readonly offset: { readonly type: import("vue").PropType<[number, number]>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; }; /** * @deprecated Removed after 3.0.0, Use `WatermarkProps` instead. */ export type WatermarkPropsPublic = ExtractPublicPropTypes<typeof watermarkProps>; export type WatermarkInstance = InstanceType<typeof Watermark> & unknown;