Skip to content

Commit e967bfc

Browse files
committed
docs: update migration part in readme
1 parent a9c54e1 commit e967bfc

File tree

2 files changed

+6
-57
lines changed

2 files changed

+6
-57
lines changed

README.md

+2-29
Original file line numberDiff line numberDiff line change
@@ -454,36 +454,9 @@ Static methods can be accessed from [`echarts` itself](https://echarts.apache.or
454454
455455
If you are applying a CSP to prevent inline `<style>` injection, you need to use `vue-echarts/csp` instead of `vue-echarts` and include `vue-echarts/csp/style.css` manually.
456456
457-
## Migration to v6
457+
## Migration to v7
458458
459-
> 💡 Please make sure to read the [migration guide](https://echarts.apache.org/en/tutorial.html#ECharts%205%20Upgrade%20Guide) for ECharts 5 as well.
460-
461-
The following breaking changes are introduced in `vue-echarts@6`:
462-
463-
### Vue 2 support
464-
465-
- If you are using version prior to `vue@2.7.0`, `@vue/composition-api` is required to be installed to use Vue-ECharts with Vue 2 (and also `@vue/runtime-core` for TypeScript support).
466-
467-
### Props
468-
469-
- `options` is renamed to **`option`** to align with ECharts itself.
470-
- Updating `option` will respect **`update-options`** configs instead of checking reference change.
471-
- `watch-shallow` is removed. Use **`manual-update`** for performance critical scenarios.
472-
473-
### Methods
474-
475-
- `mergeOptions` is renamed to **`setOption`** to align with ECharts itself.
476-
- `showLoading` and `hideLoading` is removed. Use the **`loading` and `loading-options`** props instead.
477-
- `appendData` is removed. (Due to ECharts 5's breaking change.)
478-
- All static methods are removed from `vue-echarts`. Use those methods from `echarts` directly.
479-
480-
### Computed getters
481-
482-
- Computed getters (`width`, `height`, `isDisposed` and `computedOptions`) are removed. Use the **`getWidth`, `getHeight`, `isDisposed` and `getOption`** methods instead.
483-
484-
### Styles
485-
486-
- Now the root element of the component have **`100%×100%`** size by default, instead of `600×400`.
459+
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.
487460
488461
## Local development
489462

README.zh-Hans.md

+4-28
Original file line numberDiff line numberDiff line change
@@ -456,36 +456,12 @@ import { THEME_KEY } from 'vue-echarts'
456456
457457
如果你正在应用 CSP 来防止内联 `<style>` 注入,则需要使用 `vue-echarts/csp` 代替 `vue-echarts`,并手动引入 `vue-echarts/csp/style.css`
458458
459-
## 迁移到 v6
459+
## 迁移到 v7
460460
461-
> 💡 请确保同时查阅 ECharts 5 的[升级指南](https://echarts.apache.org/zh/tutorial.html#ECharts%205%20%E5%8D%87%E7%BA%A7%E6%8C%87%E5%8D%97)。
461+
Translate:
462+
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.
462463
463-
`vue-echarts@6` 引入了如下破坏性变更:
464-
465-
### Vue 2 支持
466-
467-
- 要在 `vue@2.7.0` 之前的版本中使用 Vue-ECharts,必须安装 `@vue/composition-api`(还需要安装 `@vue/runtime-core` 来支持 TypeScript)。
468-
469-
### Prop
470-
471-
- `options` 重命名为 **`option`**,以和 ECharts 本身保持一致。
472-
- 更新 `option` 将采用 **`update-options`** 中的配置,不再检查是否发生引用变化。
473-
- `watch-shallow` 被移除。在性能关键场景请使用 **`manual-update`**。
474-
475-
### 方法
476-
477-
- `mergeOptions` 重命名为 **`setOption`**,以和 ECharts 本身保持一致。
478-
- `showLoading``hideLoading` 被移除。请使用 **`loading``loading-options`** prop。
479-
- `appendData` 被移除。(由于 ECharts 5 引入的破坏性变更。)
480-
- 所有静态方法被从 `vue-echarts` 移除。可以直接使用 `echarts` 本身的这些方法。
481-
482-
### 计算 Getter
483-
484-
- 计算 getter(`width``height``isDisposed``computedOptions`)被移除。请分别使用 **`getWidth``getHeight``isDisposed``getOption`** 方法代替。
485-
486-
### 样式
487-
488-
- 现在组件根元素尺寸默认为 **`100%×100%`**,而非原来的 `600×400`
464+
请阅读[发布日志](https://github.com/ecomfe/vue-echarts/releases/tag/v7.0.0-beta.0)中的变更记录,之后迁移过程应该会相对简单。
489465
490466
## 本地开发
491467

0 commit comments

Comments
 (0)