自定义image节点,无法显示图片
- Dominant language
- JavaScript
- Stars
- 147
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
uniapp+vue2
iOS真机预览
**图片没有跨域也没有被拦截**
```js
...
shape = group.addShape('image', {
attrs: {
x: 0 - radius,
y: 0 - radius,
width: radius * 2,
height: radius * 2,
img: cfg.img, // 接口返回的http://.....png地址
},
name: 'avatar-image',
draggable: true,
clipCfg: { // 图片剪裁
show: true,
type: 'circle', // 裁个圆
r: radius // 半径
}
});
return shape
```
这样无法显示,把图片转成base64才可以,如何解决?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the custom image-node entry point using group.addShape('image') in the issue, then reproduce it with an HTTP PNG URL during an iOS real-device preview. Compare that path with the working base64 case and inspect the image-shape handling. Done means the remote image renders correctly with the stated circular clipping configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100