我想删除v-data-table上的分页,使用隐藏默认页脚,但它不起作用.

try 使用隐藏dafault页脚

<v-data-table
        :headers="headers"
        :items="desserts"
        hide-default-header
        hide-default-footer
        class="elevation-1"
      >
        <template slot="items" slot-scope="props">
          <td>{{ props.index }}</td>
          <td>{{ props.item.name }}</td>
          <td>{{ getProject(props.item.project_uuid) }}</td>
          <td>{{ props.item.deadline }}</td>
          <td>{{ getUser(props.item.executor) }}</td>
          <td>{{ getUser(props.item.creator) }}</td>
          <td>{{ props.item.description }}</td>
        </template>
      </v-data-table>

要删除分页吗

推荐答案

应该是:hide-default-footer="true"

<v-data-table
        :headers="headers"
        :items="desserts"
        :hide-default-header="true"
        :hide-default-footer="true"
        class="elevation-1"
      >
        <template slot="items" slot-scope="props">
          <td>{{ props.index }}</td>
          <td>{{ props.item.name }}</td>
          <td>{{ getProject(props.item.project_uuid) }}</td>
          <td>{{ props.item.deadline }}</td>
          <td>{{ getUser(props.item.executor) }}</td>
          <td>{{ getUser(props.item.creator) }}</td>
          <td>{{ props.item.description }}</td>
        </template>
      </v-data-table>

codepen上的演示

Vue.js相关问答推荐

我可以手动访问 vue-router 解析器吗?

如何在 Nuxt3 中使用 nuxtjs/auth-next 模块?

Vue Js Composition Api 未定义(读取名称)

Vue子组件等待props

如何使用带有自定义标签和类的`transition-group`

vuetifyjs:仅添加使用过的图标来构建

Vue 单元测试:您正在开发模式下运行 Vue?

Vuetify v-data-table ,如何在 HTML 中呈现标题文本?

为什么Vue.js 使用单字标签

Vue-Router 抽象父路由

Vue.js 中 Chrome 和 Datalist 的性能问题

如何将参数传递给使用 ...mapActions(...) 映射的函数?

从 Url 中删除查询字符串参数

如何突出显示 Vuetify 菜单中的选定项目?

Vuex:无法读取未定义的属性'$store'

如何从方法内部访问数据

在子元素 vueJS.2 之间切换active类

在 Vuejs 中放置 firebase.auth().onAuthStateChanged() 的位置

如何在我的 vue js 中实现无限滚动

如果通过 jquery 更新,Vuejs 绑定不起作用