This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git
The following commit(s) were added to refs/heads/gh-pages by this push:
new f3025656 refactor: remove vue-scrollactive dep
new 96a01b19 Merge branch 'gh-pages' of
https://github.com/apache/echarts-examples into gh-pages
f3025656 is described below
commit f3025656fd5438887a6f91b2878945338970c3fe
Author: plainheart <[email protected]>
AuthorDate: Mon Dec 12 13:06:31 2022 +0800
refactor: remove vue-scrollactive dep
---
build/webpack.config.js | 17 +++-
package-lock.json | 256 ++++++++++++++++++++++++++++++++----------------
package.json | 6 +-
public/en/editor.html | 16 +--
public/en/index.html | 16 +--
public/en/view.html | 16 +--
public/zh/editor.html | 14 ++-
public/zh/index.html | 16 +--
public/zh/view.html | 16 +--
src/explore/Explore.vue | 126 ++++++++++++++++++++----
src/main.js | 3 -
11 files changed, 354 insertions(+), 148 deletions(-)
diff --git a/build/webpack.config.js b/build/webpack.config.js
index 1d0e3558..0f4f5ff0 100644
--- a/build/webpack.config.js
+++ b/build/webpack.config.js
@@ -39,12 +39,23 @@ module.exports = [
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sassjs-loader']
},
{
- test: /\.(png|jpg|jpeg|gif|eot|ttf|woff|woff2)(\?.+)?$/,
+ test: /\.(png|jpg|jpeg|gif|webp)(\?.+)?$/,
+ use: [
+ {
+ loader: 'url-loader',
+ options: {
+ limit: 5120,
+ esModule: false
+ }
+ }
+ ]
+ },
+ {
+ test: /\.(eot|ttf|woff|woff2)(\?.+)?$/,
use: [
{
loader: 'file-loader',
options: {
- limit: 10000,
outputPath: '../asset',
name: '[name].[ext]',
esModule: false
@@ -98,7 +109,7 @@ module.exports = [
]
},
{
- // Sepearte built ts transformer to be loaded async
+ // Separate built ts transformer to be loaded async
entry: path.resolve(__dirname, '../src/editor/transformTs.js'),
stats: 'minimal',
module: {
diff --git a/package-lock.json b/package-lock.json
index d349ac1a..2afa3b8c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -19,8 +19,7 @@
"semver": "^7.3.7",
"sucrase": "^3.24.0",
"vanilla-lazyload": "^17.8.3",
- "vue-i18n": "^8.18.2",
- "vue-scrollactive": "^0.9.3"
+ "vue-i18n": "^8.18.2"
},
"devDependencies": {
"@babel/core": "^7.10.2",
@@ -36,7 +35,7 @@
"css-loader": "^3.5.3",
"cwebp-bin": "^6.1.1",
"download-git-repo": "^3.0.2",
- "echarts": "^5.4.0",
+ "echarts": "^5.4.1",
"echarts-stat": "^1.2.0",
"esbuild": "^0.8.34",
"file-loader": "^6.2.0",
@@ -57,6 +56,7 @@
"shelljs": "^0.8.5",
"style-loader": "^2.0.0",
"typescript": "^4.1.3",
+ "url-loader": "^4.1.1",
"vue": "2.6.14",
"vue-loader": "^15.9.6",
"vue-template-compiler": "2.6.14",
@@ -2249,11 +2249,6 @@
"integrity":
"sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==",
"dev": true
},
- "node_modules/bezier-easing": {
- "version": "2.1.0",
- "resolved":
"https://registry.npmjs.org/bezier-easing/-/bezier-easing-2.1.0.tgz",
- "integrity": "sha1-wE3+i5JtbsrKGBPWn/F5t8ICXYY="
- },
"node_modules/big.js": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
@@ -4454,13 +4449,13 @@
}
},
"node_modules/echarts": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.4.0.tgz",
- "integrity":
"sha512-uPsO9VRUIKAdFOoH3B0aNg7NRVdN7aM39/OjovjO9MwmWsAkfGyeXJhK+dbRi51iDrQWliXV60/XwLA7kg3z0w==",
+ "version": "5.4.1",
+ "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.4.1.tgz",
+ "integrity":
"sha512-9ltS3M2JB0w2EhcYjCdmtrJ+6haZcW6acBolMGIuf01Hql1yrIV01L1aRj7jsaaIULJslEP9Z3vKlEmnJaWJVQ==",
"dev": true,
"dependencies": {
"tslib": "2.3.0",
- "zrender": "5.4.0"
+ "zrender": "5.4.1"
}
},
"node_modules/echarts-stat": {
@@ -4941,9 +4936,9 @@
}
},
"node_modules/file-loader/node_modules/loader-utils": {
- "version": "2.0.4",
- "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
- "integrity":
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "version": "2.0.2",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
+ "integrity":
"sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
@@ -5609,9 +5604,9 @@
}
},
"node_modules/html-loader/node_modules/loader-utils": {
- "version": "2.0.4",
- "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
- "integrity":
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "version": "2.0.0",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+ "integrity":
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
@@ -6530,9 +6525,9 @@
}
},
"node_modules/loader-utils": {
- "version": "1.4.2",
- "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
- "integrity":
"sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
+ "version": "1.4.0",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz",
+ "integrity":
"sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
@@ -6906,9 +6901,9 @@
}
},
"node_modules/mini-css-extract-plugin/node_modules/loader-utils": {
- "version": "2.0.4",
- "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
- "integrity":
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "version": "2.0.0",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+ "integrity":
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
@@ -6938,9 +6933,9 @@
}
},
"node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity":
"sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity":
"sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dependencies": {
"brace-expansion": "^1.1.7"
},
@@ -8303,9 +8298,9 @@
}
},
"node_modules/raw-loader/node_modules/loader-utils": {
- "version": "2.0.4",
- "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
- "integrity":
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "version": "2.0.2",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
+ "integrity":
"sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
@@ -9383,9 +9378,9 @@
}
},
"node_modules/style-loader/node_modules/loader-utils": {
- "version": "2.0.4",
- "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
- "integrity":
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "version": "2.0.0",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+ "integrity":
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
@@ -9969,6 +9964,77 @@
"punycode": "^2.1.0"
}
},
+ "node_modules/url-loader": {
+ "version": "4.1.1",
+ "resolved":
"https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz",
+ "integrity":
"sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==",
+ "dev": true,
+ "dependencies": {
+ "loader-utils": "^2.0.0",
+ "mime-types": "^2.1.27",
+ "schema-utils": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "file-loader": "*",
+ "webpack": "^4.0.0 || ^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "file-loader": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/url-loader/node_modules/json5": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
+ "integrity":
"sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
+ "dev": true,
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/url-loader/node_modules/loader-utils": {
+ "version": "2.0.4",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
+ "integrity":
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "dev": true,
+ "dependencies": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^3.0.0",
+ "json5": "^2.1.2"
+ },
+ "engines": {
+ "node": ">=8.9.0"
+ }
+ },
+ "node_modules/url-loader/node_modules/schema-utils": {
+ "version": "3.1.1",
+ "resolved":
"https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
+ "integrity":
"sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
"node_modules/url-parse-lax": {
"version": "1.0.0",
"resolved":
"https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz",
@@ -10077,14 +10143,6 @@
}
}
},
- "node_modules/vue-scrollactive": {
- "version": "0.9.3",
- "resolved":
"https://registry.npmjs.org/vue-scrollactive/-/vue-scrollactive-0.9.3.tgz",
- "integrity":
"sha512-W7Z2EQGDjnvgZ4h+/bpRVjiVU3bKWQDmT9f0bUL+zq3C/VSZaQiQ+qzWlMYDEpJbm13wJ6KIE6ry3HKLVyU4cQ==",
- "dependencies": {
- "bezier-easing": "^2.0.3"
- }
- },
"node_modules/vue-style-loader": {
"version": "4.1.2",
"resolved":
"https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz",
@@ -10722,9 +10780,9 @@
}
},
"node_modules/zrender": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.0.tgz",
- "integrity":
"sha512-rOS09Z2HSVGFs2dn/TuYk5BlCaZcVe8UDLLjj1ySYF828LATKKdxuakSZMvrDz54yiKPDYVfjdKqcX8Jky3BIA==",
+ "version": "5.4.1",
+ "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.1.tgz",
+ "integrity":
"sha512-M4Z05BHWtajY2241EmMPHglDQAJ1UyHQcYsxDNzD9XLSkPDqMq4bB28v9Pb4mvHnVQ0GxyTklZ/69xCFP6RXBA==",
"dev": true,
"dependencies": {
"tslib": "2.3.0"
@@ -12545,11 +12603,6 @@
"integrity":
"sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==",
"dev": true
},
- "bezier-easing": {
- "version": "2.1.0",
- "resolved":
"https://registry.npmjs.org/bezier-easing/-/bezier-easing-2.1.0.tgz",
- "integrity": "sha1-wE3+i5JtbsrKGBPWn/F5t8ICXYY="
- },
"big.js": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
@@ -14329,13 +14382,13 @@
}
},
"echarts": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.4.0.tgz",
- "integrity":
"sha512-uPsO9VRUIKAdFOoH3B0aNg7NRVdN7aM39/OjovjO9MwmWsAkfGyeXJhK+dbRi51iDrQWliXV60/XwLA7kg3z0w==",
+ "version": "5.4.1",
+ "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.4.1.tgz",
+ "integrity":
"sha512-9ltS3M2JB0w2EhcYjCdmtrJ+6haZcW6acBolMGIuf01Hql1yrIV01L1aRj7jsaaIULJslEP9Z3vKlEmnJaWJVQ==",
"dev": true,
"requires": {
"tslib": "2.3.0",
- "zrender": "5.4.0"
+ "zrender": "5.4.1"
},
"dependencies": {
"tslib": {
@@ -14708,9 +14761,9 @@
"dev": true
},
"loader-utils": {
- "version": "2.0.4",
- "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
- "integrity":
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "version": "2.0.2",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
+ "integrity":
"sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
@@ -15226,9 +15279,9 @@
}
},
"loader-utils": {
- "version": "2.0.4",
- "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
- "integrity":
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "version": "2.0.0",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+ "integrity":
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
@@ -15924,9 +15977,9 @@
"dev": true
},
"loader-utils": {
- "version": "1.4.2",
- "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
- "integrity":
"sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
+ "version": "1.4.0",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz",
+ "integrity":
"sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
@@ -16224,9 +16277,9 @@
}
},
"loader-utils": {
- "version": "2.0.4",
- "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
- "integrity":
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "version": "2.0.0",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+ "integrity":
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
@@ -16248,9 +16301,9 @@
}
},
"minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity":
"sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity":
"sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -17351,9 +17404,9 @@
"dev": true
},
"loader-utils": {
- "version": "2.0.4",
- "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
- "integrity":
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "version": "2.0.2",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
+ "integrity":
"sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
@@ -18189,9 +18242,9 @@
}
},
"loader-utils": {
- "version": "2.0.4",
- "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
- "integrity":
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "version": "2.0.0",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+ "integrity":
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
@@ -18636,6 +18689,47 @@
"punycode": "^2.1.0"
}
},
+ "url-loader": {
+ "version": "4.1.1",
+ "resolved":
"https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz",
+ "integrity":
"sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==",
+ "dev": true,
+ "requires": {
+ "loader-utils": "^2.0.0",
+ "mime-types": "^2.1.27",
+ "schema-utils": "^3.0.0"
+ },
+ "dependencies": {
+ "json5": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
+ "integrity":
"sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
+ "dev": true
+ },
+ "loader-utils": {
+ "version": "2.0.4",
+ "resolved":
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
+ "integrity":
"sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "dev": true,
+ "requires": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^3.0.0",
+ "json5": "^2.1.2"
+ }
+ },
+ "schema-utils": {
+ "version": "3.1.1",
+ "resolved":
"https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
+ "integrity":
"sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ }
+ }
+ }
+ },
"url-parse-lax": {
"version": "1.0.0",
"resolved":
"https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz",
@@ -18718,14 +18812,6 @@
"vue-style-loader": "^4.1.0"
}
},
- "vue-scrollactive": {
- "version": "0.9.3",
- "resolved":
"https://registry.npmjs.org/vue-scrollactive/-/vue-scrollactive-0.9.3.tgz",
- "integrity":
"sha512-W7Z2EQGDjnvgZ4h+/bpRVjiVU3bKWQDmT9f0bUL+zq3C/VSZaQiQ+qzWlMYDEpJbm13wJ6KIE6ry3HKLVyU4cQ==",
- "requires": {
- "bezier-easing": "^2.0.3"
- }
- },
"vue-style-loader": {
"version": "4.1.2",
"resolved":
"https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz",
@@ -19201,9 +19287,9 @@
"dev": true
},
"zrender": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.0.tgz",
- "integrity":
"sha512-rOS09Z2HSVGFs2dn/TuYk5BlCaZcVe8UDLLjj1ySYF828LATKKdxuakSZMvrDz54yiKPDYVfjdKqcX8Jky3BIA==",
+ "version": "5.4.1",
+ "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.1.tgz",
+ "integrity":
"sha512-M4Z05BHWtajY2241EmMPHglDQAJ1UyHQcYsxDNzD9XLSkPDqMq4bB28v9Pb4mvHnVQ0GxyTklZ/69xCFP6RXBA==",
"dev": true,
"requires": {
"tslib": "2.3.0"
diff --git a/package.json b/package.json
index 09d97012..49566613 100644
--- a/package.json
+++ b/package.json
@@ -32,7 +32,7 @@
"css-loader": "^3.5.3",
"cwebp-bin": "^6.1.1",
"download-git-repo": "^3.0.2",
- "echarts": "^5.4.0",
+ "echarts": "^5.4.1",
"echarts-stat": "^1.2.0",
"esbuild": "^0.8.34",
"file-loader": "^6.2.0",
@@ -53,6 +53,7 @@
"shelljs": "^0.8.5",
"style-loader": "^2.0.0",
"typescript": "^4.1.3",
+ "url-loader": "^4.1.1",
"vue": "2.6.14",
"vue-loader": "^15.9.6",
"vue-template-compiler": "2.6.14",
@@ -72,7 +73,6 @@
"semver": "^7.3.7",
"sucrase": "^3.24.0",
"vanilla-lazyload": "^17.8.3",
- "vue-i18n": "^8.18.2",
- "vue-scrollactive": "^0.9.3"
+ "vue-i18n": "^8.18.2"
}
}
diff --git a/public/en/editor.html b/public/en/editor.html
index bd090214..43f4b7b1 100644
--- a/public/en/editor.html
+++ b/public/en/editor.html
@@ -3,6 +3,10 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <link
+ rel="shortcut icon"
+ href="https://echarts.apache.org/en/images/favicon.png"
+ />
<title>ECharts Examples</title>
<style>
body {
@@ -16,16 +20,16 @@
</style>
<link
rel="stylesheet"
-
href="//fastly.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
+
href="https://fastly.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
/>
<link
rel="stylesheet"
-
href="//fastly.jsdelivr.net/npm/[email protected]/lib/theme-chalk/index.css"
+
href="https://fastly.jsdelivr.net/npm/[email protected]/lib/theme-chalk/index.css"
/>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/lib/index.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/lib/index.js"></script>
</head>
<body>
<div id="main"></div>
diff --git a/public/en/index.html b/public/en/index.html
index 190beb28..31567081 100644
--- a/public/en/index.html
+++ b/public/en/index.html
@@ -3,6 +3,10 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <link
+ rel="shortcut icon"
+ href="https://echarts.apache.org/en/images/favicon.png"
+ />
<title>ECharts Examples</title>
<style>
body {
@@ -16,16 +20,16 @@
</style>
<link
rel="stylesheet"
-
href="//fastly.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
+
href="https://fastly.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
/>
<link
rel="stylesheet"
-
href="//fastly.jsdelivr.net/npm/[email protected]/lib/theme-chalk/index.css"
+
href="https://fastly.jsdelivr.net/npm/[email protected]/lib/theme-chalk/index.css"
/>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/lib/index.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/lib/index.js"></script>
</head>
<body>
<div id="main"></div>
diff --git a/public/en/view.html b/public/en/view.html
index 99fccee6..cd6a517e 100644
--- a/public/en/view.html
+++ b/public/en/view.html
@@ -3,6 +3,10 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <link
+ rel="shortcut icon"
+ href="https://echarts.apache.org/en/images/favicon.png"
+ />
<title>ECharts Examples</title>
<style>
body {
@@ -16,16 +20,16 @@
</style>
<link
rel="stylesheet"
-
href="//fastly.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
+
href="https://fastly.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
/>
<link
rel="stylesheet"
-
href="//fastly.jsdelivr.net/npm/[email protected]/lib/theme-chalk/index.css"
+
href="https://fastly.jsdelivr.net/npm/[email protected]/lib/theme-chalk/index.css"
/>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/lib/index.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/lib/index.js"></script>
</head>
<body>
<div id="main"></div>
diff --git a/public/zh/editor.html b/public/zh/editor.html
index 2c9d2731..f658bf92 100644
--- a/public/zh/editor.html
+++ b/public/zh/editor.html
@@ -3,6 +3,10 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <link
+ rel="shortcut icon"
+ href="https://echarts.apache.org/zh/images/favicon.png"
+ />
<title>ECharts Examples</title>
<style>
body {
@@ -20,12 +24,12 @@
/>
<link
rel="stylesheet"
-
href="//fastly.jsdelivr.net/npm/[email protected]/lib/theme-chalk/index.css"
+
href="https://fastly.jsdelivr.net/npm/[email protected]/lib/theme-chalk/index.css"
/>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/lib/index.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/lib/index.js"></script>
</head>
<body>
<div id="main"></div>
diff --git a/public/zh/index.html b/public/zh/index.html
index 8c6b4e6c..093b889a 100644
--- a/public/zh/index.html
+++ b/public/zh/index.html
@@ -3,6 +3,10 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <link
+ rel="shortcut icon"
+ href="https://echarts.apache.org/zh/images/favicon.png"
+ />
<title>ECharts Examples</title>
<style>
body {
@@ -16,16 +20,16 @@
</style>
<link
rel="stylesheet"
-
href="//fastly.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
+
href="https://fastly.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
/>
<link
rel="stylesheet"
-
href="//fastly.jsdelivr.net/npm/[email protected]/lib/theme-chalk/index.css"
+
href="https://fastly.jsdelivr.net/npm/[email protected]/lib/theme-chalk/index.css"
/>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/lib/index.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/lib/index.js"></script>
</head>
<body>
<div id="main"></div>
diff --git a/public/zh/view.html b/public/zh/view.html
index 51623c04..935a3450 100644
--- a/public/zh/view.html
+++ b/public/zh/view.html
@@ -3,6 +3,10 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <link
+ rel="shortcut icon"
+ href="https://echarts.apache.org/zh/images/favicon.png"
+ />
<title>ECharts Examples</title>
<style>
body {
@@ -16,16 +20,16 @@
</style>
<link
rel="stylesheet"
-
href="//fastly.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
+
href="https://fastly.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
/>
<link
rel="stylesheet"
-
href="//fastly.jsdelivr.net/npm/[email protected]/lib/theme-chalk/index.css"
+
href="https://fastly.jsdelivr.net/npm/[email protected]/lib/theme-chalk/index.css"
/>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
- <script
src="//fastly.jsdelivr.net/npm/[email protected]/lib/index.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
+ <script
src="https://fastly.jsdelivr.net/npm/[email protected]/lib/index.js"></script>
</head>
<body>
<div id="main"></div>
diff --git a/src/explore/Explore.vue b/src/explore/Explore.vue
index 1f9b20bf..885b94a6 100644
--- a/src/explore/Explore.vue
+++ b/src/explore/Explore.vue
@@ -1,19 +1,20 @@
<template>
- <div id="example-explore">
+ <div
+ id="example-explore"
+ ref="scrollContainer"
+ @wheel.passive="onContentScroll"
+ @touchmove.passive="onContentScroll"
+ @scroll.passive="onScroll"
+ @pointerdown="onPointerUpDown"
+ @pointerup="onPointerUpDown"
+ >
<div id="left-container" ref="leftContainer">
<div id="left-chart-nav">
- <scrollactive
- active-class="active"
- :offset="80"
- :duration="500"
- :scroll-container-selector="'#example-explore'"
- bezier-easing-value=".5,0,.35,1"
- @itemchanged="onActiveNavChanged"
- >
+ <nav ref="nav">
<ul>
<li v-for="category in EXAMPLE_CATEGORIES" :key="category">
<a
- class="left-chart-nav-link scrollactive-item"
+ class="left-chart-nav-link"
:id="'left-chart-nav-' + category"
:href="'#chart-type-' + category"
>
@@ -24,7 +25,7 @@
</a>
</li>
</ul>
- </scrollactive>
+ </nav>
</div>
</div>
<div id="explore-container">
@@ -216,6 +217,29 @@ export default {
},
mounted() {
+ const { nav, scrollContainer } = this.$refs;
+ const navItems = [].slice.call(
+ nav.querySelectorAll('.left-chart-nav-link')
+ );
+ this._scrollactive = {
+ nav,
+ navItems,
+ scrollContainer,
+ scrollAnchors: navItems.map((item) =>
+ scrollContainer.querySelector(item.hash)
+ )
+ };
+ this.$nextTick(() => {
+ const hash = (location.hash = location.hash || navItems[0].hash);
+ this.onHashChange();
+ // const initialAnchor = hash && scrollContainer.querySelector(hash);
+ // initialAnchor && setTimeout(() => initialAnchor.scrollIntoView(), 0);
+ location.hash = '';
+ location.hash = hash;
+ });
+ window.addEventListener('hashchange', this.onHashChange);
+ window.addEventListener('keydown', this.onKeyDown);
+
this._lazyload = new LazyLoad({
// Container should be the scroll viewport.
// container: this.$el.querySelector('#explore-container
.example-list-panel'),
@@ -236,22 +260,82 @@ export default {
},
methods: {
- onActiveNavChanged(event, currentItem, lastActiveItem) {
- if (!event || !currentItem) {
+ onPointerUpDown(e) {
+ const scrollactive = this._scrollactive;
+ const scrollContainer = scrollactive.scrollContainer;
+ scrollactive.maybeDraggingScrollbar =
+ e.type === 'pointerdown'
+ ? e.button === 0 &&
+ e.clientX >=
+ scrollContainer.clientLeft + scrollContainer.clientWidth - 18
+ : false;
+ },
+ // manually scroll
+ onKeyDown(e) {
+ const keyCode = e.keyCode;
+ if (
+ // page up, page down, end, home
+ (keyCode > 32 && keyCode < 37) ||
+ // arrow up, arrow down
+ keyCode === 38 ||
+ keyCode === 40
+ ) {
+ this.onContentScroll();
+ }
+ },
+ // FIXME can't detect if it's scrolled by dragging scrollbar
+ onScroll() {
+ this._scrollactive.maybeDraggingScrollbar && this.onContentScroll();
+ },
+ // wheel, touchmove, keydown (see above)
+ onContentScroll() {
+ const { navItems, scrollAnchors, scrollContainer } = this._scrollactive;
+ const scrollTop = scrollContainer.scrollTop;
+ if (
+ scrollTop <= 1 ||
+ scrollTop >=
+ scrollContainer.scrollHeight - scrollContainer.offsetHeight - 1
+ ) {
return;
}
- // change url
- history.replaceState(null, null, currentItem.href);
-
+ for (let i = 0, len = scrollAnchors.length; i < len; i++) {
+ const anchor = scrollAnchors[i];
+ const section = anchor.parentElement;
+ const targetOffsetTop = section.offsetTop - 80;
+ const hash = '#' + anchor.id;
+ if (
+ scrollTop >= targetOffsetTop &&
+ scrollTop < targetOffsetTop + section.offsetHeight &&
+ location.hash !== hash
+ ) {
+ // location.hash = hash;
+ history.replaceState(null, null, navItems[i].href);
+ this.onHashChange();
+ break;
+ }
+ }
+ },
+ onHashChange() {
+ const { lastActiveNavItem, navItems } = this._scrollactive;
+ if (lastActiveNavItem) {
+ lastActiveNavItem.classList.remove('active');
+ }
+ const hash = location.hash;
+ const activeNavItem = (this._scrollactive.lastActiveNavItem =
+ navItems.find((item) => item.hash === hash));
+ if (!activeNavItem) {
+ return;
+ }
+ activeNavItem.classList.add('active');
// scroll nav
const leftContainer = this.$refs.leftContainer;
const containerOffsetHeight = leftContainer.offsetHeight;
- const rect = currentItem.parentElement.getBoundingClientRect();
+ const rect = activeNavItem.parentElement.getBoundingClientRect();
if (rect.top < 0 || rect.bottom > containerOffsetHeight) {
const scrollTop =
- currentItem.offsetTop -
+ activeNavItem.offsetTop -
containerOffsetHeight +
- currentItem.offsetHeight;
+ activeNavItem.offsetHeight;
leftContainer.scrollTo
? leftContainer.scrollTo(0, scrollTop)
: (leftContainer.scrollTop = scrollTop);
@@ -292,6 +376,7 @@ $pd-lg: 20px;
bottom: 0;
left: 0;
overflow-y: auto;
+ scroll-behavior: smooth;
::-webkit-scrollbar {
height: 4px;
@@ -336,6 +421,8 @@ $pd-lg: 20px;
font-weight: normal;
color: #464646;
font-size: 20px;
+ // TODO use variable
+ scroll-margin-top: 80px;
}
.chart-type-head span {
font-size: 16px;
@@ -354,6 +441,7 @@ $pd-lg: 20px;
width: $chart-nav-width;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
overflow-y: auto;
+ scrollbar-width: thin;
// scroll-behavior: smooth;
}
diff --git a/src/main.js b/src/main.js
index 24ba141f..1bfc5d54 100644
--- a/src/main.js
+++ b/src/main.js
@@ -5,9 +5,6 @@ import EditorPage from './editor/Editor.vue';
import ExplorePage from './explore/Explore.vue';
import ViewPage from './editor/View.vue';
import { store } from './common/store';
-import VueScrollactive from 'vue-scrollactive';
-
-Vue.use(VueScrollactive);
/**
*
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]