<u-select v-model="show" :list="typeList" mode="single-column" @confirm="confirm"></u-select>
在data里面定义
typeList: [ ],
直接使用es6新特性的模板字符串
result.forEach((item, index) => { _this.typeList.push({ label: `${item.DataName}\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0${item.SparePartNumber}`, value: item.SparePartId })
中间的\xa0是空格
uniapp+uview的select选择器单选择一行展示两个数据
于 2022-10-18 15:53:57 首次发布