Gridsome Pager在组件内部不起作用

问题描述 投票:0回答:1

如果在索引内部使用Pager,但是在组件内部使用Pager时,则无法使用。有帮助吗?

<Pager :info="$static.posts.pageInfo" />

和GraphQl

<static-query>
query Posts($page:Int){
  posts: allPost(perPage: 3, page: $page) @paginate{
    totalCount
    pageInfo {
      totalPages
      currentPage
      isFirst
      isLast
    }
    edges {
      node {
        title
        image
        id
        path
        excerpt
      }
    }
  }
}
</static-query>
vue.js pagination pager gridsome
1个回答
0
投票
<static-query>
query Posts($page:Int){
  posts: allPost(perPage: 3, page: $page) @paginate{
    totalCount
    pageInfo {
      totalPages
      currentPage
      isFirst
      isLast
    }
    edges {
      node {
        title
        image
        id
        path
        excerpt
      }
    }
  }
}
</static-query>
© www.soinside.com 2019 - 2024. All rights reserved.