| | |
| | | PDFVIewer: typeof import('./src/components/PDFVIewer/index.vue')['default'] |
| | | RouterLink: typeof import('vue-router')['RouterLink'] |
| | | RouterView: typeof import('vue-router')['RouterView'] |
| | | VideoViewer: typeof import('./src/components/VideoViewer/index.vue')['default'] |
| | | } |
| | | export interface ComponentCustomProperties { |
| | | vLoading: typeof import('element-plus/es')['ElLoadingDirective'] |
New file |
| | |
| | | <template> |
| | | <div class="video-container"> |
| | | <div id="player"></div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from 'vue'; |
| | | import Player from 'xgplayer'; |
| | | |
| | | const props = defineProps({ |
| | | videoUrl: { |
| | | type: String, |
| | | required: true |
| | | } |
| | | }); |
| | | |
| | | const player = ref(null); |
| | | |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |
| | |
| | | import App from './App.vue'; |
| | | import ElementPlus from 'element-plus'; |
| | | import 'element-plus/dist/index.css'; |
| | | import 'xgplayer/dist/index.min.css'; // 引入西瓜视频样式 |
| | | import router from '@/router/index.js'; |
| | | import pinia from './store'; |
| | | import VueUeditorWrap from 'vue-ueditor-wrap'; |
| | |
| | | |
| | | <!-- pdf查看 --> |
| | | <div class="pdf-container" v-show="pdfViewer"> |
| | | <PDFViewer :pdfUrl="'/helloworld.pdf'"></PDFViewer> |
| | | <PDFViewer :pdfUrl="'/test.pdf'"></PDFViewer> |
| | | <div class="close-btn"> |
| | | <el-button type="danger" size="large" circle @click="closeViewer"> |
| | | <template #icon> |
| | |
| | | </div> |
| | | |
| | | <!-- 视频查看 --> |
| | | <div class="video-container"> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |