EranGrin / vue-web-component-wrapper

vue3 - web component wrapper plugin
https://erangrin.github.io/vue-web-component-wrapper/
50 stars 5 forks source link

Properties are not passed to web component #6

Closed kcleong closed 11 months ago

kcleong commented 1 year ago

When using this wrapper properties are not passed to the web component.

I've created an example project with a regular web component (using defineCustomElement) and one using this wrapper. For the regular component the properties are passed but using the wrapper no properties seem to be passed.

Example project:

<!-- Using defineCustomElement -->
<custom-app-one msg="Hello web component! #1"></custom-app-one>

<!-- Using vue-web-component-wrapper -->
<custom-app-two msg="Hello web component! #2"></custom-app-two>

Output:

Screenshot 2023-08-01 at 09 34 54

In the above screenshot I would expect msg="Hello web component! #2" to be passed to App.ce.vue, however no property is passed.

EranGrin commented 1 year ago

Check out this example with 'msg' prop from the web component https://stackblitz.com/edit/vue-web-component-wrapper-bja76q?file=demo-app-vite%2Fsrc%2FApp.vue,demo-app-vite%2Findex.html&startScript=vite-demo

EranGrin commented 1 year ago

@kcleong I'm closing this issue, as you can see in the example link, it does work with props

kcleong commented 11 months ago

@EranGrin this issue has been solved since I've upgraded from version 1.0.5 to 1.1.1.