601表格排序后刷新报错

This commit is contained in:
hyx
2022-09-06 17:20:16 +08:00
parent 5d02578aa5
commit db163d4a0e

View File

@@ -546,16 +546,16 @@ export default {
initData () { initData () {
// 取消表格排序高亮的箭头 // 取消表格排序高亮的箭头
if (this.column.prop) { if (this.column.prop) {
const columns = this.$refs['dataTable_' + this.index] let table = this.$refs['dataTable_' + this.index]
? ((Array.isArray(this.$refs['dataTable_' + this.index]) let tableHeaer = this.$refs['dataTable_' + this.index]?(Array.isArray(this.$refs['dataTable_' + this.index])
?this.$refs['dataTable_' + this.index][0].$refs.tableHeader ?this.$refs['dataTable_' + this.index][0].$refs.tableHeader
:this.$refs['dataTable_' + this.index].$refs.tableHeader) :this.$refs['dataTable_' + this.index].$refs.tableHeader):[]
? this.$refs['dataTable_' + this.index].$refs.tableHeader.columns const columns = tableHeaer.columns
: []) if(columns){
: [] columns.forEach(item => {
columns.forEach(item => { item.order = ''
item.order = '' })
}) }
this.column = {} this.column = {}
this.index = 0 this.index = 0
} }