chyj4747 / vue3-golden-layout-virtualcomponent

A demo shows how to use golden-layout's virtual component in vue3
32 stars 10 forks source link

Problem with versions of Vue 3.2.25 and later #6

Open rudolfaccenture opened 2 years ago

rudolfaccenture commented 2 years ago

This line and the others in which this property is accessed as is throws an error in versions of Vue from 3.2.25 and onwards, because its value is an array. Accessing the property as the first element of an array (so, basically just adding "[0]" after "component.glc") fixes the issue according to my testing.

https://github.com/chyj4747/vue3-golden-layout-virtualcomponent/blob/5ce17d3ec7a93914bd08ea56cfc455f95608812b/src/components/Glayout.vue#L207

weigao-123 commented 2 years ago

Yes, recently I also tried Vue3.2.37 with Vite and has the same issue. More details can be found here #4