We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
tw-echarts/src/echarts/widget/index.ts
Line 130 in d67ea4f
这里使用 $:/info/darkmode 判断是不是更合适
The text was updated successfully, but these errors were encountered:
echarts 现在似乎不支持动态改变theme apache/echarts#18198
下面是暂时借助tailwindcss实现的动态切换
<div class="dark:hidden"> <$echarts $tiddler="sevenday.js" $theme='light'/> </div> <div class="hidden dark:inline"> <$echarts $tiddler="sevenday.js" $theme='dark'/> </div>
Sorry, something went wrong.
@Gk0Wk 可以直接在 onUpdate 函数里面像widget那样直接 重新刷新当前dom吗, 比如使用refreshSelf, 这样应该直接可以监听系统主题的变换,从而动态切换echart的主题了
onUpdate
ps: 感觉可以把监听事件直接写在echart的widget里面,这样每个addon就不用自己再判断一遍了
No branches or pull requests
tw-echarts/src/echarts/widget/index.ts
Line 130 in d67ea4f
这里使用 $:/info/darkmode 判断是不是更合适
The text was updated successfully, but these errors were encountered: