![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Vue
潘小盒
Keep Moving!
展开
-
element UI给树形控件一个默认选中的值
<el-tree :data="treeData" :props="defaultProps" node-key="id" :highlight-current=true ref="tree"></el-tree>在获取到treeData后,再给current-node-key赋值import {ref, reactive, toRefs, onMounted, nextTick } from 'vue'setup(){ const tree = ref(null)原创 2021-11-05 17:03:58 · 879 阅读 · 0 评论 -
利用 bodyWrapper 实现表格自动滚动
<el-table ref="myTable"> ......</el-table> Vue2获取element表格的bodyWrapperthis.$refs.myTable.bodyWrapperVue3获取element表格的bodyWrapperconst myTable = ref(null)onMounted(() => { const tableBody = myTable.value.$refs.bodyWrapper})return原创 2021-10-13 15:25:41 · 4761 阅读 · 4 评论