随笔分类 - 微信小程序
摘要:1、微信提供了一个wxs,是小程序的一套脚本语言,可以利用他实现计算属性,下面用他模拟一个计算总数的实现: index.wxml: <view style="display:flex;margin:20px"> <input style="border:1px solid #000000" type
阅读全文
摘要:1、制作一个微信上传图片的功能 <!-- index.wxml --> <view class="con"> <text class="title">上传照片</text> <view class="img_list"> <block wx:for="{{imgList}}" wx:key="ind
阅读全文
摘要:1、父组件传递给子组件值,首先在components 中新建一个testComponents子组件,代码如下: testComponents.wxml <view> <text>{{value}}</text> </view> testComponents.js Component({ /** *
阅读全文
摘要:1、首先我们来创建弹窗的子组件,在components下面创建popup,代码如下: popup.wxml <view class="wx-popup" hidden="{{flag}}"> <view class='popup-container'> <view class="wx-popup-t
阅读全文
摘要:1、制作一个组件的菜单切换,并在父组件上引入,子组件的代码如下: <!-- Tabs.wxml --> <view class="Tabs_switch"> <view class="Tabs_title"> <view class="Tabs_modules {{item.isActive ? '
阅读全文