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. 通过分析system_call中断处理过程来深入理解系统调用

    通过分析system_call中断处理过程来深入理解系统调用 前言说明 本篇为网易云课堂Linux内核分析课程的第五周作业,上一次作业中我以2个系统调用(getpid, open)作为分析实例来分析系 ...

  2. ESI+varnish页面片段缓存

    对于片段缓存,业界有成熟的解决方案,还有一个所谓的W3C标准:ESI(Edge Side Include) . ESI本身没有什么,只是一个XML的标签集合.ESI和SSI(Server Side I ...

  3. poj2186 求有向图G中所有点都能到达的点的数量

    /*题意:有向图,求这样的点的数量:所有点都能到达它.缩点成有向无环图,思:如果该强连通有出度,那么 从该出度出去的边必然回不来(已经缩点了),所以有出度的强连通必然不是.那么是不是所有出度为0的强连 ...

  4. 洛谷——P2068 统计和

    P2068 统计和 题目描述 给定一个长度为n(n<=100000),初始值都为0的序列,x(x<=10000)次的修改某些位置上的数字,每次加上一个数,然后提出y (y<=1000 ...

  5. 开源项目SwipeBackLayout的问题处理

    在安卓系统4.4会出现滑动时底层没有之前的activity界面?解决:在主界面设置如下: <item name="android:windowIsTranslucent"&g ...

  6. Java描述符(修饰符)的类型

    以下内容引用自http://wiki.jikexueyuan.com/project/java/modifier-types.html: 描述符(修饰符)是添加到那些定义中来改变他们的意思的关键词.J ...

  7. 【SDCC讲师专访】PingCAP联合创始人兼CEO刘奇:好的产品应开源,不闭门造车-CSDN.NET

    [SDCC讲师专访]PingCAP联合创始人兼CEO刘奇:好的产品应开源,不闭门造车-CSDN.NET 小米的Themis

  8. xml解析工具mashaller javaee自带解析类

    1.怎样去掉Marshaller的格式化? : JAXBContext context = JAXBContext.newInstance(Entity.class); Marshaller mars ...

  9. Dialog集合

    点击查看原文 demo下载地址http://download.csdn.net/detail/metis100/8498401 安卓开发一年.開始想整理些资料成库,以备日后高速开发. 第一天,整理了经 ...

  10. CentOS 6.x Radius

    CentOS 6.x Radius 一.   实现环境: 1.系统:CentOS  release  6.6 (Final) 2.需要软件包: 1) freeradius-2.1.12-6.e16.x ...