echarts icon indicating copy to clipboard operation
echarts copied to clipboard

fix: Fix position style check

Open SadWood opened this issue 1 year ago • 0 comments

Brief Information

This pull request is in the type of:

  • [x] bug fixing
  • [ ] new feature
  • [ ] others

What does this PR do?

Fixed issues

Details

Before: What was the problem?

Starting from version 6.6.10 of vue-echarts, the style of the container has been modified to include position:absolute. This change results in an update being triggered when switching routes, where an inline style of position:relative is added to the container, causing it to lose its height.

Reproducible Git repository address: https://github.com/SadWood/vue-quick-start-template/tree/echarts_bug

After: How does it behave after the fixing?

The values returned by getComputedStyle are resolved values, so it's straightforward to determine whether getComputedStyle(container, 'position') is 'absolute' or not.

Document Info

One of the following should be checked.

  • [x] This PR doesn't relate to document changes
  • [ ] The document should be updated later
  • [ ] The document changes have been made in apache/echarts-doc#xxx

Misc

ZRender Changes

  • [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

N.A.

Others

Merging options

  • [ ] Please squash the commits into a single one when merging.

Other information

SadWood avatar Apr 29 '24 01:04 SadWood