小程序学习记录

需要看javaScript,css(css3),微信小程序开发文档。

1APP-SERVICE-Engine:Please do not register multiple Page in undefined.js

应该是微信服务器存在之前注册过的Page。我遇到的原因是没有注册index,或者在本地删除掉,或者注册(项目名重复创建时出现)


2、"navigationStyle": "custom|default” 

custom下小程序全屏显示,所以在布局上需要处理好状态栏的显示


3、在wx:for wx:key=“*this”时,*this即为item,不能在自定义view中作为事件参数传回主view,否则有警告


4、如果在第一层view中添加width=100%且又添加padding或margin会使width>100%而导致在有些手机上可以左右滑出空白部分,请慎用


5、父view使用position:relative,则其子view可使用position:absolute+left/right/top/bottom可以使子view相对父view相对位置布局(类似于安卓中的相对布局,其中absolute类似于绝对布局)


6、display:flex+flex-direction:row/column可以使布局按照水平/垂直方向排列


7、justify-content:center/space-between/space-around/fixed-start/fixed-end水平居中等


8、align-items:center垂直居中


猜你喜欢

转载自blog.csdn.net/lr123838/article/details/80505617