修改页面ui
parent
19875e203a
commit
4c6b76e7de
@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<a-modal title="提示信息" width="1000px" :visible="bcFileFlag" :footer="null" @cancel="bcFileFlag = false">
|
||||
<div class="bcfile-title">
|
||||
<div><a-icon style="margin-right: 10px;" @click="handleCopy" type="copy" /></div>
|
||||
<span> {{ bcFile.message }}</span>
|
||||
</div>
|
||||
<div ref="bcBox" class="bc-box" v-if="bcFile.data && bcFile.data.length > 0">
|
||||
<div class="bc-item" v-for="(item, index) in bcFile.data" :key="index">
|
||||
<span>{{ item.data }}</span>
|
||||
<span v-if="item.succeeded"> 成功</span>
|
||||
<span v-if="!item.succeeded"> 失败</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>{{ bcFile.message }}</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, defineEmits } from 'vue'
|
||||
const bcFileFlag = ref(false)
|
||||
const bcFile = ref({}) as any
|
||||
const bcBox = ref()
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
function init(res) {
|
||||
bcFileFlag.value = true
|
||||
bcFile.value = res
|
||||
}
|
||||
function handleCopy() {
|
||||
const text = bcBox.value.innerText
|
||||
var cInput = document.createElement('input');
|
||||
cInput.value = text;
|
||||
document.body.appendChild(cInput);
|
||||
cInput.select(); // 选取文本框内容
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(cInput);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.bcfile-title {
|
||||
border-bottom: 1px dashed black;
|
||||
padding-bottom: 5px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.bc-box {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
padding-right: 14px;
|
||||
|
||||
.bc-item {
|
||||
margin: 7px 0px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue