We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
请教一下这个怎么解决的 ?
Sorry, something went wrong.
其实是报错有问题,实际上可能是你的context为null
export interface CanvasNode { getContext(type: '2d'): CanvasRenderingContext2D; width: number; height: number; _left: number; _top: number; // ... 其他方法和属性 } export function canvasNode(canvasTag: string): Promise<CanvasNode> { return new Promise((resolve, reject) => { Taro.createSelectorQuery().select(canvasTag).node((ref) => { if (ref) { const canvas = ((ref as unknown as unknown[]).length > 0) ? ref[0].node : ref.node; if (canvas) { console.log(`typeof canvas==>${Object.getPrototypeOf(canvas)}`) resolve(canvas); } else { reject(ref); } } }).exec(); }) }
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: