unjs / unhead

Unhead is the any-framework document head manager built for performance and delightful developer experience.
https://unhead.unjs.io
MIT License
639 stars 41 forks source link

Can't access component data via `this` in Vue 2 using the options api #400

Open kleinepls opened 2 months ago

kleinepls commented 2 months ago

Environment

Node v18.17.1 Vue 2.7.16 @unhead/vue 1.11.2

Reproduction

https://github.com/kleinepls/unhead-vue2

Describe the bug

To reproduce, just uncomment line 24 from App.vue from the linked repo and this should result to undefined.

After making the repo I re-checked the docs and it technically never shows that you can access the data property, so I'm wondering if this is a missing feature?

Additional context

No response

Logs

No response

harlan-zw commented 2 months ago

Hey, thanks for the issue. This should be fixed in v1.11.3.

kleinepls commented 1 month ago

Hi, thanks for taking a look. I think it's still not working though :( I've tested in 1.11.3 and 1.11.6. I've updated my repo if you want to check quickly

overclocked555 commented 1 month ago

Vue 2.7.16 @unhead/vue 1.11.6 still not working for me too