
微信小程序
微信小程序
Asteroid 325
专注自己和专注自己热爱的事。Cross my fingers for me.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
2|weekly movie
小程序运行环境与基本架构条件渲染原创 2020-10-08 17:36:44 · 528 阅读 · 2 评论 -
1|weekly movie
介绍创建项目+目录文件结构实现一个单页面的小程序或者把样式写在wxss中页面配置初探要做出来的效果图:怎么动态的改变导航栏的文字?text,view,image组件实现UI设计图中的样式及布局效果传统实现:但是传统方式布局目标的实现属性赋值非常分散;严重依赖页面结构与内容实际大小如果此时又多个text标签呢,那个margin-bottom的值就不是那么合适了,要重新写弹性盒子:弹性盒子布局比较统一...原创 2020-10-06 21:50:42 · 1942 阅读 · 3 评论 -
B2|猫头鹰魔法社优购
12.首页楼层原创 2020-09-26 19:02:44 · 249 阅读 · 0 评论 -
B1|猫头鹰魔法社优购
3.2搭建目录结构3.3搭建项目的页面原创 2020-09-17 16:52:59 · 166 阅读 · 0 评论 -
Promise
一,何为Promise?为了直观一点,首先我们采用console.dir(Promise)看一下它的结构组成。从上面的图片中我们可以到,**Promise其实是一个构造函数,它有resolve,reject,race等静态方法;它的原型(prototype)上有then,catch方法,**因此只要作为Promise的实例,都可以共享并调用Promise.prototype上面的方法(then,catch),接下来我们试着使用一下Promise。二.Promise的使用首先我们来看一下Promis转载 2020-09-17 16:29:04 · 100 阅读 · 0 评论 -
A2|项目演示
原创 2020-09-13 18:16:50 · 125 阅读 · 0 评论 -
41|open-data
<open-data type="groupName" open-gid="xxxxxx"></open-data><open-data type="userAvatarUrl"></open-data><open-data type="userGender" lang="zh_CN"></open-data>原创 2020-09-10 19:43:13 · 172 阅读 · 0 评论 -
40|表单组件pick-view
原创 2020-09-10 19:36:26 · 117 阅读 · 0 评论 -
39|表单组件picker
表单组件picker<!--pages/form2/form2.wxml--><form bindsubmit="doSubmit" bindreset="doReset"><view>用户名:<input name="username" type="text" placeholder="请输入用户名"></input></view><view>密码:<input name="pass" t原创 2020-09-10 18:22:06 · 260 阅读 · 0 评论 -
38|表单组件switch,textarea
表单组件switchtextarea<!--pages/form2/form2.wxml--><form bindsubmit="doSubmit" bindreset="doReset"><view>用户名:<input name="username" type="text" placeholder="请输入用户名"></input></view><view>密码:<input name="p原创 2020-09-10 17:44:42 · 112 阅读 · 0 评论 -
37|表单组件-checkbox,radio
check原创 2020-09-10 16:46:03 · 131 阅读 · 0 评论 -
36|表单组件Button组件的open-type
button的open-type<button bindgetuserinfo="getUserInfo" open-type="getUserInfo">获取当前登录用户的信息</button><button bindopensetting="openSetting" open-type="openSetting">openSetting</button>// pages/form2/form2.jsPage({ /**原创 2020-09-10 15:23:48 · 1243 阅读 · 0 评论 -
35|表单组件-form
表单组件–form<!--pages/form2/form2.wxml--><form bindsubmit="doSubmit" bindreset="doReset"><view>用户名:<input name="username" type="text" placeholder="请输入用户名"></input></view><view>密码:<input name="pass" type=原创 2020-09-10 10:54:01 · 505 阅读 · 0 评论 -
34|内容组件rich-text显示HTML
<!--pages/form/form.wxml--><rich-text nodes="{{html}}"></rich-text><rich-text nodes="{{html2}}"></rich-text>// pages/form/form.jsPage({ /** * 页面的初始数据 */ data: {html:'<img style="max-width:100%;height:au...原创 2020-09-10 09:42:59 · 464 阅读 · 0 评论 -
33|内容组件-icon与阿里图标库的使用
iconiconType: [‘success’, ‘success_no_circle’, ‘info’, ‘warn’, ‘waiting’, ‘cancel’, ‘download’, ‘search’, ‘clear’]<!--pages/form/form.wxml--><icon size="160rpx" type="success"></icon><icon size="160rpx" color="red" type="succ原创 2020-09-09 21:46:52 · 299 阅读 · 0 评论 -
31|基本movable-view
举例子movable-view<movable-area style="width:100%;height:200rpx;background:red"> <movable-view direction="all" style="width:100rpx;height:100rpx;background:blue"></movable-view></movable-area>原创 2020-09-09 16:28:45 · 246 阅读 · 0 评论 -
30|基本组件swiper
swiper滑块视图容器使用例子例子原创 2020-09-09 15:31:06 · 122 阅读 · 0 评论 -
29|scroll-view
scroll-view①scroll-yscroll-x ,scroll-into-view,scroll-with-animation,bindscrolltoupper,bindscrolltolower,bindscrollstudy.wxml:<!--pages/study/study.wxml--><scroll-view bindscrolltoupper="upper" bindscrolltolower="down" bindscroll="sc原创 2020-09-08 17:05:55 · 156 阅读 · 0 评论 -
28|基本组件view
view原创 2020-09-08 15:24:22 · 83 阅读 · 0 评论 -
18|component构造器
component构造器理论举个例子components文件下的hello.wxss/* components/hello.wxss */.title{ font-size:30px;}components文件下的hello.js:// components/hello.jsComponent({ /** * 组件的属性列表 */ properties: { }, /** * 组件的初始数据 */ data: { msg:"h原创 2020-09-07 12:21:34 · 287 阅读 · 0 评论 -
17|自定义组件
自定义组件cart.wxmlcart.json:【引用自定义的组件路径】{ "usingComponents": { "my-hello":"../../components/hello" }}创建一个components文件,然后创建一个hello 的components跟pages下的js文件的区别是:cart.wxml用的自定义组件是引用hello的自定义组件<!--components/hello.wxml--><text>Hello原创 2020-09-07 11:46:47 · 95 阅读 · 0 评论 -
16|小程序中的路由和导航
两种方式实现跳转https://developers.weixin.qq.com/miniprogram/dev/component/navigator.htmlhttps://developers.weixin.qq.com/miniprogram/dev/api/route/wx.switchTab.html通过组件跳转可以返回:不可以返回:relaunch但是open-type=“switchTab” 只能跳转tabbar列表里的跳转,无法进行页面的跳转用API跳转.原创 2020-09-07 10:32:02 · 268 阅读 · 0 评论 -
15|小程序页面下拉刷新和上拉分页事件
15|小程序页面下拉刷新和上拉分页事件onPullDownRefresh():页面下拉刷新事件onReachBottom():上拉分页事件必须在app.json设置enableDownRefresh=true,才会触发下拉刷新// pages/list/list.jsPage({ /** * 页面的初始数据 */ data: { list:[1,2,3,4,5,6,7,8,9] }, /**9 * 生命周期函数--监听页面加载原创 2020-09-06 21:50:52 · 346 阅读 · 0 评论 -
13|小程序布局--flexbox
小程序布局–flexbox/* pages/flexbox/flexbox.wxss */.box{ width: 750rpx; height: 400rpx; background:rebeccapurple; display: flex;}.item:nth-last-of-type(1){ width: 50rpx; height: 50rpx; background:yellow;}.item:nth-last-of-type(2){ wid原创 2020-09-06 20:10:52 · 139 阅读 · 0 评论 -
12|小程序样式定义-rpx
/* pages/flexbox/flexbox.wxss */.box{ width: 375px; height: 200px; background:rebeccapurple;}<!--pages/flexbox/flexbox.wxml--><view class="box"></view><text>pages/flexbox/flexbox.wxml</text>iPhone 6 plus:建议: 开原创 2020-09-06 18:13:40 · 173 阅读 · 0 评论 -
11|小程序的事件处理
https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxml/event.html事件什么是事件?事件是视图层到逻辑层的通讯方式。事件可以将用户的行为反馈到逻辑层进行处理。事件可以绑定在组件上,当达到触发事件,就会执行逻辑层中对应的事件处理函数。事件对象可以携带额外信息,如 id, dataset, touches。事件的使用方式在组件中绑定一个事件处理函数。如bindtap,当用户点击该组件的时候会在该页面对应的原创 2020-09-02 00:01:08 · 319 阅读 · 0 评论 -
10|数据响应操作(data)
Page(Object object) 注册小程序中的一个页面。接受一个 Object 类型参数,其指定页面的初始数据、生命周期回调、事件处理函数等。参数Object object属性 类型 默认值 必填 说明data Object 页面的初始数据onLoad function 生命周期回调—监听页面加载onShow function 生命周期回调—监听页面显示onReady function 生命周期回调—监听页面初次渲染完成onHide function 生命原创 2020-09-01 22:39:35 · 818 阅读 · 0 评论 -
09|视图的绑定
https://developers.weixin.qq.com/miniprogram/dev/reference/wxml/data.html数据绑定WXML 中的动态数据均来自对应 Page 的 data。①简单绑定:数据绑定使用 Mustache 语法(双大括号)将变量包起来,可以作用于:内容:wxml:<view> {{ message }} </view>js:Page({ data: { message: 'Hello MINA!'原创 2020-08-31 23:34:17 · 312 阅读 · 0 评论 -
08|小程序MINA框架介绍
MINA框架介绍原创 2020-08-31 15:45:08 · 178 阅读 · 0 评论 -
07|小程序的页面配置
页面配置每一个小程序页面也可以使用 .json 文件来对本页面的窗口表现进行配置。页面中配置项在当前页面会覆盖 app.json 的 window 中相同的配置项。文件内容为一个 JSON 对象,{ "navigationBarBackgroundColor": "#ffffff", "navigationBarTextStyle": "black", "navigationBarTitleText": "微信接口功能演示", "backgroundColor": "#eeeeee",.原创 2020-08-24 01:30:26 · 171 阅读 · 0 评论 -
06|小程序的全局配置[大部分是总结微信文档的内容]
全局配置pages:用于指定小程序由哪些页面组成,每一项都对应一个页面的 路径(含文件名) 信息。window:用于设置小程序的状态栏、导航条、标题、窗口背景色。{ "window": { "navigationBarBackgroundColor": "#ffffff", "navigationBarTextStyle": "black", "navigationBarTitleText": "微信接口功能演示", "backgroundColor": "..原创 2020-08-22 23:33:50 · 145 阅读 · 0 评论 -
02|微信小程序的适用场景
原创 2020-08-22 16:49:23 · 193 阅读 · 0 评论 -
04|创建小程序项目
原创 2020-08-22 19:33:06 · 108 阅读 · 0 评论 -
微信小程序nw.dll问题
可能是c盘满了。原创 2020-08-22 19:21:48 · 1035 阅读 · 0 评论 -
03|小程序的开发步骤
微信公众平台:https://mp.weixin.qq.com/原创 2020-08-22 17:15:14 · 97 阅读 · 0 评论 -
01|微信小程序
原创 2020-08-22 16:46:08 · 119 阅读 · 0 评论