liudong
2024-08-26 c42ee03103d3e9baad20d64d04e421b44cb92e43
src/views/dmx/knowledgeLib/components/txtPdf.vue
@@ -1,39 +1,31 @@
<template>
  <iframe
    :src="previewSrc"
  ></iframe>
  <iframe :src="previewSrc"></iframe>
</template>
<script setup>
//   获取父组件传递的资源url
const props = defineProps({
  previewSrc: {
    type: String,
    required: false,
    default: () => ''
  }
});
//引入VueOfficeExcel组件相关
import VueOfficeExcel from '@vue-office/excel'
import '@vue-office/excel/lib/index.css'
// const props = defineProps({
//   previewSrc: {
//     type: String,
//     required: false,
//     default: () => '',
//   },
// });
// //引入VueOfficeExcel组件相关
// import VueOfficeExcel from '@vue-office/excel';
// import '@vue-office/excel/lib/index.css';
const comStyle = {
  width: '100%',
  height: '100%'
}
// const comStyle = {
//   width: '100%',
//   height: '100%',
// };
const renderedHandler = () => {
  console.log('rendered');
};
const errorHandler = (err) => {
  console.log('error', err);
};
// const renderedHandler = () => {
//   console.log('rendered');
// };
// const errorHandler = (err) => {
//   console.log('error', err);
// };
</script>
<style scoped lang="less">
@@ -42,4 +34,4 @@
  top: 0;
  left: 0;
}
</style>
</style>