我在 Laravel 中安装了 vuejs 并使用了 laravel mix,到目前为止一切正常,但是当我想重新激活数据以进行提供和注入时,我在这段代码中遇到了问题:
import { computed } from 'vue'
export default {
provide(){
return {
todos : computed(() => this.todos ),
deleteTodo: this.deleteTodo ,
editTodo : this.editTodo
}
} ,
和错误:
Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_3__.computed) is not a function
at VueComponent.provide (app.js:2092)
at initProvide (vendor.js:2450)
at VueComponent.Vue._init (vendor.js:5032)
at new VueComponent (vendor.js:5179)
at createComponentInstanceForVnode (vendor.js:3322)
at init (vendor.js:3151)
at createComponent (vendor.js:6035)
at createElm (vendor.js:5982)
at createChildren (vendor.js:6110)
at createElm (vendor.js:6011)
并且在 app.js 中导入时出现以下错误:
请帮我...