ecomfe / vue-echarts

Vue.js component for Apache ECharts™.
https://vue-echarts.dev
MIT License
9.65k stars 1.49k forks source link

Vue provide(THEME_KEY, 'dark') 會打亂CSS #808

Closed fattysun1121 closed 1 month ago

fattysun1121 commented 1 month ago

请确认

您是如何将 Vue-ECharts 引入项目的?

通过 ES 模块 import

版本信息

├─┬ @vitejs/plugin-vue@5.1.1
│ └── vue@3.4.34 deduped
├── echarts@5.5.1
├─┬ vue-echarts@7.0.0-beta.0
│ ├── echarts@5.5.1 deduped
│ ├─┬ vue-demi@0.13.11
│ │ └── vue@3.4.34 deduped
│ └── vue@3.4.34 deduped
└─┬ vue@3.4.34
  └─┬ @vue/server-renderer@3.4.34
    └── vue@3.4.34 deduped

问题详情

我試過了很多次在不同的瀏覽器中。這一行代碼: provide(THEME_KEY, 'dark') 會讓我的app的css整個解體。 從這樣:

Screenshot 2024-08-08 at 10 00 47 PM

變成這樣:

Screenshot 2024-08-08 at 10 01 24 PM

整個relevant code 有這些 Screenshot 2024-08-08 at 10 02 01 PM

在問題復現的時候,uncomment provide的那一行可以看到影響。

问题复现

https://github.com/fattysun1121/ai-charts-interface/tree/94301c0bc354d5d0a0a5d3f0613cc5ecb55a7fa3

fattysun1121 commented 1 month ago

拜託各位了

daidaibg commented 1 month ago

拜託各位了

https://github.com/ecomfe/vue-echarts/issues/805#issuecomment-2274816833

fattysun1121 commented 1 month ago

原來是類似的問題。感謝

Justineo commented 1 month ago

@fattysun1121 请看一下升级到 vue-echarts@7.0.2 以后这个问题是否已经解决?

fattysun1121 commented 1 month ago

我是降級到6.7.3解決掉到

fattysun1121 commented 1 month ago

我升級到7.0.3看看

Justineo commented 1 month ago

我升級到7.0.3看看

Hi,请问问题解决了吗?

Justineo commented 1 month ago

先关闭了,如果仍有问题请开一个新 issue。