ant [Vue warn]: Invalid prop: custom validator check failed for prop "pagination".错误

2020-05-15 22:40:15

遇到这样的问题,一般是props中的pagination有值不匹配造成的

我们可以通过打印数据检测一下有没有赋给其空值


参考地址 https://www.cnblogs.com/vipsoft/p/AntVue.html

遇到的错误如下:

 [Vue warn]: Invalid prop: custom validator check failed for prop "pagination".


found in


---> <ATable>

       <ACard>

         <UserTerminal> at src/views/om/userTerminal/UserTerminal.vue

           <RouteView> at src/layouts/RouteView.vue... (1 recursive calls)

             <Anonymous>

               <ALayoutContent>

                 <Anonymous>

                   <ALayout>

                     <Anonymous>

                       <ALayout>

                         <BasicLayout> at src/layouts/BasicLayout.vue

                           <ALocaleProvider>

                             <App> at src/App.vue

                               <Root>


错误提示:在model之下的table里有错误,pagination类型无法准确插入。

最后排查出来的结果是获取后端数据后将结果集的total赋值给了pagination.total

this.$http({

        url: '/getUserTerminalList',

        method: 'post',

        data: this.formData

      }).then(res => {

        this.datas = res.list

        this.pagination.total = res.total

      })


将this.pagination.total = res.total删除即可


  • 2017-04-06 15:15:16

    PHP-FPM配置及使用总结

    PHP-FPM配置及使用总结: PHP-FPM是一个PHP FastCGI的管理器,它实际上就是PHP源代码的补丁,旨在将FastCGI进程管理引进到PHP软件包中,我们必须将其patch到PHP源代码中,然后再行编译才能使用。而现在我们可以在PHP 5.3.2及更新版本中直接开启并使用即可,因为PHP从该版本已经将其收入到软件包中,所以其不再是补丁包的存在了。

  • 2017-04-07 23:18:29

    mac 安装composer

    当你下载了 composer.phar 后,可以将它放在目录中,但每次当你建立新目录时,你必須再复制一个副本到新目录中,这样比较麻烦。所以最佳做法是将它放到 usr/local/bin 目录中中,成为全域指令。

  • 2017-04-12 10:52:35

    最全面的Android Webview详解

    现在很多App里都内置了Web网页(Hyprid App),比如说很多电商平台,淘宝、京东、聚划算等等,如下图

  • 2017-04-12 11:22:43

    WebView你真的熟悉吗?看了才知道

    在Android手机中内置了一款高性能webkit内核浏览器,在SDK中封装为一个叫做WebView组件。下面总结一下使用webview遇到的那些事、那些坑。

  • 2017-04-12 11:28:14

    史上最全webview详解

    WebView在现在的项目中使用的频率应该还是非常高的。 我个人总觉得HTML5是一种趋势。找了一些东西,在此总结。 本篇最后有一个非常不错 的 Html5Activity 加载类,不想看的可以直接跳下载。

  • 2017-04-12 23:11:59

    Android Studio签名打包的两种方式

    给我们自己开发的app签名,就代表着我自己的版权,以后要进行升级,也必须要使用相同的签名才行。签名就代表着自己的身份(即keystore),多个app可以使用同一个签名。

  • 2017-04-13 10:57:08

    webstorm 怎么关闭jshint

    You need to configure the inspections in Settings/Editor/Inspections, then in the list on the right, find JavaScript/JavaScript validity issues. That worked for me to remove the Chai warnings. (I am using the WebStorm 11 EAP at the moment.)