<template>
|
<BaseDialog
|
title="查看"
|
v-model="visible"
|
width="50%"
|
@close="visible = false"
|
@confirm="onConfirm"
|
>
|
<embed
|
type="application/pdf"
|
style="width: 100%; height: 750px"
|
:src="pdfSrc"
|
/>
|
</BaseDialog>
|
</template>
|
|
<script lang="ts" setup>
|
import { computed, onMounted, ref } from 'vue'
|
import BaseDialog from '@/components/BaseDialog/index.vue'
|
|
const props = defineProps<{
|
modelValue: boolean
|
pdfSrc: string
|
}>()
|
|
const emit = defineEmits(['update:modelValue'])
|
|
const pdfSrc = computed(() => {
|
return props.pdfSrc
|
})
|
|
const visible = computed({
|
get() {
|
return props.modelValue
|
},
|
set(v) {
|
emit('update:modelValue', v)
|
},
|
})
|
|
const onConfirm = () => {
|
visible.value = false
|
}
|
|
onMounted(async () => {})
|
</script>
|
|
<style lang="scss" scoped></style>
|