Compare commits

..

7 Commits

Author SHA1 Message Date
cb95ece9c6 chore: update changelog and version 2023-12-18 10:28:28 +08:00
2a0db561b4 types: fix option type (#751) 2023-12-18 10:22:08 +08:00
2b30334b82 docs: update readme 2023-12-13 11:01:54 +08:00
dbd6699a4f chore: update changelog and version 2023-12-13 11:00:52 +08:00
2130bd6444 fix: fix selector class 2023-12-13 11:00:04 +08:00
e7eb680d46 chore: update changelog and version 2023-12-12 09:59:33 +08:00
b3a10f3654 fix: fix inner wrapper styles 2023-12-12 09:51:27 +08:00
7 changed files with 25 additions and 15 deletions

View File

@ -1,3 +1,15 @@
## 6.6.5
* Fixed type for `option` regressed in v6.6.2.
## 6.6.4
* Fixed style regression introduced by v6.6.3.
## 6.6.3
* Fixed inner wrapper styles.
## 6.6.2 ## 6.6.2
* Fixed that tooltips may affected by internal styling by VueECharts. * Fixed that tooltips may affected by internal styling by VueECharts.

View File

@ -237,7 +237,7 @@ Drop `<script>` inside your HTML file and access the component via `window.VueEC
```html ```html
<script src="https://cdn.jsdelivr.net/npm/vue@3.3.7"></script> <script src="https://cdn.jsdelivr.net/npm/vue@3.3.7"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3"></script> <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.1"></script> <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.5"></script>
``` ```
<!-- vue3Scripts:end --> <!-- vue3Scripts:end -->
@ -257,7 +257,7 @@ app.component('v-chart', VueECharts)
```html ```html
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.15"></script> <script src="https://cdn.jsdelivr.net/npm/vue@2.7.15"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3"></script> <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.1"></script> <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.5"></script>
``` ```
<!-- vue2Scripts:end --> <!-- vue2Scripts:end -->

View File

@ -4,7 +4,6 @@
<p align="center"><a href="https://vue-echarts.dev/">查看 Demo →</a></p> <p align="center"><a href="https://vue-echarts.dev/">查看 Demo →</a></p>
<p align="center"><a href="https:///pr.new/ecomfe/vue-echarts"><img alt="Open in Codeflow" src="https://developer.stackblitz.com/img/open_in_codeflow.svg" height="28"/></a> <a href="https://codesandbox.io/p/github/ecomfe/vue-echarts"><img alt="Edit in CodeSandbox" src="https://assets.codesandbox.io/github/button-edit-lime.svg" height="28"/></a></p> <p align="center"><a href="https:///pr.new/ecomfe/vue-echarts"><img alt="Open in Codeflow" src="https://developer.stackblitz.com/img/open_in_codeflow.svg" height="28"/></a> <a href="https://codesandbox.io/p/github/ecomfe/vue-echarts"><img alt="Edit in CodeSandbox" src="https://assets.codesandbox.io/github/button-edit-lime.svg" height="28"/></a></p>
> [!IMPORTANT] > [!IMPORTANT]
> 我们新发布了一个[导入代码生成器](https://vue-echarts.dev/#codegen),只需要把`option` 代码粘贴进去,就可以得到精确的导入代码。 > 我们新发布了一个[导入代码生成器](https://vue-echarts.dev/#codegen),只需要把`option` 代码粘贴进去,就可以得到精确的导入代码。
> >
@ -238,7 +237,7 @@ import "echarts";
```html ```html
<script src="https://cdn.jsdelivr.net/npm/vue@3.3.7"></script> <script src="https://cdn.jsdelivr.net/npm/vue@3.3.7"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3"></script> <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.1"></script> <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.5"></script>
``` ```
<!-- vue3Scripts:end --> <!-- vue3Scripts:end -->
@ -258,7 +257,7 @@ app.component('v-chart', VueECharts)
```html ```html
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.15"></script> <script src="https://cdn.jsdelivr.net/npm/vue@2.7.15"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3"></script> <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.1"></script> <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.5"></script>
``` ```
<!-- vue2Scripts:end --> <!-- vue2Scripts:end -->

View File

@ -1,6 +1,6 @@
{ {
"name": "vue-echarts", "name": "vue-echarts",
"version": "6.6.2", "version": "6.6.5",
"description": "Vue.js component for Apache ECharts.", "description": "Vue.js component for Apache ECharts.",
"author": "GU Yiling <justice360@gmail.com>", "author": "GU Yiling <justice360@gmail.com>",
"scripts": { "scripts": {

View File

@ -307,6 +307,8 @@ export default defineComponent({
) as any; ) as any;
attrs.ref = "root"; attrs.ref = "root";
attrs.class = attrs.class ? ["echarts"].concat(attrs.class) : "echarts"; attrs.class = attrs.class ? ["echarts"].concat(attrs.class) : "echarts";
return h(TAG_NAME, attrs, [h("div", { ref: "inner" })]); return h(TAG_NAME, attrs, [
h("div", { ref: "inner", class: "echarts-inner" })
]);
} }
}); });

View File

@ -1 +1 @@
x-vue-echarts{display:block;width:100%;height:100%;min-width:0}x-vue-echarts>[_echarts_instance_]{width:100%;height:100%} x-vue-echarts,.echarts-inner{display:block;width:100%;height:100%;min-width:0}

View File

@ -1,10 +1,5 @@
import { init } from "echarts/core"; import { init } from "echarts/core";
import type { import type { SetOptionOpts, ECElementEvent, ElementEvent } from "echarts";
SetOptionOpts,
ECElementEvent,
ElementEvent,
EChartsOption
} from "echarts";
import type { Ref } from "vue"; import type { Ref } from "vue";
export type Injection<T> = T | null | Ref<T | null> | { value: T | null }; export type Injection<T> = T | null | Ref<T | null> | { value: T | null };
@ -23,7 +18,9 @@ export type UpdateOptionsInjection = Injection<UpdateOptions>;
export type EChartsType = ReturnType<InitType>; export type EChartsType = ReturnType<InitType>;
type ZRenderType = ReturnType<EChartsType["getZr"]>; type ZRenderType = ReturnType<EChartsType["getZr"]>;
export type EventTarget = EChartsType | ZRenderType; export type EventTarget = EChartsType | ZRenderType;
export type Option = EChartsOption;
type SetOptionType = EChartsType["setOption"];
export type Option = Parameters<SetOptionType>[0];
export type LoadingOptions = { export type LoadingOptions = {
text?: string; text?: string;