Skip to content

Commit

Permalink
fix: add model params name
Browse files Browse the repository at this point in the history
  • Loading branch information
危翰 committed Mar 31, 2023
1 parent 723e13b commit a1b9d0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/component/tooltip/TooltipModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ export interface TooltipOption extends CommonTooltipOption<TopLevelFormatterPara
*/
appendToBody?: boolean

/**
* If append popup dom to some other dom element
* Only available when renderMode is html
*/
appendTo?: Function | string | HTMLElement


/**
* specified class name of tooltip dom
* Only available when renderMode is html
Expand Down
2 changes: 1 addition & 1 deletion src/component/tooltip/TooltipView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class TooltipView extends ComponentView {
this._tooltipContent = renderMode === 'richText'
? new TooltipRichContent(api)
: new TooltipHTMLContent(api, {
appendTo: tooltipModel.get('appendToBody', true) ? 'body' : tooltipModel.get('getAppendElement', true),
appendTo: tooltipModel.get('appendToBody', true) ? 'body' : tooltipModel.get('appendTo', true),
});
}

Expand Down

0 comments on commit a1b9d0f

Please sign in to comment.