How to use the created hook in the setup script
P粉549412038
P粉549412038 2023-08-25 18:09:05
0
1
492
<p><pre class="brush:php;toolbar:false;"><script> export default { setup() { } created() { } } </script></pre> <p>How do I use the hook I created when I change to using script settings syntax? </p> <pre class="brush:php;toolbar:false;"><setup script> // how to use created hook? </script></pre></p>
P粉549412038
P粉549412038

reply all(1)
P粉787806024

As you can see here, there is no such thing as "create" in the Composition API lifecycle: https://vuejs.org/api/composition-api-lifecycle.html

Because it happens before actual creation

created The hook follows as follows: https://vuejs.org/guide/essentials/lifecycle.html#lifecycle-diagram

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!