RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
微信小程序中input组件用法

这篇文章主要介绍微信小程序中input 组件用法,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

曲松网站建设公司创新互联,曲松网站设计制作,有大型网站制作公司丰富经验。已为曲松超过千家提供企业网站建设服务。企业网站搭建\外贸网站建设要多少钱,请找那个售后服务好的曲松做网站的公司定做!

微信小程序中input 组件用法

input输入框使用的频率也是比较高的。。。样式的话自己外面包裹个view自己定义。input属性也不是很多,有需要自己慢慢测,尝试

主要属性:

微信小程序中input 组件用法

wxml





 



 
 
登录

js

Page({
 /**
 * 初始化数据
 */
 data:{
 phone: '',
 password: '',
 },
 
 /**
 * 监听手机号输入
 */
 listenerPhoneInput: function(e) {
  this.data.phone = e.detail.value;
 
 },
 
 /**
 * 监听密码输入
 */
 listenerPasswordInput: function(e) {
  this.data.password = e.detail.value;
 },
 
 /**
 * 监听登录按钮
 */
 listenerLogin: function() {
  //打印收入账号和密码
 console.log('手机号为: ', this.data.phone);
 console.log('密码为: ', this.data.password);
 },
 
 onLoad:function(options){
 // 页面初始化 options为页面跳转所带来的参数
 },
 onReady:function(){
 // 页面渲染完成
 },
 onShow:function(){
 // 页面显示
 },
 onHide:function(){
 // 页面隐藏
 },
 onUnload:function(){
 // 页面关闭
 }
})

wxss

.input{
 padding-left: 10px;
 height: 44px;
}
 
.inputView{
 border: 2px solid red;
 border-radius: 40px;
 margin-left: 15px;
 margin-right: 15px;
 margin-top: 15px;
}

以上是“微信小程序中input 组件用法”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注创新互联行业资讯频道!


文章题目:微信小程序中input组件用法
当前网址:http://sczitong.cn/article/pgohjj.html