Skip to content
This repository was archived by the owner on Jan 19, 2023. It is now read-only.
This repository was archived by the owner on Jan 19, 2023. It is now read-only.

在页面或者组件中引用子组件出现“无法找到组件问题” #3

Description

@ACERY1

报错提示: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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions