qrcode-canvas.d.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import { SuperComponent } from '../../../common/src/index';
  2. export default class QRCode extends SuperComponent {
  3. properties: {
  4. value: {
  5. type: StringConstructor;
  6. value: string;
  7. };
  8. icon: {
  9. type: StringConstructor;
  10. value: string;
  11. };
  12. size: {
  13. type: NumberConstructor;
  14. value: number;
  15. };
  16. iconSize: {
  17. type: any;
  18. value: null;
  19. };
  20. level: {
  21. type: StringConstructor;
  22. value: import("../../../common/shared/qrcode/types").ErrorCorrectionLevel;
  23. };
  24. bgColor: {
  25. type: StringConstructor;
  26. value: string;
  27. };
  28. color: {
  29. type: StringConstructor;
  30. value: string;
  31. };
  32. includeMargin: {
  33. type: BooleanConstructor;
  34. value: boolean;
  35. };
  36. marginSize: {
  37. type: NumberConstructor;
  38. value: number;
  39. };
  40. };
  41. lifetimes: {
  42. ready(): void;
  43. };
  44. observers: {
  45. '**': () => void;
  46. };
  47. methods: {
  48. initCanvas(): Promise<void>;
  49. drawQrcode(canvas: WechatMiniprogram.Canvas, ctx: WechatMiniprogram.CanvasContext): Promise<void>;
  50. getSizeProp(iconSize: number | {
  51. width: number;
  52. height: number;
  53. } | null | undefined): {
  54. width: number;
  55. height: number;
  56. };
  57. checkDefaultValue(): void;
  58. getCanvasNode(): Promise<unknown>;
  59. };
  60. }