wujingjing
2024-11-06 768a63bdae68f9440d4b7f5768c3ea7f9308f2ab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<template>
    <yw-dialog headerIcon="ele-Copy" v-model="isShow" :showFooter="false" width="810" :title="title">
        <div class="max-h-[2/3vh]">
            <div class="border markdown-it" v-html="md.render(report ?? '')"></div>
            <i
                @click="copyInfo(report ?? '')"
                class="ywifont ywicon-copy text-blue-400 !text-[25px] cursor-pointer absolute bottom-10 right-10"
            ></i>
        </div>
    </yw-dialog>
</template>
 
<script setup lang="ts">
import { computed } from 'vue';
import ywDialog from '/@/components/dialog/yw-dialog.vue';
import commonFunction from '/@/utils/commonFunction';
import { md } from '../../libs/markdown';
 
const props = defineProps(['report', 'agentKey']);
const isShow = defineModel({
    type: Boolean,
});
const title = computed(() => props.agentKey + '—— 报告');
 
const { copyText } = commonFunction();
 
const copyInfo = async (item) => {
    copyText(item);
};
</script>
<style scoped lang="scss">
:deep(.el-card__body) {
    position: relative;
}
</style>