setup是在beforeCreate之前执行的,也就是vue实例还未被创建,因为setup中并没有this指针
<script>
export default {
setup() {
console.log('setup......')
},
beforeCreate() {
console.log('beforeCreate....')
},
}
</script>
标签:console,log,setup,时机,执行,beforeCreate
From: https://www.cnblogs.com/juelian/p/17624844.html