<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>
|