微信小程序,不同的输入框显示
<!--pages/index/Component/TextInput/TextInput.wxml-->
<view class=
"viewTitle"
>
<text class=
"view-Name"
>TextInput输入框展示</text>
<view class=
"lineView"
></view>
</view>
<view class=
"section"
>
<input class=
"input"
placeholder-style=
"font-size:15px"
placeholder=
"自动聚焦弹出键盘,一个页面中只能有一个"
auto-focus/>
</view>
<view class=
"section"
>
<input class=
"input"
placeholder=
"此处只有在点击下方按钮时才聚焦"
focus=
"{{focus}}"
/>
</view>
<view class=
"section1"
>
<button bindtap=
"bindButtonTap"
>使得输入框获取焦点</button>
</view>
<view class=
"section"
>
<input class=
"input"
maxlength=
"10"
placeholder=
"最大输入长度10"
/>
</view>
<view class=
"section__title"
>你输入的是:{{inputValue}}</view>
<view class=
"section"
>
<input class=
"input"
bindinput=
"bindKeyInput"
placeholder=
"输入同步到view中"
/>
</view>
<view class=
"section"
>
<input class=
"input"
bindinput=
"bindReplaceInput"
placeholder=
"连续的两个1会变成2"
/>
</view>
<view class=
"section"
>
<input class=
"input"
bindinput=
"bindHideKeyboard"
placeholder=
"输入123自动收起键盘"
/>
</view>
<view class=
"section"
>
<input class=
"input"
type=
"number"
placeholder=
"这是一个数字输入框"
/>
</view>
<view class=
"section"
>
<input class=
"input"
password type=
"text"
placeholder=
"这是一个密码输入框"
/>
</view>
<view class=
"section"
>
<input class=
"input"
type=
"digit"
placeholder=
"带小数点的数字键盘"
/>
</view>
<view class=
"section"
>
<input class=
"input"
type=
"idcard"
placeholder=
"身份证输入键盘"
/>
</view>
<view class=
"section"
>
<input class=
"input"
placeholder-style=
"color:red"
placeholder=
"占位符字体是红色的"
/>
</view>
微信小程序,不同的输入框显示的更多相关文章
- 微信小程序开发--背景图显示
这两天开发微信小程序,在设置背景图片时,发现在wxss里面设置 background-image:(url) 属性,不管是开发工具还是线上都无法显示.经过查资料发现,background-image ...
- 微信小程序列表项滑动显示删除按钮
微信小程序并没有提供列表控件,所以也没有iOS上惯用的列表项左滑删除的功能,SO只能自己干了. 原理很简单,用2个层,上面的层显示正常的内容,下面的层显示一个删除按钮,就是记录手指滑动的距离,动态的来 ...
- 微信小程序:input输入框和form表单几种传值和取值方式
1.传值:index下标传值.页面navigator传值 1.index下标 实现方式是:data-index="{{index}}"挖坑及e.currentTarget.data ...
- 解决微信小程序开发者工具输入框焦点问题
Windows10笔记本上运行微信小程序开发者工具,输入框(input,textarea)没有焦点,只能在真机调试,效率太低.后来发现是Window10对笔记本高分屏支持不好,要DPI缩放,导致兼容性 ...
- 微信小程序中视频的显示与隐藏
在微信小程序中实现视频的播放与暂停 需求: 视频列表中只能有一个视频在播放 点击视频实现播放与暂停功能 加载完成显示图片,点击后变为视频播放 从上次播放的位置进行播放 思路: 定义一个标记变量,控制视 ...
- 【微信小程序】tabBar的显示问题
tabBar不显示 在app.json中配置了4个页面,在tabBar的list中随意写了两个页面,编译后发现不能显示tabBar. { "pages": [ "page ...
- 微信小程序图片宽100%显示并且不变形
<view class="meiti" style="background-color:red;"> <image src="htt ...
- 微信小程序open-data userAvatarUrl圆角显示
从年初开始,打开小程序,工具栏都会弹出这个提醒: 也就是,默认不弹出授权询问框,默认获取不到用户信息(头像.昵称等)! 如果你需要用到这个接口,可以尝试以下方法: 1.用 button 组件,将属性名 ...
- 微信小程序判断按钮是否显示,或者隐藏
js中: onLoad:function(options) { this.setData({ orderstate:'待送检' }) }, WXML中: <view wx:if=" ...
- 微信小程序 - 考试状态不同显示
未开考 .已交卷. 考试中 .考试结束 #ddd #f00 #ff0 默认禁用色 禁用的button仅有style起作用,四个状态,通过wx:if ... elif ... e ...
随机推荐
- baidumap demo(三)
定位 您可以通过以下代码来开启定位功能: 源码复制打印关于 //开启定位功能 [_mapView setShowsUserLocation:YES]; 定位成功后,可以通过mapView.userLo ...
- Instance Methods are Curried Functions in Swift
An instance method in Swift is just a type method that takes the instance as an argument and returns ...
- OJ 大整数减法
描述 求两个大的正整数相减的差. 输入 共2行,第1行是被减数a,第2行是减数b(a > b).每个大整数不超过200位,不会有多余的前导零. 输出 一行,即所求的差. 样例输入 9999999 ...
- TB平台搭建之二
主要想记录关于debug问题: 一般我会1.定位问题所在位置比如使能信号错误.地址读写错误.数据流pipeline错误.... 2.首先看问题的源头(对应信号)是否还正确,比如出现XX要查看她的第一级 ...
- python插件,pycharm基本用法,markdown文本编写,jupyter notebook的基本操作汇总
5.14自我总结 一.python插件插件相关技巧汇总 安装在cmd上运行 #比如安装 安装:wxpy模块(支持 Python 3.4-3.+ 以及 2.7 版本):pip3 install wxpy ...
- js事件,操作页面文档,计算后样式,数据类型
js:运行在浏览器的脚本语言 js引入 1.行间式:存在于行间事件中 <div id="div" onclick="this.style.color="r ...
- 循环链表的C风格实现(单向)
头文件: #ifndef _CIRCLELIST_H_ #define _CIRCLELIST_H_ typedef void CircleList; // typedef struct _tag_C ...
- windows中阿里的自动化测试macaca安装配置
一.环境配置 node cnpm环境安装 安卓环境配置 参考文档https://macacajs.github.io/zh/environment-setup 全局安装macaca-cli macac ...
- Debian7配置LAMP(Apache/MySQL/PHP)环境及搭建建站
完整Debian7配置LAMP(Apache/MySQL/PHP)环境及搭建建站 第一.安装和配置Apache Web服务器 运行升级命令来确保我们的系统组件各方面都是最新的. apt-get upd ...
- spring常用的注解
一.使用注解之前要开启自动扫描功能,其中base-package为需要扫描的包(含子包). <context:component-scan base-package="cn.test& ...