navigation-bar icon indicating copy to clipboard operation
navigation-bar copied to clipboard

在wepy 框架中 怎么引用呢

Open tccStu opened this issue 5 years ago • 4 comments

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 怎么处理

tccStu avatar Oct 17 '19 07:10 tccStu

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

lingxiaoyi avatar Oct 17 '19 08:10 lingxiaoyi

在app.wpy直接引入

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

weixisheng avatar Oct 22 '19 11:10 weixisheng

在app.wpy直接引入

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

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

tccStu avatar Oct 22 '19 11:10 tccStu

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

weixisheng avatar Oct 22 '19 11:10 weixisheng