vuejs / composition-api

Composition API plugin for Vue 2
https://composition-api.vuejs.org/
MIT License
4.19k stars 343 forks source link

在vue2.6中使用这个,报错The setup binding property "addCount" is already declared. #954

Closed Guidozijef closed 2 years ago

Guidozijef commented 2 years ago

在vue2.6中使用这个,报错The setup binding property "addCount" is already declared,setup函数导出的每一个属性都会有一个警告,这是为什么?

antfu commented 2 years ago

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

Cynthiafan commented 2 years ago

I got the same problem. I created a new project by vue cli and installed composition API, then encountered the situation.

https://codesandbox.io/s/composition-api-setup-problem-eigr1t?file=/src/App.vue

Edit: I might found the problem. The version of vue in package.json is ^2.6.14, so 2.7.7 is installed. The problem is solved if I specify the version to 2.6.14.