Compare commits

..

5 Commits
v7.0.3 ... 7.x

Author SHA1 Message Date
d0357c8f31 docs: remove english in Chinese README 2025-08-05 18:03:16 +08:00
cde7c33a32 docs: fix v6 zh docs link 2025-07-08 10:50:35 +08:00
963c204da4 docs: remove showLoading and hideLoading (#842)
* docs: remove showLoading and hideLoading

* docs: add note for `showLoading` and `hideLoading` method
2025-07-02 18:31:57 +08:00
bee810ead3 docs: fix typo in readme cn 2025-06-07 18:00:02 +08:00
1301014626 fix: not auto-resize when the container size is 0, closes #831 2025-05-23 15:10:03 +08:00
3 changed files with 14 additions and 9 deletions

View File

@ -439,13 +439,14 @@ import { THEME_KEY } from 'vue-echarts'
- `convertToPixel` [](https://echarts.apache.org/en/api.html#echartsInstance.convertToPixel) - `convertToPixel` [](https://echarts.apache.org/en/api.html#echartsInstance.convertToPixel)
- `convertFromPixel` [](https://echarts.apache.org/en/api.html#echartsInstance.convertFromPixel) - `convertFromPixel` [](https://echarts.apache.org/en/api.html#echartsInstance.convertFromPixel)
- `containPixel` [](https://echarts.apache.org/en/api.html#echartsInstance.containPixel) - `containPixel` [](https://echarts.apache.org/en/api.html#echartsInstance.containPixel)
- `showLoading` [](https://echarts.apache.org/en/api.html#echartsInstance.showLoading)
- `hideLoading` [](https://echarts.apache.org/en/api.html#echartsInstance.hideLoading)
- `getDataURL` [](https://echarts.apache.org/en/api.html#echartsInstance.getDataURL) - `getDataURL` [](https://echarts.apache.org/en/api.html#echartsInstance.getDataURL)
- `getConnectedDataURL` [](https://echarts.apache.org/en/api.html#echartsInstance.getConnectedDataURL) - `getConnectedDataURL` [](https://echarts.apache.org/en/api.html#echartsInstance.getConnectedDataURL)
- `clear` [](https://echarts.apache.org/en/api.html#echartsInstance.clear) - `clear` [](https://echarts.apache.org/en/api.html#echartsInstance.clear)
- `dispose` [](https://echarts.apache.org/en/api.html#echartsInstance.dispose) - `dispose` [](https://echarts.apache.org/en/api.html#echartsInstance.dispose)
> [!NOTE]
> [`showLoading`](https://echarts.apache.org/en/api.html#echartsInstance.showLoading) and [`hideLoading`](https://echarts.apache.org/en/api.html#echartsInstance.hideLoading) are not exposed. Use the **`loading`** and **`loading-options`** props.
### Static Methods ### Static Methods
Static methods can be accessed from [`echarts` itself](https://echarts.apache.org/en/api.html#echarts). Static methods can be accessed from [`echarts` itself](https://echarts.apache.org/en/api.html#echarts).

View File

@ -6,7 +6,7 @@
--- ---
> 还在使用 v6可以继续阅读老版本的文档。[前往 →](https://github.com/ecomfe/vue-echarts/blob/6.x/README.zh_CN.md) > 还在使用 v6可以继续阅读老版本的文档。[前往 →](https://github.com/ecomfe/vue-echarts/blob/6.x/README.zh-Hans.md)
## 安装 & 使用 ## 安装 & 使用
@ -359,7 +359,7 @@ Vue-ECharts 支持如下事件:
#### 原生 DOM 事件 #### 原生 DOM 事件
由于 Vue-ECharts 默认将事件绑定到 ECharts 实例,因此在使用原生 DOM 事件时需要做一些特殊处理。你需要在事件名称前加上 `native:` 前缀来绑定原生 DOM 事件(可以在 Vue 2 中也可以使用 `.native` 修饰符,但这在 Vue 3 中已被废弃)。 由于 Vue-ECharts 默认将事件绑定到 ECharts 实例,因此在使用原生 DOM 事件时需要做一些特殊处理。你需要在事件名称前加上 `native:` 前缀来绑定原生 DOM 事件(在 Vue 2 中也可以使用 `.native` 修饰符,但这在 Vue 3 中已被废弃)。
```vue ```vue
<template> <template>
@ -439,13 +439,14 @@ import { THEME_KEY } from 'vue-echarts'
- `convertToPixel` [](https://echarts.apache.org/zh/api.html#echartsInstance.convertToPixel) - `convertToPixel` [](https://echarts.apache.org/zh/api.html#echartsInstance.convertToPixel)
- `convertFromPixel` [](https://echarts.apache.org/zh/api.html#echartsInstance.convertFromPixel) - `convertFromPixel` [](https://echarts.apache.org/zh/api.html#echartsInstance.convertFromPixel)
- `containPixel` [](https://echarts.apache.org/zh/api.html#echartsInstance.containPixel) - `containPixel` [](https://echarts.apache.org/zh/api.html#echartsInstance.containPixel)
- `showLoading` [](https://echarts.apache.org/zh/api.html#echartsInstance.showLoading)
- `hideLoading` [](https://echarts.apache.org/zh/api.html#echartsInstance.hideLoading)
- `getDataURL` [](https://echarts.apache.org/zh/api.html#echartsInstance.getDataURL) - `getDataURL` [](https://echarts.apache.org/zh/api.html#echartsInstance.getDataURL)
- `getConnectedDataURL` [](https://echarts.apache.org/zh/api.html#echartsInstance.getConnectedDataURL) - `getConnectedDataURL` [](https://echarts.apache.org/zh/api.html#echartsInstance.getConnectedDataURL)
- `clear` [](https://echarts.apache.org/zh/api.html#echartsInstance.clear) - `clear` [](https://echarts.apache.org/zh/api.html#echartsInstance.clear)
- `dispose` [](https://echarts.apache.org/zh/api.html#echartsInstance.dispose) - `dispose` [](https://echarts.apache.org/zh/api.html#echartsInstance.dispose)
> [!NOTE]
> [`showLoading`](https://echarts.apache.org/zh/api.html#echartsInstance.showLoading) 和 [`hideLoading`](https://echarts.apache.org/zh/api.html#echartsInstance.hideLoading) 未被暴露,请使用 **`loading`** 和 **`loading-options`** prop。
### 静态方法 ### 静态方法
静态方法请直接通过 [`echarts` 本身](https://echarts.apache.org/zh/api.html#echarts)进行调用。 静态方法请直接通过 [`echarts` 本身](https://echarts.apache.org/zh/api.html#echarts)进行调用。
@ -458,9 +459,6 @@ import { THEME_KEY } from 'vue-echarts'
## 迁移到 v7 ## 迁移到 v7
Translate:
Read the breaking changes document in the [release log](https://github.com/ecomfe/vue-echarts/releases/tag/v7.0.0-beta.0) and the migration shoud be straightforward.
请阅读[发布日志](https://github.com/ecomfe/vue-echarts/releases/tag/v7.0.0-beta.0)中的变更记录,之后迁移过程应该会相对简单。 请阅读[发布日志](https://github.com/ecomfe/vue-echarts/releases/tag/v7.0.0-beta.0)中的变更记录,之后迁移过程应该会相对简单。
## 本地开发 ## 本地开发

View File

@ -40,6 +40,12 @@ export function useAutoresize(
return; return;
} }
} }
// Skip if container has zero size
if (root.offsetWidth === 0 || root.offsetHeight === 0) {
return;
}
resizeCallback(); resizeCallback();
}); });
ro.observe(root); ro.observe(root);