代码拉取完成,页面将自动刷新
同步操作将从 成都碰她网络有限公司/svg-captcha 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/**
* config captcha generation options
*/
declare class ConfigObject {
/**
* width of captcha
*/
width?: number;
/**
* height of captcha
*/
height?: number;
/**
* captcha text size
*/
fontSize?: number;
/**
* random character preset
*/
charPreset?: string;
/**
* default: false
* if false, captcha will be black and white
* otherwise, it will be randomly colorized
*/
color?: boolean;
/**
* default: false
* if set to true, it will draw with light grey color
* use if you have a site with dark theme
* only active when color is set to false
*/
inverse?: boolean;
/**
* default: ''
* filter out some characters
*/
ignoreChars?: string;
/**
* default: 1
* number of noise lines
*/
noise?: number;
/**
* default: white
* background color of svg image
*/
background?: string;
}
/**
* result of captcha generation
*/
interface CaptchaObj {
/**
* the captcha text,
* store this in your session
*/
text: string,
/**
* the svg image in string,
* set type of image/svg before send to client side
*/
data: string
}
/**
* This method returns a object that has two props:
* data: svg image string
* text: captcha text
*/
export function create(options?: ConfigObject): CaptchaObj;
/**
* This method returns a object that has two props:
* data: svg image string
* text: captcha text
* note that this method generate a math expression
* this means that text is the result of the math expression
*/
export function createMathExpr(options?: ConfigObject): CaptchaObj;
/**
* Override the default font with your own
*/
export function loadFont(url: string): void;
/**
* captcha generation global setting
*/
export const options: ConfigObject;
/**
* return a random string
*/
export function randomText(size): string;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。