|
9 | 9 | isEmpty, |
10 | 10 | isFunction, |
11 | 11 | isString, |
12 | | - merge, |
13 | 12 | once, |
14 | 13 | } from 'lodash'; |
15 | 14 | import { hideColumnsByThunkGroup } from '@/utils/hide-columns'; |
@@ -366,15 +365,18 @@ export abstract class SpreadSheet extends EE { |
366 | 365 | */ |
367 | 366 | public setThemeCfg(themeCfg: ThemeCfg) { |
368 | 367 | const theme = themeCfg?.theme || {}; |
369 | | - this.theme = merge({}, getTheme({ ...themeCfg, spreadsheet: this }), theme); |
| 368 | + this.theme = customMerge( |
| 369 | + getTheme({ ...themeCfg, spreadsheet: this }), |
| 370 | + theme, |
| 371 | + ); |
370 | 372 | } |
371 | 373 |
|
372 | 374 | /** |
373 | 375 | * Update pagination config which store in {@see options} |
374 | 376 | * @param pagination |
375 | 377 | */ |
376 | 378 | public updatePagination(pagination: Pagination) { |
377 | | - this.options = merge({}, this.options, { |
| 379 | + this.options = customMerge(this.options, { |
378 | 380 | pagination, |
379 | 381 | }); |
380 | 382 |
|
@@ -406,7 +408,7 @@ export abstract class SpreadSheet extends EE { |
406 | 408 | return; |
407 | 409 | } |
408 | 410 |
|
409 | | - this.options = merge({}, this.options, { width, height }); |
| 411 | + this.options = customMerge(this.options, { width, height }); |
410 | 412 | // resize the canvas |
411 | 413 | this.container.changeSize(width, height); |
412 | 414 | } |
@@ -446,8 +448,7 @@ export abstract class SpreadSheet extends EE { |
446 | 448 | */ |
447 | 449 | public updateScrollOffset(offsetConfig: OffsetConfig): void { |
448 | 450 | this.facet.updateScrollOffset( |
449 | | - merge( |
450 | | - {}, |
| 451 | + customMerge( |
451 | 452 | { |
452 | 453 | offsetX: { |
453 | 454 | value: undefined, |
|
0 commit comments