File tree 1 file changed +5
-0
lines changed
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';
18
18
import { calcRangeKeys , convertDirectoryKeysToNodes } from './utils/dictUtil' ;
19
19
import useConfigInject from '../_util/hooks/useConfigInject' ;
20
20
import { filterEmpty } from '../_util/props-util' ;
21
+ import { ScrollTo } from "../vc-tree/interface" ;
21
22
22
23
export type ExpandAction = false | 'click' | 'doubleclick' | 'dblclick' ;
23
24
@@ -81,7 +82,11 @@ export default defineComponent({
81
82
const cachedSelectedKeys = ref < Key [ ] > ( ) ;
82
83
const fieldNames = computed ( ( ) => fillFieldNames ( props . fieldNames ) ) ;
83
84
const treeRef = ref ( ) ;
85
+ const scrollTo : ScrollTo = scroll => {
86
+ treeRef . value ?. scrollTo ( scroll ) ;
87
+ } ;
84
88
expose ( {
89
+ scrollTo,
85
90
selectedKeys : computed ( ( ) => treeRef . value ?. selectedKeys ) ,
86
91
checkedKeys : computed ( ( ) => treeRef . value ?. checkedKeys ) ,
87
92
halfCheckedKeys : computed ( ( ) => treeRef . value ?. halfCheckedKeys ) ,
You can’t perform that action at this time.
0 commit comments