一el-tab使用(事件)
<el-tabs v-model="activeName" class="demo-tabs" @tab-change="handleClick">
<el-tab-pane label="全部" name="" />
<el-tab-pane label="进行中" name="1" />
<el-tab-pane label="已进行" name="2" />
</el-tabs>
<NetWork ref="netWorkRef" />
const activeName = ref("")
/** 切换 */
const handleClick = (name: any) => {
activeName.value = name
netWorkRef.value.queryForm.status = parseInt(activeName.value)
getEmailList()
}
vue项目使用elementUI中Tabs标签页点击切换tab-click发起网络请求数据-CSDN博客