@lovekeqing/captcha
    Preparing search index...

    Interface CaptchaOptions

    验证码选项

    interface CaptchaOptions {
        backgroundColor?: string;
        chars?: string;
        fontPath?: string;
        height?: number;
        ignoreChars?: string;
        length?: number;
        noise?: number;
        noiseWidth?: number;
        type?: "number" | "letter" | "mix" | "formula";
        width?: number;
    }
    Index

    Properties

    backgroundColor?: string

    背景颜色

    chars?: string

    字符集

    fontPath?: string

    字体文件路径,支持 ttf

    height?: number

    验证码图片高度,默认按字体的实际高度

    ignoreChars?: string

    想忽略的字符集

    length?: number

    验证码长度,默认 4,如果验证码类型是公式,表示公式中数字的个数

    noise?: number

    干扰线数量,默认 1

    noiseWidth?: number

    干扰线宽度,默认为0.03的图片高度

    type?: "number" | "letter" | "mix" | "formula"

    验证码类型,分别是数字、字母、混合和公式,默认数字

    width?: number

    验证码图片宽度,默认按字体的实际宽度