Vue beaforeCreate时获取data中的数据

90 阅读1分钟
1.	异步获取即:通过	$this.$nextTick或者settimeout,这连dom都可以拿出来
beforeCreate() {
			this.$nextTick(function() {
console.log(this.属性名);
})
})
2.	同步获取:在beforeCreate之前,所有的iptions都会先存到vm.$options中,
也就是说使用this.$options.data就行了