We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
水平比较菜,详细案例最好了,哈哈
The text was updated successfully, but these errors were encountered:
看了一下源码,虽然看不懂,但发现在小程序中必须要使用自定义组件才行page.selectComponent('#' + id) 然后看了一下uniapp有对小程序自定义组件的支持 第一步:在根目录创建文件夹 wxcomponents,应该随便在哪儿创建都可以,只要找得到路径,没有试过 第二步:在wxcomponents目录下新建cax将小程序组件原封不动的复制过来 包含(cax.wxml、cax.wxsss、cax.json、cax.js、index.js)四个文件 第三步:在uniapp的pages.json 中添加小程序组件配置 { "pages": [ { "path": "pages/index/index", "style": { "navigationBarTitleText": "uni-app", "usingComponents": { "cax": "/wxcomponents/cax/cax" } } } ], …… } 第四步:在页面中加载使用 `
page.selectComponent('#' + id)
{ "pages": [ { "path": "pages/index/index", "style": { "navigationBarTitleText": "uni-app", "usingComponents": { "cax": "/wxcomponents/cax/cax" } } } ], …… }
` 只是这样就要用条件编译来兼容H5和小程序了,那个自定组件也可以照到官方的写法改一下,比如有边框我这边就不需要。 如果你已经在调试运行中,会有一个报错,重启运行就可以了 参考:https://www.jianshu.com/p/bdad9f541867
Sorry, something went wrong.
总结蛮到位
No branches or pull requests
水平比较菜,详细案例最好了,哈哈
The text was updated successfully, but these errors were encountered: