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]: Invalid prop: type check failed for prop "unlinkPanels". Expected Boolean, got String with value "true".VueAIBooleanGo
- [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,emit資料傳遞示例VueMIT
- prop父子元件通訊,動靜態prop元件
- python: invalid value encountered in divide以及invalid value encountered in double_scalars報錯PythonIDE
- React報錯之Element type is invalidReact
- SpringBoot升級到3.2.0報錯Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.StringSpring BootBeanObjectJava
- react-router 報錯The prop `history` is marked as required in `Router`, but its valReactUI
- vue專案報錯[Vue warn]: Property “visible“ must be accessed with “$data.visible“ because properties startVue
- 兩種語法糖,搞定Vue元件Prop的雙向繫結Vue元件
- Vue父子元件通過prop非同步傳輸資料踩坑Vue元件非同步
- 執行時報錯RuntimeError: expected device cpu but got device cuda:0ErrordevGo
- 元件、Prop 和 State元件
- [譯] 元件、Prop 和 State元件
- err Invalid input of type: 'dict'. Convert to a byte, string or number first
- `jsonb` 報錯 `invalid input syntax for type timestamp with time zone ““JSON
- yolov5 train報錯:TypeError: expected np.ndarray (got numpy.ndarray)YOLOAIErrorGo
- Vue 啟動專案報錯 Failed to compile with 2 errorsVueAICompileError
- VUE前端打包報錯:TypeError: Class extends value undefined is not a constructor or nullVue前端ErrorUndefinedStructNull
- mybatis竟然報"Invalid value for getInt()"MyBatis
- Pycharm:設定完Anaconda後報錯TypeError: an integer is required (got type bytes)PyCharmErrorUIGo
- python用pyinstaller生成exe時報錯 TypeError: an integer is required (got type bytes)PythonErrorUIGo
- jquery prop和attr的區別jQuery
- 淺談jquery中prop()和attr()jQuery
- webstorm vue3+ts報錯:Cannot find module ‘@/views/xxx.vue‘ or its corresponding type declarationsWebORMVueView
- [Vue warn]: $attrs is readonly;Webpack externals 配置VueWeb
- yum安裝軟體報錯:Invalid configuration value: failovermethod=priority...AI
- npm報錯 TypeError [ERR_INVALID_ARG_TYPE]: The “path“ argument must be of type string.Received undefineNPMError
- xcode6編譯錯誤,提示Expected a typeXCode編譯
- Vue : Expected the Promise rejection reason to be an ErrorVuePromiseError
- streamlit run執行報錯,Invalid value: File does not exist: XXX.py
- React does not recognize the `activeStyle` prop on a DOM element.React
- jQuery的prop和attr方法比較jQuery
- React-Native ‘WKWebView` has no propType for native propReactWebView
- jquery中prop和attr的區別jQuery