import { JSX } from 'solid-js'; import { type IntRange } from './qrcode'; import type { CustomElement } from 'custom-element-type'; export type { IntRange } from './qrcode'; export interface QrCodeProps { /** 自定义类名 */ class?: string; style?: string | JSX.CSSProperties; /** 二维码值 */ value: string; /** 二维码模块的颜色 */ color?: string; /** 二维码背景色 */ bgColor?: string; /** * 二维码尺寸 * @default 150 */ size?: number; /** 纠错等级; 分别对应7%、15%、25%、30%的数据纠错能力 * @default 'm' */ ecl?: 'l' | 'm' | 'q' | 'h'; /** * 支持的QR码模型2标准最小版本 * @default 1 */ minVersion?: IntRange<1, 41>; /** * 支持的QR码模型2标准最大版本 * @default 40 */ maxVersion?: IntRange<1, 41>; /** * 掩码模式; 为 -1 时,表示自动选择 * @default -1 */ mask?: -1 | IntRange<0, 8>; /** * 在数据仍然适合当前版本号的情况下提高纠错级别 * @default true */ boostEcc?: boolean; /** * 模块外围的边框宽度(模块单位,非像素) * @default 1 */ border?: IntRange<1, 101>; /** * 渲染方式 * @default 'svg' */ type?: 'svg' | 'canvas'; /** * 二维码图标 */ icon?: string; /** * 二维码图标尺寸 * @default 7 */ iconSize?: number; /** * 模块形状 * @default 'rect' * @since 2.9.1 */ shape?: 'rect' | 'rhombus' | 'heart' | 'circle'; } declare const QRCode: { (_props: QrCodeProps): JSX.Element; registry(): void; }; export type QrCodeElement = CustomElement; export declare const defaultProps: QrCodeProps; export default QRCode;