This commit is contained in:
cjw 2024-02-23 13:59:33 +08:00
commit 843959b52b
1 changed files with 7 additions and 5 deletions

View File

@ -88,13 +88,16 @@
</el-button>
</el-tooltip> -->
<el-popover v-if="scope.row.record.length > 0" @show="handleHistory(scope.row, scope.column)" placement="bottom"
title="修改历史留痕" :width="200" trigger="hover" :content="hisRecord">
<el-popover v-if="scope.row.record.length > 0" @before-enter="handleHistory(scope.row, scope.column)" placement="bottom"
title="修改历史留痕" :width="200" trigger="hover">
<template #reference>
<el-button link @click="handleDate(scope.column, scope.row)">
{{ handleDateColumn(scope.row, scope.column) }}
</el-button>
</template>
<template #default>
<li v-for="his in hisRecord">{{ his }}</li>
</template>
</el-popover>
<el-button v-else link @click="handleDate(scope.column, scope.row)">
@ -311,7 +314,7 @@ function handleDateColumn(row, column) {
return remark
}
const hisRecord = ref('')
const hisRecord = ref([])
async function handleHistory(row, column) {
let res = []
if (row.record.length > 0) {
@ -326,8 +329,7 @@ async function handleHistory(row, column) {
}
}
}
console.log('res', res)
hisRecord.value = res.join(',')
hisRecord.value = res
}
const nbsp = "&nbsp;&nbsp;&nbsp;&nbsp;"