ylbtech-小程序-demo:小程序示例-page/component

以下将展示小程序官方组件能力,组件样式仅供参考,开发者可根据自身需求自定义组件样式,具体属性参数详见小程序开发文档。

1. page/component返回顶部
1、
a) .js
Page({
data: {
list: [
{
id: 'view',
name: '视图容器',
open: false,
pages: ['view', 'scroll-view', 'swiper']
}, {
id: 'content',
name: '基础内容',
open: false,
pages: ['text', 'icon', 'progress']
}, {
id: 'form',
name: '表单组件',
open: false,
pages: ['button', 'checkbox', 'form', 'input', 'label', 'picker', 'radio', 'slider', 'switch', 'textarea']
}, {
id: 'nav',
name: '导航',
open: false,
pages: ['navigator']
}, {
id: 'media',
name: '媒体组件',
open: false,
pages: ['image', 'audio', 'video']
}, {
id: 'map',
name: '地图',
pages: ['map']
}, {
id: 'canvas',
name: '画布',
pages: ['canvas']
}
]
},
kindToggle: function (e) {
var id = e.currentTarget.id, list = this.data.list;
for (var i = 0, len = list.length; i < len; ++i) {
if (list[i].id == id) {
list[i].open = !list[i].open
} else {
list[i].open = false
}
}
this.setData({
list: list
});
}
})
b) .json
{
"navigationBarTitleText": "小程序官方组件展示"
}
c) .wxml
<view class="index">
<view class="index-hd">
<image class="index-logo" src="resources/kind/logo.png"></image>
<view class="index-desc">以下将展示小程序官方组件能力,组件样式仅供参考,开发者可根据自身需求自定义组件样式,具体属性参数详见小程序开发文档。</view>
</view>
<view class="index-bd">
<view class="kind-list">
<block wx:for-items="{{list}}" wx:key="{{item.id}}">
<view class="kind-list-item">
<view id="{{item.id}}" class="kind-list-item-hd {{item.open ? 'kind-list-item-hd-show' : ''}}" bindtap="kindToggle">
<view class="kind-list-text">{{item.name}}</view>
<image class="kind-list-img" src="resources/kind/{{item.id}}.png"></image>
</view>
<view class="kind-list-item-bd {{item.open ? 'kind-list-item-bd-show' : ''}}">
<view class="navigator-box {{item.open ? 'navigator-box-show' : ''}}">
<block wx:for-items="{{item.pages}}" wx:for-item="page" wx:key="*item">
<navigator url="pages/{{page}}/{{page}}" class="navigator">
<view class="navigator-text">{{page}}</view>
<view class="navigator-arrow"></view>
</navigator>
</block>
</view>
</view>
</view>
</block>
</view>
</view>
</view>
d) .wxss
@import "../common/index.wxss";
e)
2、pages
3、resources
-kind
-pic
4、
2.  ./pages/view 试图容器返回顶部
1、view
a) .js
b) .json
c) .wxml
d) .wxss
e)
2、scroll-view
a) .js
b) .json
c) .wxml
d) .wxss
e)
3、swiper
a) .js
b) .json
c) .wxml
d) .wxss
e)
4、
3. ./pages/content 基础内容返回顶部
1、text
a) .js
b) .json
c) .wxml
d) .wxss
e)
2、icon
a) .js
b) .json
c) .wxml
d) .wxss
e)
3、progress
a) .js
b) .json
c) .wxml
d) .wxss
e)
4. ./pages/form 表单组件返回顶部
1、button
a) .js
b) .json
c) .wxml
d) .wxss
e)
2、checkbox
a) .js
b) .json
c) .wxml
d) .wxss
e)
3、form
a) .js
b) .json
c) .wxml
d) .wxss
e)
4、input
a) .js
b) .json
c) .wxml
d) .wxss
e)
5、label
a) .js
b) .json
c) .wxml
d) .wxss
e)
6、picker
1、view
a) .js
b) .json
c) .wxml
d) .wxss
e)
7、radio
a) .js
b) .json
c) .wxml
d) .wxss
e)
8、slider
a) .js
b) .json
c) .wxml
d) .wxss
e)
9、switch
a) .js
b) .json
c) .wxml
d) .wxss
e)
10、textarea
a) .js
b) .json
c) .wxml
d) .wxss
e)
11、
5. ./pages/nav 导航返回顶部
1、navigator
a) .js
b) .json
c) .wxml
d) .wxss
e)
2、
 
6. ./pages/media 媒体组件返回顶部
1、image
a) .js
b) .json
c) .wxml
d) .wxss
e)
2、audio
a) .js
b) .json
c) .wxml
d) .wxss
e)
3、video
a) .js
b) .json
c) .wxml
d) .wxss
e)
4、
7. ./pages/map 地图返回顶部
1、map
a) .js
b) .json
c) .wxml
d) .wxss
e)
2、
8. ./pages/canvas 画布返回顶部
1、canvas
a) .js
b) .json
c) .wxml
d) .wxss
e)
2、
9.返回顶部
 
10.返回顶部
 
 
11.返回顶部
 
作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

小程序-demo:小程序示例-page/component的更多相关文章

  1. 近期热门微信小程序demo源码下载汇总

    近期微信小程序demo源码下载汇总,乃小程序学习分析必备素材!点击标题即可下载: 即速应用首发!原创!电商商场Demo 优质微信小程序推荐 -秀人美女图 图片下载.滑动翻页 微信小程序 - 新词 GE ...

  2. 小程序-demo:小程序示例-page/api

    ylbtech-小程序-demo:小程序示例-page/api 以下将演示小程序接口能力,具体属性参数详见小程序开发文档. 1. page/component返回顶部 1. a) .js Page({ ...

  3. 小程序-demo:小程序示例-page/component2

    ylbtech-小程序-demo:小程序示例-page/component2 以下将展示小程序官方组件能力,组件样式仅供参考,开发者可根据自身需求自定义组件样式,具体属性参数详见小程序开发文档. 1. ...

  4. 小程序-demo:小程序示例-page/common

    ylbtech-小程序-demo:小程序示例-page/common 1.返回顶部 0.     1. 2. pages/common返回顶部 1. -lib --weui.wxss /*! * we ...

  5. 小程序-demo:小程序示例

    ylbtech-小程序-demo:小程序示例     1.返回顶部 0. 1.app.js const openIdUrl = require('./config').openIdUrl App({ ...

  6. 小程序-demo:知乎日报

    ylbtech-小程序-demo:知乎日报 1.返回顶部 0.         1.app.js //app.js App({ onLaunch: function () { //调用API从本地缓存 ...

  7. 小程序-demo:小熊の日记

    ylbtech-小程序-demo:小熊の日记 1.CHANGELOG.md # -- * 更新开发者工具至`v0.10.101100` * 修改`new`页的数据绑定方式 & 修改多行文本框输 ...

  8. 小程序-demo:天气预报

    ylbtech-小程序-demo:天气预报 1.返回顶部 1.app.js //app.js App({ //系统事件 onLaunch: function () {//小程序初始化事件 var th ...

  9. 番外篇!全球首个微信应用号开发教程!小程序 DEMO 视频奉上!

    大家好,我是博卡君.经过国庆节的七天假期,相信很多朋友都已经研究出自己的小程序 demo 了吧?我最近也利用休息时间关注了一下网上关于小程序开发的讨论,今天就利用这个番外篇谈谈自己对小程序的一些想法吧 ...

随机推荐

  1. android去除标题栏和状态栏(全屏)

    转--http://www.eoeandroid.com/thread-66555-1-1.html 在开发中我们经常需要把我们的应用设置为全屏,这里我所知道的有俩中方法,一中是在代码中设置,另一种方 ...

  2. 获得HttpServletRequest 和HttpSession对象

    package org.jeecgframework.core.util; import java.util.HashMap; import java.util.Map; import javax.s ...

  3. [USACO13NOV]空荡荡的摊位Empty Stalls

    题目描述 Farmer John's new barn consists of a huge circle of N stalls (2 <= N <= 3,000,000), numbe ...

  4. 牛客网 牛客网暑期ACM多校训练营(第三场)E KMP

    链接:https://www.nowcoder.com/acm/contest/141/E 题目描述 Eddy likes to play with string which is a sequenc ...

  5. vijos 2035 奇数偶数与绚丽多彩的数

    描述 Q先生是一个热爱学习的男孩子. 他认为一个 n 位的正整数 x 若能被称作是绚丽多彩的,一定要满足对于{1,3,5,7,9} 中任意一个奇数或者没有在 x 中出现,或者在 x 中出现了恰好奇数次 ...

  6. 09-js数组常用方法

    <html> <head> <title>js数组的常用操作</title> <meta charset="UTF-8"/&g ...

  7. Github配置SSH

    以前也配置过ssh,但是没有注意用法,在配置一次熟悉流程 检查本机是否有ssh key设置 $ cd ~/.ssh 或cd .ssh 如果没有则提示: No such file or director ...

  8. Hexo搭建个人blog

    Hexo搭建 现在只想说心累... 前几天看了几个牛人的blog,感觉他们的风格很舒服,然后就发现了Hexo这个好东西!激动的想马上自己也弄一个,昨天晚上开始看资料特别是:潘柏信写了两篇 HEXO搭建 ...

  9. android事件分发(二)

    非常早之前写过一篇android事件分发的博客,主要写的是它是怎样分发的,具体非常多原理的东西都没有涉及到.今天就从源代码看android怎样控制它的分发机制. 鉴于手机屏幕的限制,所以android ...

  10. python菜鸟日记1

    1. 在__init__(self,...)初始化函数中.定义对象的属性,这些属性不用所有写在括号里,括号里的表示定义的时候须要赋初始值的一些属性,而其它不用初始值的属性.能够 直接卸载代码块中,se ...