Skip to content

Commit

Permalink
fix: fix event types and bump to 7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Justineo committed Aug 3, 2024
1 parent e967bfc commit 4f3a6ac
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 7.0.0

> Other prerelease changes:
> * [7.0.0-beta.0](#700-beta0)
* Fixed types for events.

## 7.0.0-beta.0

* Upgraded to ESM.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Drop `<script>` inside your HTML file and access the component via `window.VueEC
```html
<script src="https://cdn.jsdelivr.net/npm/vue@3.4.33"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.5.1"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@7.0.0-beta.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@7.0.0"></script>
```
<!-- vue3Scripts:end -->

Expand All @@ -234,7 +234,7 @@ app.component('v-chart', VueECharts)
```html
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.16"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.5.1"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@7.0.0-beta.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@7.0.0"></script>
```
<!-- vue2Scripts:end -->

Expand Down
4 changes: 2 additions & 2 deletions README.zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ import "echarts";
```html
<script src="https://cdn.jsdelivr.net/npm/vue@3.4.33"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.5.1"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@7.0.0-beta.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@7.0.0"></script>
```
<!-- vue3Scripts:end -->

Expand All @@ -234,7 +234,7 @@ app.component('v-chart', VueECharts)
```html
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.16"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.5.1"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@7.0.0-beta.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@7.0.0"></script>
```
<!-- vue2Scripts:end -->

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-echarts",
"version": "7.0.0-beta.0",
"version": "7.0.0",
"description": "Vue.js component for Apache ECharts™.",
"license": "MIT",
"repository": "https://github.com/ecomfe/vue-echarts.git",
Expand Down
10 changes: 5 additions & 5 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ type OtherEventName =
| "globalcursortaken";

type MouseEmits = {
[key in MouseEventName]: (params: ECElementEvent) => boolean;
[key in MouseEventName]: (params: ECElementEvent) => void;
};

type ZRenderEmits = {
[key in ZRenderEventName]: (params: ElementEvent) => boolean;
[key in ZRenderEventName]: (params: ElementEvent) => void;
};

type OtherEmits = {
[key in OtherEventName]: null;
[key in OtherEventName]: (params: any) => void;
};

export type Emits = MouseEmits &
OtherEmits & {
rendered: (params: { elapsedTime: number }) => boolean;
finished: () => boolean;
rendered: (params: { elapsedTime: number }) => void;
finished: () => void;
} & ZRenderEmits;

0 comments on commit 4f3a6ac

Please sign in to comment.