一个el-input联动,默认选中的那种,要先拿到联动‘el-input’里面选中的id,才能请求表格的数据,然后我在methods里写方法,created调,一直拿不到数据)。
有两种方法:1 在第一个方法里面写第二个方法,第二个方法里面写第三个,以此类推
2 用async 和 await(先把el-input默认显示数据的方法getcontarctList(){
比如这是查询 PowerGridList(电网);StorageList(储能)
async getList(){
var PowerGridList = await resPowerGrid() (resPowerGrid是接口的方法)
var StorageList = await getCharge()
if(PowerGridList.success){
this.tractList = PowerGridList.obj;
}
if(StorageList.success){
this.chioceproList = StorageList.obj.recds;
}
下面把字段传给后端,就ok啦
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。