vuejs / composition-api

Composition API plugin for Vue 2

Home Page:https://composition-api.vuejs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setup使用getCurrentInstance()返回的对象是null

seafronthu opened this issue · comments

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

We temporarily close this due to the lack of enough information.
Please provide a minimal reproduction to reopen the issue.
Thanks.

Why reproduction is required