Open cielu opened 6 years ago
wepy貌似没办法用,首先i-button这种横线命名就不行... 我在试图改造成wepy的,但似乎涉及button组件的地方,难度有点大,改完之后与原版差异很大,估计不好用
还是希望官方有空出一个wepy版的或者mpvue版的
export default class Index extends wepy.page { config = { navigationBarTitleText: 'test', usingComponents: { 'i-button': '../components/iview/button/index' } }
引入一下就好了啊
我用的有赞UI config = { 'navigationBarTitleText': 'test', 'usingComponents': { 'zan-button': '../static/btn/index' } } src/static 放官方的组件
iview也是类似的
usingComponent为什么会找不到组件???什么原因
把node_modules/iview-weapp/dist文件夹下所有的东西拷贝到/src/components/iview-weapp/文件夹下然后就可以了.
export default class Index extends wepy.page { config = { navigationBarTitleText: 'test', usingComponents: { 'i-button': '../components/iview/button/index' } }
引入一下就好了啊
但是在commponent中不能引入iview组件,因为weopy的components没有config配置,不能使用usingComponents,又不能使用import引入
请给一个在 wepy 中使用的例子。。谢谢