前端配合elementui中table进行筛选
<el-input
v-model="allSubscribed"
placeholder="数据项名称"
suffix-icon="el-icon-search"
></el-input>
//输入框中的东西就是需要筛选的东西
<div class="tableList">
//.filter(item=>item.dataName.includes(allSubscribed)),dataName是我要对应的数据
<el-table
:data="tableData.stayData.filter(item=>item.dataName.includes(allSubscribed))"
style="
width: 100%;
border-radius: 5px;
background: rgba(250, 250, 250, 1);
"
>
<el-table-column
type="index"
label="序号"
width="80"
align="center"
>
</el-table-column>
<el-table-column prop="cdataId" label="数据项ID" align="center">
</el-table-column>
<el-table-column
prop="dataName"
label="数据项名称"
align="center"
>
</el-table-column>