Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
610 views
in Technique[技术] by (71.8m points)

javascript - Why emitter @current-items not working for v-data-table?

I want to console.log visible items in table but @current-items emitter not working, please help me to figure out why? I have 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"
        >

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The @current-items event does not seem to exist in Vuetify 1.x. Take a look at the docs of the v-data-table for Vuetify 1.5.24.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...