2025-11-15 11:39:20 +08:00
|
|
|
|
import type { FC } from "react";
|
|
|
|
|
|
|
|
|
|
|
|
export interface SignatureValue {
|
|
|
|
|
|
/** 签字时间,YYYY-MM-DD HH:mm:ss */
|
|
|
|
|
|
time: string;
|
2025-11-15 11:42:40 +08:00
|
|
|
|
/** 签字图片的 base64 编码 */
|
2025-11-15 11:39:20 +08:00
|
|
|
|
base64: string;
|
2025-11-15 11:42:40 +08:00
|
|
|
|
/** 签字图片的 file 对象 */
|
|
|
|
|
|
file: File;
|
2025-11-15 11:39:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface SignatureProps {
|
|
|
|
|
|
/** 确认签字回调 */
|
|
|
|
|
|
onConfirm: (value: SignatureValue) => void;
|
|
|
|
|
|
/** 签字区域宽度,默认为 752 */
|
|
|
|
|
|
width?: number;
|
|
|
|
|
|
/** 签字区域高度,默认为 300 */
|
|
|
|
|
|
height?: number;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 签字组件
|
|
|
|
|
|
*/
|
|
|
|
|
|
declare const Signature: FC<SignatureProps>;
|
|
|
|
|
|
|
|
|
|
|
|
export default Signature;
|