setup使用getCurrentInstance()返回的对象是null
seafronthu opened this issue · comments
seafronthu commented
setup() {
alert(1); // 弹了两次
const instance = getCurrentInstance();
console.log(instance) // 结果是null
// do something
return {}
}
@vue/composition-api版本:1.7.0 (还原到1.4.4正常)
vue版本:2.6.11
Anthony Fu commented
We temporarily close this due to the lack of enough information.
Please provide a minimal reproduction to reopen the issue.
Thanks.