mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-11-06 21:18:32 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d0357c8f31 | |||
| cde7c33a32 | |||
| 963c204da4 | |||
| bee810ead3 | |||
| 1301014626 |
@ -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).
|
||||||
|
|||||||
@ -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)中的变更记录,之后迁移过程应该会相对简单。
|
||||||
|
|
||||||
## 本地开发
|
## 本地开发
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user