<small id='aQPSD'></small><noframes id='aQPSD'>

    1. <legend id='aQPSD'><style id='aQPSD'><dir id='aQPSD'><q id='aQPSD'></q></dir></style></legend>

          <bdo id='aQPSD'></bdo><ul id='aQPSD'></ul>
        <i id='aQPSD'><tr id='aQPSD'><dt id='aQPSD'><q id='aQPSD'><span id='aQPSD'><b id='aQPSD'><form id='aQPSD'><ins id='aQPSD'></ins><ul id='aQPSD'></ul><sub id='aQPSD'></sub></form><legend id='aQPSD'></legend><bdo id='aQPSD'><pre id='aQPSD'><center id='aQPSD'></center></pre></bdo></b><th id='aQPSD'></th></span></q></dt></tr></i><div id='aQPSD'><tfoot id='aQPSD'></tfoot><dl id='aQPSD'><fieldset id='aQPSD'></fieldset></dl></div>

      1. <tfoot id='aQPSD'></tfoot>

        Vuetify外部分页不显示页码

        Vuetify external pagination not displaying page numbers(Vuetify外部分页不显示页码)

      2. <tfoot id='O5FW2'></tfoot>
          • <legend id='O5FW2'><style id='O5FW2'><dir id='O5FW2'><q id='O5FW2'></q></dir></style></legend>

            <small id='O5FW2'></small><noframes id='O5FW2'>

              <tbody id='O5FW2'></tbody>
          • <i id='O5FW2'><tr id='O5FW2'><dt id='O5FW2'><q id='O5FW2'><span id='O5FW2'><b id='O5FW2'><form id='O5FW2'><ins id='O5FW2'></ins><ul id='O5FW2'></ul><sub id='O5FW2'></sub></form><legend id='O5FW2'></legend><bdo id='O5FW2'><pre id='O5FW2'><center id='O5FW2'></center></pre></bdo></b><th id='O5FW2'></th></span></q></dt></tr></i><div id='O5FW2'><tfoot id='O5FW2'></tfoot><dl id='O5FW2'><fieldset id='O5FW2'></fieldset></dl></div>
                  <bdo id='O5FW2'></bdo><ul id='O5FW2'></ul>

                  本文介绍了Vuetify外部分页不显示页码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个 v-data-table,我正在尝试为其添加分页.我已经按照示例文档

                  为了解决这个问题,当我的后端返回带有表格数据的响应时.我将 totalItems 设置为表中条目数的长度.

                  this.incidents = response.data['incidents']this.pagination.totalItems = this.incidents.length

                  在搜索栏中进行修复或键入

                  不确定这是否是 Vuetify v-data-table 的错误或问题.

                  I have a v-data-table and I'm trying to add pagination to it. I've followed the example docs here I can't see what I'm doing wrong. When my component is created it makes a call to my backend to populate a list of items. Then this is passed to the data table.

                  I also have a search bar and if I enter anything in it the page numbers pop up then.

                  HTML

                  <v-data-table
                        :headers="headers"
                        :items="incidents"
                        :search="search"
                        :pagination.sync="pagination"
                        hide-actions
                        class="elevation-1"
                        item-key="incident_number"
                      >
                  
                  </v-data-table>
                  
                   /* table row html in between */
                  
                  <div class="text-xs-center pt-2">
                        <v-pagination v-model="pagination.page" :length="pages" </v-pagination>
                  </div>
                  

                  JS

                  I have a computed property that works out the page number just like in the example.

                  computed: {
                        pages ()
                        {
                          if (this.pagination.rowsPerPage == null || this.pagination.totalItems == null)
                          {
                            return 0
                          }
                  
                          return Math.ceil(this.pagination.totalItems / this.pagination.rowsPerPage)
                  
                        },
                      }
                  

                  解决方案

                  Solved the issue. It would work when I enter something in the search bar so I noticed an event was being emitted by Vue. update:pagination within this there is a key value called totalItems and it was set to 0 on page load but when I enter something in the search bar it had a value after that.

                  On Page Load

                  To resolve the issue, when my backend returns the response with table data. I set the totalItems to the length of the number of entries in the table.

                  this.incidents = response.data['incidents']
                  this.pagination.totalItems = this.incidents.length
                  

                  With Fix or Typing in Searchbar

                  Not sure if this is a bug or issue with the Vuetify v-data-table or not.

                  这篇关于Vuetify外部分页不显示页码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Vue html comment handling(Vue html 注释处理)
                  Testing HTML/CSS/Javascript skills when hiring(招聘时测试 HTML/CSS/Javascript 技能)
                  how can i disable a body style for only one component(如何仅禁用一个组件的主体样式)
                  Is it safe to use base64 encoded images for web, Advantages and Disadvantages?(将 base64 编码的图像用于 Web 是否安全,优点和缺点?)
                  Full Width Background with Fixed Width Content (CSS)(具有固定宽度内容 (CSS) 的全宽背景)
                  Is it possible to make text-overflow:ellipsis for select with css only?(是否可以仅使用 css 为 select 制作 text-overflow:ellipsis ?)

                • <legend id='kdj5g'><style id='kdj5g'><dir id='kdj5g'><q id='kdj5g'></q></dir></style></legend>
                • <i id='kdj5g'><tr id='kdj5g'><dt id='kdj5g'><q id='kdj5g'><span id='kdj5g'><b id='kdj5g'><form id='kdj5g'><ins id='kdj5g'></ins><ul id='kdj5g'></ul><sub id='kdj5g'></sub></form><legend id='kdj5g'></legend><bdo id='kdj5g'><pre id='kdj5g'><center id='kdj5g'></center></pre></bdo></b><th id='kdj5g'></th></span></q></dt></tr></i><div id='kdj5g'><tfoot id='kdj5g'></tfoot><dl id='kdj5g'><fieldset id='kdj5g'></fieldset></dl></div>

                        <tbody id='kdj5g'></tbody>
                    1. <tfoot id='kdj5g'></tfoot>
                        <bdo id='kdj5g'></bdo><ul id='kdj5g'></ul>

                          <small id='kdj5g'></small><noframes id='kdj5g'>