javascript - 为什么发射器@current-items 不适用于 v-data-table?
问题描述
我想控制台记录表中的可见项目,但@current-items 发射器不起作用,请帮我找出原因? 我有 Vuetify:“1.3.11”
methods: {
currentItems(val) {
console.log(val) // the method is not called for some reason
this.test = val
console.log(this.test)
}
}
<v-data-table
@input="updateSelected"
v-bind="calculatedTableProps"
ref="dataTable"
:pagination.sync="localPagination"
:value="selected"
:headers="localHeaders"
:items="filteredItems"
:headers-length="headerCount"
:total-items="totalCount"
:loading="tableLoading"
class="big-data-table"
:class="tableFitContent ? 'table-fit-content' : ''"
:hide-actions="customActions"
v-scroll:[scrollTarget]="onScroll"
@current-items="currentItems"
>
解决方案
@current-items
Vuetify 1.x 中似乎不存在该事件。查看Vuetify 1.5.24的 v-data-table文档。
推荐阅读
- javascript - 未应用样式变量 - 车把
- apache-beam - Dataflow 会在多长时间内记住 PubsubIO 中的属性 ID
- python - 从 json 文件中读取 sql 查询
- charts - 在 HighCharts 云中创建浮动条
- angular - *ngIf 带有计算布尔值的通用字符串表达式
- go - rpc 错误:代码 = 未实现 desc = RPC 方法未实现
- java - LibGDX applyLinearImpulse 试图实现 Gravity.... 困惑
- sql - 如何在 SELECT 子句中创建一个新列并用字符串/列表动态填充它,并满足所有条件语句的连接?
- css - 如何给margin-left与margin-right成比例?
- firebase - 从 firebase 以外的来源同时在 bigquery 中保存数据