微信小程序 组件Boolean在wxml中的书写方式
以show-confirm-bar为例:
show-confirm-bar的类型是Boolean类型,默认值为true.
如果我们想显示按钮在wxml中有两种方式
①.<textarea show-confirm-bar placeholder="请输入" />
②.<textarea show-confirm-bar="{{true}}" placeholder="请输入" />
不想显示按钮也有两种方式
①.<textarea show-confirm-bar="" placeholder="请输入" />
①.<textarea show-confirm-bar="{{false}}" placeholder="请输入" />
注:上边写的true&false不必在data中定义,可以直接识别.