wx小程序的学习

传送门:

# 微信小程序案例大全
https://www.cnblogs.com/icyhoo/p/6282574.html

# 微信小程序开发工具
https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/download.html

# 内置组件
https://mp.weixin.qq.com/debug/wxadoc/dev/component/

# 微信内置API
https://mp.weixin.qq.com/debug/wxadoc/dev/api/

# 授权 与 scope 列表
https://mp.weixin.qq.com/debug/wxadoc/dev/api/authorize-index.html

# 生命周期
https://www.gitbook.com/book/dragon8github/fuck/edit#/edit/master/di-yi-zhang-ff1a-ji-chu-pian/sheng-ming-zhou-qi-jie-shao.md?_k=jjuz8s

# Component构造器
https://mp.weixin.qq.com/debug/wxadoc/dev/framework/custom-component/component.html

# 事件大全
https://mp.weixin.qq.com/debug/wxadoc/dev/framework/view/wxml/event.html

 

1、tarbar不生效的原因

app.json 中 pages数组中的第一项必须是 tabBar 配置的第一项才可以显示。

 

2、组件和页面一样,都是需要.json、.js、.wxml、.wxss四个文件。区别在我看来仅仅两个

  •  .json:组件必须声明 "component": true
  • .js:组件是Component({}),而页面是Page({})

 

3、通过设置app.json的pages第一项,可以控制默认打开的页面,方便开发。

4、css的background属性,不能使用本地资源,所以一般使用image标签来使用图片

5、组件slot内不能和vue一样嵌套元素,如下错误演示:

 

<slot name="icon">
   <view class="cell">{{ value }}</view>
</slot>

 

这里的view是无法显示的,除非换成这样:

<slot name="icon"></slot>
<view class="cell">{{ value }}</view>

 

 

 

 

 

posted @ 2018-03-02 14:52  贝尔塔猫  阅读(384)  评论(0编辑  收藏  举报