如何显示ag-grid行的行数?
我曾尝试挂钩modelUpdated事件,但该事件未被调用。
我想要显示页面加载和每行更改时的行数。
<ag-grid-vue
style="width: 700px;height: 500px;margin:20px 0;"
class="ag-theme-balham"
:enableCellChangeFlash="true"
...
rowHeight="55"
:modelUpdated="onModelUpdated"
></ag-grid-vue>发布于 2019-04-05 16:17:32
在vue中,对事件使用@,而不是:
下面是有效的代码:
<ag-grid-vue
style="width: 700px;height: 500px;margin:20px 0;"
class="ag-theme-balham"
:enableCellChangeFlash="true"
...
rowHeight="55"
@modelUpdated="onModelUpdated"
></ag-grid-vue>
onModelUpdated(event) {
const rowsCount = event.api.getDisplayedRowCount();
}https://stackoverflow.com/questions/55530999
复制相似问题