
在vue3中element-plus如何设置el-table默认全选
element
A Vue.js 2.0 UI Toolkit for Web
项目地址:https://gitcode.com/gh_mirrors/eleme/element
·
首先我们使用ref引用el-table标签
然后在挂载函数中调用el-table的函数toggleAllSelection,即可实现全部勾选
<script setup>
import {ref} from 'vue'
const table=ref(null);
onMounted(()=>{
table.value.toggleAllSelection();
})
</script>
<template>
<el-table ref="table" :data="dataList">
<el-table-column type="selection" />
</el-table >
</template>
A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:5 个月前 )
c345bb45
9 个月前
a07f3a59
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update table.md
* Update transition.md
* Update popover.md 9 个月前
更多推荐




所有评论(0)