File tree 1 file changed +4
-2
lines changed
packages/vchart/src/plugin/components/tooltip-handler
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -268,8 +268,11 @@ export class DomTooltipHandler extends BaseTooltipHandler {
268
268
row . classList . add ( `${ TOOLTIP_PREFIX } -${ colName } ` ) ;
269
269
colDiv . appendChild ( row ) ;
270
270
}
271
+ let styleByRow = index === content . length - 1 ? { } : { ...rowStyle } ;
272
+
273
+ styleByRow . display = entry . visible === false ? 'none' : 'block' ;
271
274
// 每次更新,需要更新单元格的高度,防止同步高度的时候没有更新
272
- let styleByRow = index === content . length - 1 ? { height : 'initial' } : { ... rowStyle , height : 'initial' } ;
275
+ styleByRow . height = 'initial' ;
273
276
274
277
if ( colName === 'key' ) {
275
278
row . innerHTML = formatContent ( entry . key ) ;
@@ -282,7 +285,6 @@ export class DomTooltipHandler extends BaseTooltipHandler {
282
285
styleByRow = { ...styleByRow , ...getTextStyle ( entry . valueStyle ) } ;
283
286
}
284
287
} else if ( colName === 'shape' ) {
285
- styleByRow . display = entry . hasShape ? 'inline-block' : 'none' ;
286
288
row . innerHTML = getSvgHtml ( entry ) ;
287
289
}
288
290
You can’t perform that action at this time.
0 commit comments