1:elesigncode扩展包下载1:github地址:https://github.com/yinhui1129...2:npm下载:npminstallelesigncode2:elesigncode常用方法方法名说明参数返回值init初始化方法无undoundo方法无Noneredoredo方法NoneNonetoJson将当前实例的签名数据转换为jsonNoneNonetoPng获取当前签名的base64数据pngTypeNoneNonetoJpeg获取当前签名jpeg的base64数据TypeNoneNonesetColor设置颜色thesignature:colorstringrgbhexcanbesetwithoutsetLineWidthlinewidthlineWidth:linewidthcanbesetwithoutsetBgColor设置背景颜色bgColor:colorstringrgbhexcanbesetwithoutsetPentypename:'default''writing'noclearclear签名none否isEmpty获取是否有签名返回true表示无签名,返回false表示有签名三:elesigncode实现示例1:html
