tdesign-mobile-vue
Version:
tdesign-mobile-vue
1 lines • 5.08 kB
Source Map (JSON)
{"version":3,"file":"props.mjs","sources":["../../../src/qrcode/components/props.ts"],"sourcesContent":["import { PropType } from 'vue';\nimport { QRCodeSubComponent, QRCodeStatus } from './type';\n\nexport const QRCodeSubComponentProps = {\n /**\n * The value to encode into the QR Code. An array of strings can be passed in\n * to represent multiple segments to further optimize the QR Code.\n */\n value: {\n type: String,\n default: '',\n },\n /**\n * The size, in pixels, to render the QR Code.\n * @defaultValue 128\n */\n size: {\n type: Number,\n default: 128,\n },\n /**\n * The Error Correction Level to use.\n * @see https://www.qrcode.com/en/about/error_correction.html\n * @defaultValue L\n */\n level: {\n type: String as PropType<QRCodeSubComponent['level']>,\n default: 'L',\n },\n /**\n * The background color used to render the QR Code.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/color_value\n * @defaultValue #FFFFFF\n */\n bgColor: {\n type: String,\n default: '#FFFFFF',\n },\n /**\n * The foregtound color used to render the QR Code.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/color_value\n * @defaultValue #000000\n */\n fgColor: {\n type: String,\n default: '#000000',\n },\n /**\n * The style to apply to the QR Code.\n */\n style: {\n type: Object as PropType<QRCodeSubComponent['style']>,\n default: () => ({}) as QRCodeSubComponent['style'],\n },\n /**\n * Whether or not a margin of 4 modules should be rendered as a part of the\n * QR Code.\n * @deprecated Use `marginSize` instead.\n * @defaultValue false\n */\n includeMargin: {\n type: Boolean,\n default: false,\n },\n /**\n * The number of _modules_ to use for margin. The QR Code specification\n * requires `4`, however you can specify any number. Values will be turned to\n * integers with `Math.floor`. Overrides `includeMargin` when both are specified.\n * @defaultValue 0\n */\n marginSize: {\n type: Number,\n default: 0,\n },\n /**\n * The settings for the embedded image.\n */\n imageSettings: {\n type: Object as PropType<QRCodeSubComponent['imageSettings']>,\n default: () => ({}),\n },\n /**\n * The title to assign to the QR Code. Used for accessibility reasons.\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * The minimum version used when encoding the QR Code. Valid values are 1-40\n * with higher values resulting in more complex QR Codes. The optimal\n * (lowest) version is determined for the `value` provided, using `minVersion`\n * as the lower bound.\n * @defaultValue 1\n */\n minVersion: {\n type: Number,\n default: 1,\n },\n};\n\nexport const QRCodeStatusProps = {\n locale: {\n type: Object as PropType<QRCodeStatus['locale']>,\n default: () => ({}) as QRCodeStatus['locale'],\n },\n classPrefix: {\n type: String,\n default: 't',\n },\n onRefresh: {\n type: Function as PropType<QRCodeStatus['onRefresh']>,\n },\n statusRender: {\n type: Function as PropType<QRCodeStatus['statusRender']>,\n },\n status: {\n type: String as PropType<QRCodeStatus['status']>,\n default: 'active' as QRCodeStatus['status'],\n },\n};\n"],"names":["QRCodeSubComponentProps","value","type","String","default","size","Number","level","bgColor","fgColor","style","Object","includeMargin","Boolean","marginSize","imageSettings","title","minVersion","QRCodeStatusProps","locale","classPrefix","onRefresh","Function","statusRender","status"],"mappings":";;;;;;AAGO,IAAMA,uBAA0B,GAAA;AAKrCC,EAAAA,KAAO,EAAA;AACLC,IAAAA,IAAM,EAAAC,MAAA;AACNC,IAAAA,OAAS,EAAA,EAAA;GACX;AAKAC,EAAAA,IAAM,EAAA;AACJH,IAAAA,IAAM,EAAAI,MAAA;AACNF,IAAAA,OAAS,EAAA,GAAA;GACX;AAMAG,EAAAA,KAAO,EAAA;AACLL,IAAAA,IAAM,EAAAC,MAAA;AACNC,IAAAA,OAAS,EAAA,GAAA;GACX;AAMAI,EAAAA,OAAS,EAAA;AACPN,IAAAA,IAAM,EAAAC,MAAA;AACNC,IAAAA,OAAS,EAAA,SAAA;GACX;AAMAK,EAAAA,OAAS,EAAA;AACPP,IAAAA,IAAM,EAAAC,MAAA;AACNC,IAAAA,OAAS,EAAA,SAAA;GACX;AAIAM,EAAAA,KAAO,EAAA;AACLR,IAAAA,IAAM,EAAAS,MAAA;IACNP,OAAA,EAAS,SAATA,QAAAA,GAAA;AAAA,MAAA,OAAgB,EAAC,CAAA;AAAA,KAAA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