赞
踩
1、el-table中添加ref=“singleTableRef”
<el-table ref="singleTableRef"></el-table>
const singleTableRef= ref<InstanceType<typeof ElTable>>();
const getSelectRow=()=>{
let row = singleTableRef.value.store.states.currentRow.value;
if (row==null) {
toast("没有选中行", "warning");
return;
}
return row;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。