我在某个页面引入wxcomponents。manifest.json中的开关已开启
"usingComponents":{
"painter":"/wxcomponents/painter/painter"
}
"mp-weixin" : {
/* 小程序特有相关 */
"usingComponents" : true,
但是直接报错如下:
Cannot use import statement outside a module
页面【wxcomponents/painter/painter]错误:
Error: module 'wxcomponents/painter/painter.js' is not defined, require args is 'wxcomponents/painter/painter.js'
删除wxcomponents/painter/painter 组件内的前三行import可以解决报错,不知为何?
贴插件源代码:https://github.com/Kujiale-Mobile/PainterCore