Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在wepy 框架中 怎么引用呢 #10

Open
tccStu opened this issue Oct 17, 2019 · 4 comments
Open

在wepy 框架中 怎么引用呢 #10

tccStu opened this issue Oct 17, 2019 · 4 comments

Comments

@tccStu
Copy link

tccStu commented Oct 17, 2019

Component is not found in path "components/navBar" (using by "pages/index");onAppRoute
Error: Component is not found in path "components/navBar" (using by "pages/index")

还有 Components/navBar 目录下面的那个 app.js 怎么处理

@lingxiaoyi
Copy link
Owner

你自己试着改改吧.我没用过wepy...

@weixisheng
Copy link

在app.wpy直接引入

usingComponents: {
      'nav-bar': '/components/navbar/navbar'
}

@tccStu
Copy link
Author

tccStu commented Oct 22, 2019

在app.wpy直接引入

usingComponents: {
      'nav-bar': '/components/navbar/navbar'
}

嗯 现在用 wepy2 在app.wpy里面直接引用不行,还是需要到每个页面单独去引用 不知道什么原因; 照道理来说 应该是在 app.wpy 里面引用了 就不需要再 其他page里面引用了的

@weixisheng
Copy link

wepy2开发方式跟1.x不一样了,不过wepy2也是使用usingComponents的啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants