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删除即可


  • 2021-01-22 22:01:19

    Emscripten Compiler Frontend (emcc)

    The Emscripten Compiler Frontend (emcc) is used to call the Emscripten compiler from the command line. It is effectively a drop-in replacement for a standard compiler like gcc or clang.

  • 2021-01-22 22:21:41

    emcc编译命令介绍

    这个输入文件file,既可以是clang可以编译的C/C++语言,也可以是二进制形式的llvm bitcode或者人类可读形式的llvm assembly文件。

  • 2021-01-22 22:25:51

    How to protect your JS code by WebAssembly

    对于iOS或是Android来说,我们可以将相关的算法通过C/C++进行编写,然后编译为dylib或是so并进行混淆以此来增加破解的复杂度,但是对于前端来说,并没有类似的技术可以使用。当然,自从asm.js及WebAssembly的全面推进后,我们可以使用其进一步增强我们核心代码的安全性,但由于asm.js以及WebAssembly标准的开放,其安全强度也并非想象中的那么美好。

  • 2021-01-24 09:50:16

    UICollectionViewCell cell高度自适应

    本来想使用UICollectionView来作为整体的布局,并且不再使用UITableView,但是发现高度不固定的布局,UICollectionView没啥优势呀,至少我没找到好的方法,从网上看的是,要自定义cell,并且继承preferredLayoutAttributesFittingAttributes