vue3-watermark-camera
Version:
A Vue 3 component for taking photos with watermark support
135 lines (133 loc) • 4.37 kB
TypeScript
import { WatermarkCameraProps, LocationResult } from '../types';
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<WatermarkCameraProps>, {
name: string;
company: string;
action: string;
amapKey: string;
watermarkConfig: () => {
showTime: boolean;
showLocation: boolean;
showName: boolean;
showCompany: boolean;
backgroundColor: string;
textColor: string;
fontSize: number;
height: number;
};
locationConfig: () => {
enableLocation: boolean;
locationProvider: string;
};
timeConfig: () => {
enableNetworkTime: boolean;
networkTimeUrl: string;
};
uploadConfig: () => {
enableAutoUpload: boolean;
};
cameraConfig: () => {
enableCamera: boolean;
};
}>>, {
takePhoto: () => Promise<void>;
deletePhoto: () => void;
getLocation: () => Promise<LocationResult>;
getNetworkTime: () => Promise<string>;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
"update:modelValue": (value: string) => void;
"upload-success": (data: any) => void;
"location-success": (location: LocationResult) => void;
"location-error": (error: any) => void;
"time-success": (time: string) => void;
"time-error": (error: any) => void;
"camera-success": (filePath: string) => void;
"camera-error": (error: any) => void;
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<WatermarkCameraProps>, {
name: string;
company: string;
action: string;
amapKey: string;
watermarkConfig: () => {
showTime: boolean;
showLocation: boolean;
showName: boolean;
showCompany: boolean;
backgroundColor: string;
textColor: string;
fontSize: number;
height: number;
};
locationConfig: () => {
enableLocation: boolean;
locationProvider: string;
};
timeConfig: () => {
enableNetworkTime: boolean;
networkTimeUrl: string;
};
uploadConfig: () => {
enableAutoUpload: boolean;
};
cameraConfig: () => {
enableCamera: boolean;
};
}>>> & Readonly<{
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
"onUpload-success"?: ((data: any) => any) | undefined;
"onLocation-success"?: ((location: LocationResult) => any) | undefined;
"onLocation-error"?: ((error: any) => any) | undefined;
"onTime-success"?: ((time: string) => any) | undefined;
"onTime-error"?: ((error: any) => any) | undefined;
"onCamera-success"?: ((filePath: string) => any) | undefined;
"onCamera-error"?: ((error: any) => any) | undefined;
}>, {
name: string;
company: string;
action: string;
amapKey: string;
watermarkConfig: {
showTime?: boolean;
showLocation?: boolean;
showName?: boolean;
showCompany?: boolean;
backgroundColor?: string;
textColor?: string;
fontSize?: number;
};
locationConfig: {
enableLocation?: boolean;
locationProvider?: "h5" | "dingtalk" | "custom";
customLocationFn?: () => Promise<LocationResult>;
};
timeConfig: {
enableNetworkTime?: boolean;
networkTimeUrl?: string;
customTimeFn?: () => Promise<string>;
};
uploadConfig: {
enableAutoUpload?: boolean;
customUploadFn?: (file: File) => Promise<any>;
};
cameraConfig: {
enableCamera?: boolean;
customCameraFn?: () => Promise<string>;
};
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
type __VLS_TypePropsToRuntimeProps<T> = {
[K in keyof T]-?: {} extends Pick<T, K> ? {
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
} : {
type: import('vue').PropType<T[K]>;
required: true;
};
};
type __VLS_WithDefaults<P, D> = {
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
default: D[K];
}> : P[K];
};
type __VLS_Prettify<T> = {
[K in keyof T]: T[K];
} & {};