lingxiaoyi / navigation-bar

微信小程序自定义导航栏组件,navigation,完美适配全部手机
MIT License
763 stars 140 forks source link

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

Open tccStu opened 5 years ago

tccStu commented 5 years ago

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 commented 5 years ago

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

weixisheng commented 4 years ago

在app.wpy直接引入

usingComponents: {
      'nav-bar': '/components/navbar/navbar'
}
tccStu commented 4 years ago

在app.wpy直接引入

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

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

weixisheng commented 4 years ago

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