报错提示:`CLI报错:找不到组件:/Users/mac/Documents/Project/TGPRO/FLWAPP/src/components/child.wpy` 原因:不应该带上文件后缀名。因为编译之后无法识别.wpy的文件(会识别wxml/wxss/js) 解决办法:在页面上`import`组件时使用: `import Child from '../components/child'` 而千万别用 `import Child from '../components/child.wpy'`
报错提示:
CLI报错:找不到组件:/Users/mac/Documents/Project/TGPRO/FLWAPP/src/components/child.wpy原因:不应该带上文件后缀名。因为编译之后无法识别.wpy的文件(会识别wxml/wxss/js)
解决办法:在页面上
import组件时使用:import Child from '../components/child'而千万别用
import Child from '../components/child.wpy'