Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【486页】 18-4配图 #197

Open
yang-xianzhu opened this issue Nov 22, 2022 · 4 comments
Open

【486页】 18-4配图 #197

yang-xianzhu opened this issue Nov 22, 2022 · 4 comments

Comments

@yang-xianzhu
Copy link

请问一下,执行顺序不是setup执行最早吗

@ddddd727
Copy link

仔细看官方文档的声明里setup就是在beforcreate以及解析完props后面啊,生命周期那一节里讲到了

@ddddd727
Copy link

最早执行的话,props,还有slot emit这些都没从组件解析怎么传给setup

@yang-xianzhu
Copy link
Author

这个是的,但是为什么在setup函数里打印会比beforeCreate要早打印

@yang-xianzhu
Copy link
Author

export default defineComponent({
beforeCreate(){
},
setup(){
// 这里打印会比beforeCreate早
}
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants