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
在這裏插入圖片描述

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