Skip to content

Use Web Components without native class support detection #836

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
merged 1 commit into from
Jun 1, 2025

Conversation

kingyue737
Copy link
Member

No description provided.

Copy link

vercel bot commented Jun 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vue-echarts ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2025 9:08am

@Justineo Justineo merged commit 001cc1a into 8.0 Jun 1, 2025
4 checks passed
@Justineo
Copy link
Member

Justineo commented Jun 1, 2025

I have an idea: we might be able to use this approach to support rendering components in ECharts tooltips. Previously, we didn't support this because ECharts doesn't provide a callback when a tooltip is removed from the DOM, which preventing rendered components from being disposed. It's still just a rough idea and may not be feasible, but worth exploring.

@kingyue737 kingyue737 deleted the wc-native-class branch June 1, 2025 13:09
@kingyue737
Copy link
Member Author

kingyue737 commented Jun 1, 2025

I'm not entirely sure what your approach is for implementing this feature.

What I had in mind was allowing users to pass custom components via a slot, like this:

<v-chart>
  <template #tooltip="{ params }">
    <div>
      <div>my tooltip</div>
      <MyComponent v-bind="params" />
    </div>
  </template>
</v-chart>

The slot props can then be updated using the showTip and hideTip events. These aren't listed in the "event" section of the ECharts documentation, but they are documented under "actions". I've tested that both events do exist, and we can also add type definitions for them in Vue-ECharts if needed.

@Justineo
Copy link
Member

Justineo commented Jun 1, 2025

Hmm…I didn't realize these two events exist. Maybe they are enough for that feature.

@kingyue737 kingyue737 mentioned this pull request Jul 24, 2025
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants