I encapsulate the table plus pages, and then the header is dynamically generated based on the back-end data and the local configuration table. As a result, do you have any good solutions to the loss of row-click binding events?
menuList () {
const data = this.realData
const dict = this.fms_dict
if (!data || data.length === 0) return []
const object = data[0]
const menuList = []
for (const key in object) {
const item = {
value: key,
title: dict[key],
width: null,
tooltip: null
}
menuList.push(item)
}
return menuList
}
as shown in the figure, I wrote the configuration of the corresponding fields in dict, stored by calculating attributes, and then v-for in table to generate headers