-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: dynamically update the theme #841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+48
−19
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
cbdc6bc
feat: dynamically update the theme
kingyue737 5482f4c
not expose setTheme
kingyue737 d12e163
docs: add note for `showLoading` and `hideLoading` method
kingyue737 d7d26c4
update docs
kingyue737 a88b5cb
Apply suggestions from code review
Justineo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,7 +120,7 @@ Drop `<script>` inside your HTML file and access the component via `window.VueEC | |
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/echarts@5.5.1"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/echarts@6.0.0-beta.1"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> | ||
``` | ||
|
||
|
@@ -331,6 +331,12 @@ export default { | |
- `clear` [→](https://echarts.apache.org/en/api.html#echartsInstance.clear) | ||
- `dispose` [→](https://echarts.apache.org/en/api.html#echartsInstance.dispose) | ||
|
||
> [!NOTE] | ||
> Certain ECharts instance methods aren’t exposed because their functionality is already provided by component [props](#props): | ||
> | ||
> - Instead of [`showLoading`](https://echarts.apache.org/en/api.html#echartsInstance.showLoading) / [`hideLoading`](https://echarts.apache.org/en/api.html#echartsInstance.hideLoading), set the `loading` and `loading-options` props; | ||
> - Instead of `setTheme`, set the `theme` prop. | ||
|
||
### Static Methods | ||
|
||
Static methods can be accessed from [`echarts` itself](https://echarts.apache.org/en/api.html#echarts). | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,7 +120,7 @@ import "echarts"; | |
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/echarts@5.5.1"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/echarts@6.0.0-beta.1"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> | ||
``` | ||
|
||
|
@@ -331,6 +331,12 @@ export default { | |
- `clear` [→](https://echarts.apache.org/zh/api.html#echartsInstance.clear) | ||
- `dispose` [→](https://echarts.apache.org/zh/api.html#echartsInstance.dispose) | ||
|
||
> [!NOTE] | ||
> 某些 ECharts 实例方法没有被暴露,因为它们的功能已经通过组件 [props](#props) 提供了: | ||
> | ||
> - 不要使用 [`showLoading`](https://echarts.apache.org/zh/api.html#echartsInstance.showLoading) / [`hideLoading`](https://echarts.apache.org/zh/api.html#echartsInstance.hideLoading),请设置 `loading` 和 `loading-options` props; | ||
> - 不要使用 `setTheme`,请设置 `theme` prop。 | ||
Justineo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### 静态方法 | ||
|
||
静态方法请直接通过 [`echarts` 本身](https://echarts.apache.org/zh/api.html#echarts)进行调用。 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.