wechat-miniprogram / wechat-miniprogram/api-typings
Canvas.drawImage的API和实际不符
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 803
- Forks
- 117
- Avg merge
- 24m
- Merged PRs (30d)
- 1
Description
https://github.com/wechat-miniprogram/api-typings/blob/master/types/wx/lib.wx.api.d.ts#L7358
中api写的第一个参数ImageSource为string
实际为 Image 对象,必须先用
const img = canvas.createImage();
创建Image对象后,再使用将此img对象进行绘制
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the ImageSource declaration at types/wx/lib.wx.api.d.ts line 7358. Compare the declared first parameter of Canvas.drawImage with the Image object created by canvas.createImage(). Done means the type definition reflects the reported runtime API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100