vue踩坑记
1:https://blog.csdn.net/weixin_43824717/article/details/89192840
后台获取的数据对象必须有value关键字,因为autocomplete只识别value字段
{
"bld": [68767, 8076],
"value": "8.1.2"
},所以把后台返回的字段改成有value
2:https://www.zhangshengrong.com/p/w4N77WVNrl/
3:scope
<el-table-column label="测试报告" width="150">
<template scope="scope">
<span v-if="(scope.row.state==='已完成')|| (scope.row.state==='通过')||(scope.row.state==='失败')">
<el-button size="small" @click="handleDetail(scope.$index, scope.row)" v-model="reportVisible">详情
</el-table-column>
4:slot-scope="{item}"
<el-autocomplete popper-class="my-autocomplete" v-model="statestate" :fetch-suggestions="queryRegressApv"
placeholder="版本" style="width: 200px" @select="handleSelect" clearable>
class="el-input__icon"
slot="suffix"
@click="handleIconClick">
<template slot-scope="{item}" >
<div class="name" >{{item.value}}
<span class="name">回归build号:{{item.bld}}
</el-form-item>
如何清空上述框的内容?只需在函数里令this.statestate='';即可
3: callback is not a function mounted是初始化或者定时任务的 ,callback函数是模糊查询组件固有的函数,最好是在模糊查询组件才能调用