File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { conductExpandParent } from '../vc-tree/util';
1818import { calcRangeKeys , convertDirectoryKeysToNodes } from './utils/dictUtil' ;
1919import useConfigInject from '../_util/hooks/useConfigInject' ;
2020import { filterEmpty } from '../_util/props-util' ;
21+ import { ScrollTo } from "../vc-tree/interface" ;
2122
2223export type ExpandAction = false | 'click' | 'doubleclick' | 'dblclick' ;
2324
@@ -81,7 +82,11 @@ export default defineComponent({
8182 const cachedSelectedKeys = ref < Key [ ] > ( ) ;
8283 const fieldNames = computed ( ( ) => fillFieldNames ( props . fieldNames ) ) ;
8384 const treeRef = ref ( ) ;
85+ const scrollTo : ScrollTo = scroll => {
86+ treeRef . value ?. scrollTo ( scroll ) ;
87+ } ;
8488 expose ( {
89+ scrollTo,
8590 selectedKeys : computed ( ( ) => treeRef . value ?. selectedKeys ) ,
8691 checkedKeys : computed ( ( ) => treeRef . value ?. checkedKeys ) ,
8792 halfCheckedKeys : computed ( ( ) => treeRef . value ?. halfCheckedKeys ) ,
You can’t perform that action at this time.
0 commit comments