收藏
回答

列表渲染后数值前面怎么有个点?

框架类型 问题类型 终端类型 微信版本 基础库版本
小程序 Bug 客户端 6.5.3 2.3.0

- 当前 Bug 的表现(可附
截图)

<!--index.wxml-->

<view wx:if="{{devicenamearr.length>0}}"class='item' wx:for="{{devicenamearr}}">


<view  class='yangshi'>


<view class="yangshi1">器材名称</view>


<view class='yangshi2'>{{item.devicename}}




</view>


</view>




<view class='yangshi'>


<view class='yangshi1'>数量</view>


.


<view class='yangshi2'>{{item.shuliang}}




</view>


</view>


</view>


<view class="section">

<view class="section__title">器材名称</view>

<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">

<view class="picker">

当前 :{{devicename}}

</view>

</picker>

</view>


<view class='yangshi'>


<view class='yangshi1'>数量</view>


<input class='yangshi2' name="shuliang" placeholder="数量" type="number" bindinput="inputnum" id='{{i}}'auto-focus />


</view>





<button class='button7' bindtap='tianjia'>+</button>





Page({

data: {

devicename: '1',

shuliang: 1,

devicenamearr: [],

array:[1,2,3,4]


},


tianjia(e) {

var devicename = this.data.devicename

var shuliang = this.data.shuliang

var devicenamearr = this.data.devicenamearr

if (shuliang.length > 0) {

var o = {}

o = {

devicename: devicename,

shuliang: shuliang

}

devicenamearr.push(o)


}


console.log('-------------' + devicenamearr[0])

this.setData({

devicenamearr: devicenamearr,


})


},

// 点击下拉显示框

bindPickerChange: function (e) {

var devicename = this.data.array[e.detail.value];

console.log(e)


this.setData({

devicename: devicename

});

console.log('devicename' + devicename)

},


inputnum: function (e) {


let shuliang = e.detail.value


this.setData({

shuliang: shuliang

})

}







})


- 预期表现


- 复现路径


- 提供一个最简复现 Demo


回答关注问题邀请回答
收藏

2 个回答

  • 2018-10-30

    。。。。。。。。。。。。

    2018-10-30
    有用
    回复
  • จุ๊บ
    จุ๊บ
    2018-10-30

    你自己写的点啊

    2018-10-30
    有用
    回复 1
    • 鸡鸡鸡镜。
      鸡鸡鸡镜。
      2018-10-30

      hhhhhhhhhhh

      2018-10-30
      回复
登录 后发表内容