开启文本框自动高度后,真机文本框一行只能显示一个字,开发者工具正常。
<view class="weui-cell"> <view class="weui-cell__bd"> <textarea class="weui-textarea" bindblur="contentInput" bindinput="contentInput" placeholder="点击输入要发布的内容" value="{{content}}" style="height: 3.3em;width:100%" auto-height="true" maxlength="{{content_max}}" auto-focus="true" fixed="true"/> <view class="weui-textarea-counter">{{content_count}}/{{content_max}}</view> </view> </view> |

这个问题的相关代码能否发一下,我看能否重现
请确认下textarea的宽度是否正确?
目前是改成固定高度选用着了,等着问题解决了再换成自动高度,还有自动高度能否设置个默认最低高度,不然默认都是一行,界面会不好看。超过最低高度或者最低行数后,再自动增高,这样会不叫好点。
<viewclass="weui-cell"><viewclass="weui-cell__bd"><textareaclass="weui-textarea"bindblur="contentInput"bindinput="contentInput"placeholder="点击输入要发布的内容"value="{{content}}"style="height: 3.3em;width:100%"auto-height="true"maxlength="{{content_max}}"auto-focus="true"fixed="true"/><viewclass="weui-textarea-counter">{{content_count}}/{{content_max}}</view></view></view>/*** 页面的初始数据*/data: {title:'发布',pageHidden:false,//页面隐藏显示状态loading:false,//加载状态category_id:0,//分类IDcategory_name:'',//分类名称content:'',//内容phone:'',//手机号location: {},//定位信息content_count:0,//文本字数content_max:120,//文本最大字数uploads: [],//已上传的图片地址uploadmax:9,//最大图片数uploadall:false,//是否全部上传完成submiting:false,//提交状态switchTop:false,//是否置顶pay_fee:0,//发布金额pay_top: [],//置顶信息top_max:0,//最大置顶数top_surplus:0,//剩余置顶数array_top: [],//选项数组pay_day:0,//置顶天数},没有另外的css样式控制这个textarea宽度
宽度是100%,代码里有写
style="height: 3.3em;width:100%"自动高度后,style就无效了,文档里有写。
你设置min-height行不行呢