易科技 建设网站,软件界面设计与色彩搭配,国外可以做网站盈利模式有哪些,湖南高端网站制作公司问题#xff1a;下拉框数据是通过接口请求得到的, 通过change事件打印, select绑定的值和options的值,也能对应起来, 数据类型也一致, 排除了数据的原因, 应该就是视图没有更新了:
原因: 问过度娘后得知, 是因为数据层数太多, render函数没有更新,
解决方法: 1. 使用for…问题下拉框数据是通过接口请求得到的, 通过change事件打印, select绑定的值和options的值,也能对应起来, 数据类型也一致, 排除了数据的原因, 应该就是视图没有更新了:
原因: 问过度娘后得知, 是因为数据层数太多, render函数没有更新,
解决方法: 1. 使用forceUpdate手动强制刷新 在select 里添加以下代码
change$forceUpdate() 2. 使用$set重新赋值
el-select v-modelitem.value changeaa(index,dataList[index].value)el-optionv-foritems in memberList:keyitems.id:labelitems.name:valueitems.id/
/el-select
aa(num, val) {if (val) {this.$set(this.dataList, this.dataList[num].value, val)} else {this.$set(this.dataList, this.dataList[num].value, )}
},