2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
In the el-table component of Element Plus, you can use CSS to set the mouse style when sliding over a row. You can use the cursor property of CSS to define the style when the mouse hovers. The following is a simple example:
First, in your Vue component
.el-table .el-table__row:hover {
cursor: pointer; /* 这里可以更改为其他的光标样式,比如 'crosshair', 'help', 'move', 'not-allowed' 等 */
}
This CSS will be applied to each row in your el-table (el-table__row), and will display the specified cursor style when the mouse hovers over it.
Next, make sure your el-table is rendered correctly in your component template:
<template>
<el-table
:data="tableData"
@current-change="handleSelectionChange"
style="width: 100%"
>
<!-- 你的 el-table-column 定义 -->
</el-table>
</template>
<script>
export default {
data() {
return {
tableData: [
// 你的数据数组
]
}
}
methord:{
handleSelectionChange(val) {
this.multipleSelection = val;
console.log(val)
// let api = new ModellingServiceApi()
// await api.deleteNode({sid: this.psssData.id?this.psssData.id:1,nodeId:this.selectNodeData.nodeId })
},
}
}
</script>
The above is the entire content of the article. If you like this article, I hope you can support it by giving it a triple like. Thank you!