Compare commits

...

11 Commits

Author SHA1 Message Date
34defec669 docs: update readme 2024-04-22 11:03:46 +08:00
e189abd9c2 fix(#777): autoresize does not work when reducing height 2024-04-22 11:00:56 +08:00
f07855df08 docs: add sample rate to reduce analytics data points 2024-04-16 13:18:23 +08:00
ae3102a86c chore: add asf notice to readme (#769) 2024-03-12 10:56:23 +08:00
48a2507ef8 chore: add asf notice to readme cn (#770) 2024-03-12 10:55:44 +08:00
311d588850 chore: update version and readme 2024-02-20 10:58:50 +08:00
2f1910ec87 fix: make inner wrapper fit to the root size (#761) 2024-02-20 10:55:38 +08:00
48a0664c2b chore(deps-dev): bump follow-redirects from 1.15.3 to 1.15.4
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-11 17:26:54 +08:00
05ec40a956 chore: improve title 2024-01-02 12:31:56 +08:00
dc9dccbf05 fix: fix postinstall script 2023-12-26 15:21:06 +08:00
476efa4209 fix: add missing type file for 2.7 2023-12-26 15:00:23 +08:00
12 changed files with 64 additions and 21 deletions

View File

@ -1,3 +1,19 @@
## 6.6.10
* Fixed that `autoresize` doesn't work when reducing the height or the root element.
## 6.6.9
* Fixed that the chart may not be the same size as the component root element ([#761](https://github.com/ecomfe/vue-echarts/issues/761)).
## 6.6.8
* Fixed the postinstall script to patch the correct `types` entry for Vue 2.7.
## 6.6.7
* Added missing type file for Vue 2.7.
## 6.6.6 ## 6.6.6
* Fixed types for Vue < 2.7. * Fixed types for Vue < 2.7.

View File

@ -236,9 +236,9 @@ Drop `<script>` inside your HTML file and access the component via `window.VueEC
<!-- vue3Scripts:start --> <!-- vue3Scripts:start -->
```html ```html
<script src="https://cdn.jsdelivr.net/npm/vue@3.3.7"></script> <script src="https://cdn.jsdelivr.net/npm/vue@3.4.23"></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.5"></script> <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.10"></script>
``` ```
<!-- vue3Scripts:end --> <!-- vue3Scripts:end -->
@ -256,9 +256,9 @@ app.component('v-chart', VueECharts)
<!-- vue2Scripts:start --> <!-- vue2Scripts:start -->
```html ```html
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.15"></script> <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16"></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.5"></script> <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.10"></script>
``` ```
<!-- vue2Scripts:end --> <!-- vue2Scripts:end -->
@ -507,3 +507,7 @@ pnpm serve
``` ```
Open `http://localhost:8080` to see the demo. Open `http://localhost:8080` to see the demo.
## Notice
The Apache Software Foundation [Apache ECharts, ECharts](https://echarts.apache.org/), Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the [Apache Software Foundation](https://www.apache.org/).

View File

@ -236,9 +236,9 @@ import "echarts";
<!-- vue3Scripts:start --> <!-- vue3Scripts:start -->
```html ```html
<script src="https://cdn.jsdelivr.net/npm/vue@3.3.7"></script> <script src="https://cdn.jsdelivr.net/npm/vue@3.4.23"></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.5"></script> <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.10"></script>
``` ```
<!-- vue3Scripts:end --> <!-- vue3Scripts:end -->
@ -256,9 +256,9 @@ app.component('v-chart', VueECharts)
<!-- vue2Scripts:start --> <!-- vue2Scripts:start -->
```html ```html
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.15"></script> <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16"></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.5"></script> <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.10"></script>
``` ```
<!-- vue2Scripts:end --> <!-- vue2Scripts:end -->
@ -507,3 +507,7 @@ pnpm serve
``` ```
打开 `http://localhost:8080` 来查看 demo。 打开 `http://localhost:8080` 来查看 demo。
## 声明
The Apache Software Foundation [Apache ECharts, ECharts](https://echarts.apache.org/), Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the [Apache Software Foundation](https://www.apache.org/).

View File

@ -1,7 +1,7 @@
{ {
"name": "vue-echarts", "name": "vue-echarts",
"version": "6.6.6", "version": "6.6.10",
"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": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",

6
pnpm-lock.yaml generated
View File

@ -4694,8 +4694,8 @@ packages:
resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==}
dev: true dev: true
/follow-redirects@1.15.3(debug@4.3.4): /follow-redirects@1.15.4(debug@4.3.4):
resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} resolution: {integrity: sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==}
engines: {node: '>=4.0'} engines: {node: '>=4.0'}
peerDependencies: peerDependencies:
debug: '*' debug: '*'
@ -5091,7 +5091,7 @@ packages:
engines: {node: '>=8.0.0'} engines: {node: '>=8.0.0'}
dependencies: dependencies:
eventemitter3: 4.0.7 eventemitter3: 4.0.7
follow-redirects: 1.15.3(debug@4.3.4) follow-redirects: 1.15.4(debug@4.3.4)
requires-port: 1.0.0 requires-port: 1.0.0
transitivePeerDependencies: transitivePeerDependencies:
- debug - debug

View File

@ -1,12 +1,12 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang=""> <html lang="en-US">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Inter:300,500;display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Inter:300,500;display=swap" rel="stylesheet">
<title>Vue-ECharts: Vue.js component for Apache ECharts.</title> <title>Vue-ECharts: Vue.js component for Apache ECharts.</title>
</head> </head>
<body> <body>
<noscript> <noscript>

View File

@ -9,6 +9,14 @@ const options = [
file: "dist/index.vue2.d.ts", file: "dist/index.vue2.d.ts",
format: "esm" format: "esm"
} }
},
{
input: "src/index.vue2_7.d.ts",
plugins: [dts()],
output: {
file: "dist/index.vue2_7.d.ts",
format: "esm"
}
} }
]; ];

View File

@ -10,8 +10,8 @@ function resolvePath(...parts) {
const CDN_PREFIX = "https://cdn.jsdelivr.net/npm/"; const CDN_PREFIX = "https://cdn.jsdelivr.net/npm/";
const DEP_VERSIONS = { const DEP_VERSIONS = {
"vue@3": "3.3.7", "vue@3": "3.4.23",
"vue@2": "2.7.15", "vue@2": "2.7.16",
echarts: "5.4.3", echarts: "5.4.3",
[name]: version [name]: version
}; };

View File

@ -6,7 +6,7 @@ const packageFile = path.resolve(__dirname, "../package.json");
const typesPaths = { const typesPaths = {
3: "dist/index.d.ts", 3: "dist/index.d.ts",
2.7: "dist/index.vue2-7.d.ts", 2.7: "dist/index.vue2_7.d.ts",
2: "dist/index.vue2.d.ts" 2: "dist/index.vue2.d.ts"
}; };

View File

@ -308,7 +308,7 @@ export default defineComponent({
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, [ return h(TAG_NAME, attrs, [
h("div", { ref: "inner", class: "echarts-inner" }) h("div", { ref: "inner", class: "vue-echarts-inner" })
]); ]);
} }
}); });

View File

@ -3,7 +3,17 @@ import { createApp } from "vue";
import { createPinia } from "pinia"; import { createPinia } from "pinia";
import Demo from "./Demo.vue"; import Demo from "./Demo.vue";
inject(); const SAMPLE_RATE = 0.5;
inject({
beforeSend: event => {
if (Math.random() > SAMPLE_RATE) {
return null;
}
return event;
}
});
const pinia = createPinia(); const pinia = createPinia();
const app = createApp(Demo); const app = createApp(Demo);

View File

@ -1 +1,2 @@
x-vue-echarts,.echarts-inner{display:block;width:100%;height:100%;min-width:0} x-vue-echarts{display:block;position:relative;width:100%;height:100%;min-width:0}
.vue-echarts-inner{position:absolute;top:0;right:0;bottom:0;left:0}