WordPress小程序教程

模板兔提供专业的wordpress小程序开发教程,教你快速入门wordpress小程序制作。

WordPress小程序教程:今天模板兔在给客户开发WordPress小程序时需要弄一个清空input的输入内容的按钮,那么如何清空微信小程序input的value内容呢? 小程序是不支持js来处理value的值的,只能通过绑定一个动态值给value,我们清空这个动态值即可。 <view class="input-wrap">       <input class="input" value="{{inputDefault}}" placeholder="多个关键字以英文逗号拼接" bindconfirm="bindInputConfirm" bindblur="bindInputBlur" />       <icon class="icon-small" type="cancel" size="20" color="#fff" bindtap="bindInputClear"></icon> </view> bindInputClear: function(e){     var that = thi...

WordPress小程序教程:WordPress小程序开发时如何自定义select下拉框组件呢?模板兔给大家讲解一下。当然,你可以使用自带的picker组件,如果想自定义,那么可以看看下面的教程。 首先新建一个components文件夹,然后在里面创建一个select目录,再创建select页面。 select.js文件代码: // components/select/select.js Component({   /**    * 组件的属性列表    */   properties: {     propArray: {       type: Array,     },     key: {       type: String,       value: 'id'     },     value: {       type: String,       value: 'name'     }   },   /**    * 组件的初始数据  ...