mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-11-05 20:36:09 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b7852ab643 | |||
| 1378f6e397 | |||
| ec2c15c153 | |||
| beec26367f | |||
| b366b31afb |
13
CHANGELOG.md
13
CHANGELOG.md
@ -1,3 +1,15 @@
|
||||
## 7.0.3
|
||||
|
||||
* Fixed type for `autoresize` (again).
|
||||
|
||||
## 7.0.2
|
||||
|
||||
* Fixed style injection regression (#805).
|
||||
|
||||
## 7.0.1
|
||||
|
||||
* Fixed type for `autoresize`.
|
||||
|
||||
## 7.0.0
|
||||
|
||||
> Other prerelease changes:
|
||||
@ -13,6 +25,7 @@
|
||||
|
||||
### Breaking changes
|
||||
|
||||
* Peer deps for `echarts` is upgraded to `^5.5.1`.
|
||||
* Dropped support for browsers without `ResizeObserver`. Can work with [resize-observer-polyfill](https://www.npmjs.com/package/resize-observer-polyfill).
|
||||
* Dropped support for Vue < 2.7.
|
||||
* Dropped CJS outputs.
|
||||
|
||||
@ -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"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@7.0.3"></script>
|
||||
```
|
||||
<!-- vue3Scripts:end -->
|
||||
|
||||
@ -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"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@7.0.3"></script>
|
||||
```
|
||||
<!-- vue2Scripts:end -->
|
||||
|
||||
|
||||
@ -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"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@7.0.3"></script>
|
||||
```
|
||||
<!-- vue3Scripts:end -->
|
||||
|
||||
@ -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"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue-echarts@7.0.3"></script>
|
||||
```
|
||||
<!-- vue2Scripts:end -->
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-echarts",
|
||||
"version": "7.0.0",
|
||||
"version": "7.0.3",
|
||||
"description": "Vue.js component for Apache ECharts™.",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/ecomfe/vue-echarts.git",
|
||||
@ -80,7 +80,7 @@
|
||||
"rollup": "^4.19.0",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
"rollup-plugin-esbuild": "^6.1.1",
|
||||
"rollup-plugin-import-css": "^3.5.0",
|
||||
"rollup-plugin-import-css": "^3.5.1",
|
||||
"tslib": "^2.6.3",
|
||||
"typescript": "5.5.4",
|
||||
"vue": "^3.4.33",
|
||||
|
||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@ -127,8 +127,8 @@ importers:
|
||||
specifier: ^6.1.1
|
||||
version: 6.1.1(esbuild@0.23.0)(rollup@4.19.0)
|
||||
rollup-plugin-import-css:
|
||||
specifier: ^3.5.0
|
||||
version: 3.5.0(rollup@4.19.0)
|
||||
specifier: ^3.5.1
|
||||
version: 3.5.1(rollup@4.19.0)
|
||||
tslib:
|
||||
specifier: ^2.6.3
|
||||
version: 2.6.3
|
||||
@ -4070,8 +4070,8 @@ packages:
|
||||
esbuild: '>=0.18.0'
|
||||
rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0
|
||||
|
||||
rollup-plugin-import-css@3.5.0:
|
||||
resolution: {integrity: sha512-JOVow6n00qt2C/NnsqPmIjFOfxIAudwWqC5SaC84CodMGiMFaP1gPAdgnJ8g8hcG+P85TCYp2kI98grYCEt5pg==}
|
||||
rollup-plugin-import-css@3.5.1:
|
||||
resolution: {integrity: sha512-cXgMPCUoDu64A2OFme4Is3eHmLiA54qTzxfvCbsORzro3C1adSe1fMMKUqfOUKTXROAPpW9PNDjpaGgPloGJOQ==}
|
||||
engines: {node: '>=16'}
|
||||
peerDependencies:
|
||||
rollup: ^2.x.x || ^3.x.x || ^4.x.x
|
||||
@ -8983,7 +8983,7 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
rollup-plugin-import-css@3.5.0(rollup@4.19.0):
|
||||
rollup-plugin-import-css@3.5.1(rollup@4.19.0):
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.1.0(rollup@4.19.0)
|
||||
rollup: 4.19.0
|
||||
|
||||
@ -2,18 +2,11 @@ import { watch } from "vue-demi";
|
||||
import { throttle } from "echarts/core";
|
||||
|
||||
import type { Ref, PropType } from "vue-demi";
|
||||
import type { EChartsType } from "../types";
|
||||
|
||||
type AutoresizeProp =
|
||||
| boolean
|
||||
| {
|
||||
throttle?: number;
|
||||
onResize?: () => void;
|
||||
};
|
||||
import type { EChartsType, AutoResize } from "../types";
|
||||
|
||||
export function useAutoresize(
|
||||
chart: Ref<EChartsType | undefined>,
|
||||
autoresize: Ref<AutoresizeProp | undefined>,
|
||||
autoresize: Ref<AutoResize | undefined>,
|
||||
root: Ref<HTMLElement | undefined>
|
||||
): void {
|
||||
watch(
|
||||
@ -63,5 +56,5 @@ export function useAutoresize(
|
||||
}
|
||||
|
||||
export const autoresizeProps = {
|
||||
autoresize: [Boolean, Object] as PropType<AutoresizeProp>
|
||||
autoresize: [Boolean, Object] as PropType<AutoResize>
|
||||
};
|
||||
|
||||
3
src/index.d.ts
vendored
3
src/index.d.ts
vendored
@ -6,6 +6,7 @@ import type {
|
||||
InitOptions,
|
||||
UpdateOptions,
|
||||
LoadingOptions,
|
||||
AutoResize,
|
||||
EChartsType,
|
||||
Emits,
|
||||
ThemeInjection,
|
||||
@ -25,7 +26,7 @@ declare type ChartProps = {
|
||||
updateOptions?: UpdateOptions;
|
||||
loadingOptions?: LoadingOptions;
|
||||
option?: Option;
|
||||
autoresize?: boolean;
|
||||
autoresize?: AutoResize;
|
||||
loading?: boolean;
|
||||
group?: string;
|
||||
manualUpdate?: boolean;
|
||||
|
||||
@ -23,6 +23,13 @@ export type EventTarget = EChartsType | ZRenderType;
|
||||
type SetOptionType = EChartsType["setOption"];
|
||||
export type Option = Parameters<SetOptionType>[0];
|
||||
|
||||
export type AutoResize =
|
||||
| boolean
|
||||
| {
|
||||
throttle?: number;
|
||||
onResize?: () => void;
|
||||
};
|
||||
|
||||
export type LoadingOptions = {
|
||||
text?: string;
|
||||
textColor?: string;
|
||||
|
||||
Reference in New Issue
Block a user