vue-plotly icon indicating copy to clipboard operation
vue-plotly copied to clipboard

Support for Vue3

Open vrandeshbandikatti opened this issue 3 years ago • 6 comments

This library does not work with Vue3.

Desperate need for support on vue3 as many are migrating from Vue2 to Vue3

vrandeshbandikatti avatar Jun 01 '22 05:06 vrandeshbandikatti

I wish I had read your comment earlier, I have been struggling with this library all day.

mikemrg17 avatar Jun 14 '22 13:06 mikemrg17

Hello, any chance Vue 3 support will be forthcoming? Thanks!

mokadevcloud avatar Nov 25 '22 17:11 mokadevcloud

Hi, are there any changes since last post here? Is there support for Vue3?

tall1 avatar May 11 '23 08:05 tall1

Is there support for Vue3?

EWChina999 avatar Dec 02 '23 09:12 EWChina999

There's quite an easy workaround to get it working. Before loading "vueplotly.min.js" execute the following script:

window.vueLegacyPlugins = {}
Vue.component = function(componentname, component) {
    window.vueLegacyComponents[componentname] = component
}

Then in your vue app add the following line after creating your app:

app = Vue.createApp()
// legacy component support
app.component("plotly", vueLegacyComponents.plotly)

hhaensel avatar Feb 15 '24 06:02 hhaensel

There's quite an easy workaround to get it working. Before loading "vueplotly.min.js" execute the following script:

window.vueLegacyPlugins = {}
Vue.component = function(componentname, component) {
    window.vueLegacyComponents[componentname] = component
}

Hello, at what level of the code does this part go in?

Tylorgonza avatar May 13 '24 16:05 Tylorgonza