vue報錯:[Vue warn]: Invalid prop: type check failed for prop "value". Expected Number, got String....
新手,,經過一個多小時的排查,最後發現錯誤的是分頁的頁數屬性問題,這個屬性沒有被用到,
最開始用的是route的資料獲取,賦值給定義的currentPage,結果報錯Invalid prop: type check failed for prop "value". Expected Number, got String.,頁面重新整理時對應的分頁條數也不加特效
刪除v-model之後,不報錯,資料也不會產生錯誤,但是頁面重新整理後分頁欄無特效,
最後看了看同事的程式碼,發現v-model繫結屬性應該在 computed 裡賦值,
這樣就可以了,搜尋computed後發現是有關聯的值發生變化時實時計算,重新賦值,但是不太瞭解為什麼資料獲取時分頁欄不響應發生變化,記錄一下,以免忘記,,再探索
如果有知道為啥的兄弟,希望留言給我,謝謝!
相關文章
- [Vue warn]: The data property "dialogVisible" is already declared as a prop. Use prop default valueVue
- vue---Prop使用Vue
- vue原始碼解析-prop機制Vue原始碼
- vue實現prop雙向繫結Vue
- Vue元件中prop屬性使用說明Vue元件
- vue之prop,emit資料傳遞示例VueMIT
- vue.js 中 data, prop, computed, method,watch 介紹Vue.js
- jQuery prop()jQuery
- prop父子元件通訊,動靜態prop元件
- react-router 報錯The prop `history` is marked as required in `Router`, but its valReactUI
- 兩種語法糖,搞定Vue元件Prop的雙向繫結Vue元件
- Vue父子元件通過prop非同步傳輸資料踩坑Vue元件非同步
- React報錯之Element type is invalidReact
- Expected mime type application/octet-stream but got text/html.APPGoHTML
- 元件、Prop 和 State元件
- Opatch 報錯 Prerequisite check CheckMinimumOPatchVersion failedUIAI
- [譯] 元件、Prop 和 State元件
- prop()與attr()區別
- jQuery的attr與propjQuery
- vue專案報錯[Vue warn]: Property “visible“ must be accessed with “$data.visible“ because properties startVue
- oracle ORA-01722 報錯 "invalid number"Oracle
- Vue 啟動專案報錯 Failed to compile with 2 errorsVueAICompileError
- inconsistent datatypes: expected - got CLOB錯誤一例Go
- VUE前端打包報錯:TypeError: Class extends value undefined is not a constructor or nullVue前端ErrorUndefinedStructNull
- Linux 7.0 報錯: Check if the DISPLAY variable is set. FailedLinuxAI
- mybatis竟然報"Invalid value for getInt()"MyBatis
- jquery prop和attr的區別jQuery
- 淺談jquery中prop()和attr()jQuery
- Difference between prop and attr in different version of jqueryjQuery
- react.js:3640 Warning: Each child in an array or iterator should have a unique "key" prop. Check the...ReactJS
- 怎樣解決 [Vue warn]: The computed property "count" is already defined in data. 報錯問題?Vue
- 執行時報錯RuntimeError: expected device cpu but got device cuda:0ErrordevGo
- [Vue warn]: $attrs is readonly;Webpack externals 配置VueWeb
- Vue : Expected the Promise rejection reason to be an ErrorVuePromiseError
- vue init webpack報錯VueWeb
- jQuery的prop和attr方法比較jQuery
- jquery中prop和attr的區別jQuery
- Jquery中attr和prop的區別jQuery