Skip to content

Commit

Permalink
fix: update player component when theme switching
Browse files Browse the repository at this point in the history
  • Loading branch information
zamhown authored and skie1997 committed Jan 18, 2024
1 parent c9b0099 commit 0eb062d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vchart/src/component/player/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ export class Player extends BaseComponent<IPlayer> implements IComponent {
if (!isEqual(attrs, this._cacheAttrs)) {
this._cacheAttrs = attrs;
this._playerComponent.setAttributes(attrs);
// FIXME: player 组件没有重写 setAttributes 方法,因此不能正常更新样式。以下两句模拟执行了 setAttributes 方法,但是应在 vrender-component 的后续版本中实现 setAttributes 方法
this._playerComponent._initAttributes();
this._playerComponent.render();
}
} else {
if (attrs.type === 'discrete') {
Expand Down

0 comments on commit 0eb062d

Please sign in to comment.