NEZ-1965 feat :增加列表页面内容复制功能

This commit is contained in:
likexuan
2022-07-06 11:11:40 +08:00
parent 82d7386dec
commit 873afdc67e
6 changed files with 55 additions and 8 deletions

View File

@@ -35,17 +35,20 @@
>
<template slot-scope="scope" :column="item">
<template v-if="item.prop === 'alertRule'">
<div v-if="scope.row.alertRule&&scope.row.alertRule.name" >
<span
<div v-if="scope.row.alertRule&&scope.row.alertRule.name" class="document-copy-block">
<span class="document-copy-text"
@mouseenter="alertMessageHover(scope.row, true, $event)"
@mouseleave="alertMessageHover(scope.row, false)"
>{{scope.row.alertRule?scope.row.alertRule.name : '--'}}</span>
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.alertRule.name)" :title="$t('overall.copyText')"></i>
</div>
<template v-else>-</template>
</template>
<template v-else-if="item.prop === 'summary'">
<template v-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
<template v-else>-</template>
<div class="document-copy-block">
<span class="document-copy-text">{{scope.row[item.prop] ? scope.row[item.prop] : '-'}}</span>
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop])" :title="$t('overall.copyText')"></i>
</div>
</template>
<template v-else-if="item.prop === 'description'">
<template v-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>