随笔分类 -  微信小程序

摘要:1、微信提供了一个wxs,是小程序的一套脚本语言,可以利用他实现计算属性,下面用他模拟一个计算总数的实现: index.wxml: <view style="display:flex;margin:20px"> <input style="border:1px solid #000000" type 阅读全文
posted @ 2021-09-08 10:42 凌晨的粥 阅读(2938) 评论(0) 推荐(0) 编辑
摘要:1、制作一个微信上传图片的功能 <!-- index.wxml --> <view class="con"> <text class="title">上传照片</text> <view class="img_list"> <block wx:for="{{imgList}}" wx:key="ind 阅读全文
posted @ 2021-08-31 18:31 凌晨的粥 阅读(839) 评论(1) 推荐(0) 编辑
摘要:1、父组件传递给子组件值,首先在components 中新建一个testComponents子组件,代码如下: testComponents.wxml <view> <text>{{value}}</text> </view> testComponents.js Component({ /** * 阅读全文
posted @ 2021-04-15 21:55 凌晨的粥 阅读(1133) 评论(0) 推荐(0) 编辑
摘要:1、首先我们来创建弹窗的子组件,在components下面创建popup,代码如下: popup.wxml <view class="wx-popup" hidden="{{flag}}"> <view class='popup-container'> <view class="wx-popup-t 阅读全文
posted @ 2021-04-15 15:53 凌晨的粥 阅读(432) 评论(0) 推荐(0) 编辑
摘要:1、制作一个组件的菜单切换,并在父组件上引入,子组件的代码如下: <!-- Tabs.wxml --> <view class="Tabs_switch"> <view class="Tabs_title"> <view class="Tabs_modules {{item.isActive ? ' 阅读全文
posted @ 2020-11-26 23:27 凌晨的粥 阅读(295) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示