Giter VIP home page Giter VIP logo

Comments (4)

Justineo avatar Justineo commented on May 24, 2024

This is the expected behavior in Vue 3.

See https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html

from vue-echarts.

kingyue737 avatar kingyue737 commented on May 24, 2024

@Justineo Not an expected behavior. In Vue 3, we do not need .native modifier and the listener will automatically become a native event listener if this event is not defined in component

Here in Vue-Echarts, the listener just does not work, instead of falling back to an effective native event listener

from vue-echarts.

kingyue737 avatar kingyue737 commented on May 24, 2024

Ah I see, inheritAttrs: false is set in Vue ECharts. Why turn this off?
https://github.com/ecomfe/vue-echarts/blob/311d588850b83debbea7f1e501f8ceddf7abec5f/src/ECharts.ts#L73C17-L73C22

How can I use native event listener on VChart in Vue 3 🤔, without wrapping an element around every v-chart?

from vue-echarts.

Justineo avatar Justineo commented on May 24, 2024

Vue-Echarts is delegating all events to ECharts itself and that's why it doesn't work (so that you can bind ECharts events directily like <v-chart @datazoom="..." />). You cannot do that with Vue 2 without a .native modifier either. Currently you need to an HTML element as a wrapper to bind events like mouseenter.

from vue-echarts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.