Property or method "xxxx" is not defined on the instance but referenced during render.

这是一个苦笑不得的😀bug

全部的错误信息

vue.runtime.esm.js?3a00:601 [Vue warn]: Property or method "handleSearch" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

found in

---> <Index>
       <Content>
         <Layout>
           <Content>
             <Layout>... (1 recursive calls)
               <Main> at src/components/main/main.vue
                 <App> at src/App.vue
                   <Root>

我明明写了这个方法,咋就报错了呢?
最后在朋友的帮助下,经过排查,原来是methods少写了一个s
在这里插入图片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章