File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -414,15 +414,14 @@ export class VChart implements IVChart {
414
414
// 桑基图默认记载滚动条组件
415
415
pluginList . push ( 'scrollbar' ) ;
416
416
}
417
- // 额外补充部分钩子
417
+ // hook增加图表实例参数
418
418
const performanceHook = { ...( restOptions . performanceHook || { } ) } ;
419
- ( [ 'beforeDoRender' ] as ( keyof IPerformanceHook ) [ ] ) . forEach ( hookKey => {
420
- performanceHook [ hookKey ] &&
419
+ ( Object . keys ( performanceHook ) as ( keyof IPerformanceHook ) [ ] ) . forEach ( hookKey => {
420
+ // @ts -ignore
421
+ restOptions . performanceHook [ hookKey ] = ( ...args ) => {
421
422
// @ts -ignore
422
- ( restOptions . performanceHook [ hookKey ] = ( ...args ) => {
423
- // @ts -ignore
424
- performanceHook [ hookKey ] ( ...args , this as any ) ;
425
- } ) ;
423
+ performanceHook [ hookKey ] ( ...args , this as any ) ;
424
+ } ;
426
425
} ) ;
427
426
428
427
this . _compiler = new Compiler (
You can’t perform that action at this time.
0 commit comments