Taro: 是否支持we-cropper使用和小程序混写的方式引用

Created on 28 Jan 2019  ·  12Comments  ·  Source: NervJS/taro

您好,
我需要实现图片的裁剪功能,找到了这个开源工具:
https://github.com/we-plugin/we-cropper

不知道在文档里面提到的对和小程序混写的支持是否也支持下载we-cropper到src后再混写?
这里是他们的文档:
https://we-plugin.github.io/we-cropper/#/?id=%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E

谢谢

good first issue

Most helpful comment

我最后没用这个,太卡,我后来用的https://github.com/IFmiss/wx-cropper,
直接把wx-cropper的src下的代码放在components/wx-cropper目录下,然后使用

  config = {
    usingComponents: {
      wxcropper: '../../components/wx-cropper/wx-cropper'
    }
  }

,注意canvas 中的this指向就好

All 12 comments

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

可以混写,我用过

可以混写,我用过

@nyrf 是直接把github repo下载到src下面然后混写吗?
谢谢啦!

我最后没用这个,太卡,我后来用的https://github.com/IFmiss/wx-cropper,
直接把wx-cropper的src下的代码放在components/wx-cropper目录下,然后使用

  config = {
    usingComponents: {
      wxcropper: '../../components/wx-cropper/wx-cropper'
    }
  }

,注意canvas 中的this指向就好

@nyrf 太感谢了!我去试试

@nyrf 添加了之后微信开发者工具报错lol
我是这么添加的:
image
在render里面调用:
image
报错:
image

感觉是能找到文件,解析成wx-cropper,但是却跑不起来

组件名不要以 wx- 开头

您好,请问你这个问题解决了吗?能发我个demo参考一下吗?自己搞了好久还是Not Found Component

您好,请问你这个问题解决了吗?能发我个demo参考一下吗?自己搞了好久还是Not Found Component

image

您好,请问你这个问题解决了吗?能发我个demo参考一下吗?自己搞了好久还是Not Found Component

image

一样的, V1.2.26

请按照要求再提供一下细致的Demo?

Hello~

您的问题所提供的信息不足,我们无法定位到具体的问题。如果有空的话还请拔冗提供更具体的信息,否则这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

Was this page helpful?
0 / 5 - 0 ratings