【微信小程序】组件只读

前言

  • 调试基础库 2.12.0
  • 开发者工具 1.03.2008270

为了快速开发,将某个功能copy过来,发现拷贝过来的是个input,但是想让它看起来是只读的,该怎么做?

操作

input 为例,将其属性 disabled 设置为 true。代码为:

<input class="right-text" type='text' name='driver' value="{
      {leasingApplyCar.driver}}" placeholder="请输入驾驶人" disabled="true">input>

参考

https://developers.weixin.qq.com/miniprogram/dev/component/input.html

你可能感兴趣的:(微信小程序)