Home >Web Front-end >Vue.js >How to use
There are some subtle differences that distinguish the two ways of declaring components: Components are "not enabled by default". This means that other components cannot see what is defined inside the component. script setup
For example, in the next chapter we will see that a component can access another component (by using refs). When a function is defined as XX, all content returned by the function is also visible in the parent component YY. If defined with , the parent component is not visible. Exposed content can be selected by adding helpers. The public ones will then be accessible as . PonyImageImagedefineComponentsetupPonyImagescript setupImagedefineExpose({ key: value })valuekey
The above is the detailed content of How to use