Relative Content

Tag Archive for vuejs3

vue3: how to access variables in from export default

When I make a project migration from vue2 to vue3, in the vue3 script setup segment, there is a variable, but I need to access it in the method in export default part which is from vue2 project. If I access it directly, it will throw an error which means ‘undefined’ or ‘not defined’.

Vue3 props/slots reactivity

I wrote a “tree” component in vue3, with some slots to data-display customization.
It works well, but some days ago I found a problem. The case is:

All elements in App.vue are automatically centered

I am creating my first Vue project with Vue3 and ts. But I found any kind of elements writen in the App.vue will be automatically centered in the screen, when the width of page is bigger than 1024.