提交 38bb54e2 authored 作者: lihuihui's avatar lihuihui

update

上级 13f0158a
<script setup lang="ts">
const props = defineProps({
url: {
type: String,
require: true
}
})
// 判断展示标签
let isIframeShow = ref(true)
// 不可用iframe展示的文件
const filesType = ['.pdf', '.txt']
filesType.forEach((item: string) => {
if (props.url?.indexOf(item) != -1) {
isIframeShow.value = false
}
})
</script>
<template>
<iframe
v-if="isIframeShow"
width="812"
height="433"
:src="`https://view.officeapps.live.com/op/view.aspx?src=${props.url}`"
></iframe>
<embed width="812" height="433" :src="props.url" v-else />
</template>
<style lang="scss" scoped>
</style>
<script setup lang="ts"> <script setup lang="ts">
import PreviewFiles from '@/components/base/PreviewFiles.vue'
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
...@@ -9,11 +10,8 @@ const props = defineProps({ ...@@ -9,11 +10,8 @@ const props = defineProps({
<template> <template>
<div class="center-video-box"> <div class="center-video-box">
<div class="file-box"> <div class="file-box">
<embed width="812" height="433" :src="props.data?.url" /> <PreviewFiles :url="props.data?.url"></PreviewFiles>
</div> </div>
<!-- <video width="812" height="433" controls>
<source src="https://video.shipin520.com/videos/17/36/71/b_KSyZ5ujXfz7R1567173671.mp4" type="video/mp4">
</video> -->
<div class="right-statistics"> <div class="right-statistics">
<div class="stat-item"> <div class="stat-item">
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/view-vicon1.png" /> <img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/view-vicon1.png" />
......
...@@ -106,6 +106,7 @@ const listOptions = $computed(() => { ...@@ -106,6 +106,7 @@ const listOptions = $computed(() => {
background: #fafafa; background: #fafafa;
padding: 20px; padding: 20px;
display: flex; display: flex;
flex-wrap: wrap;
} }
.video-head { .video-head {
position: relative; position: relative;
......
...@@ -123,7 +123,7 @@ const protocol = ref(false) ...@@ -123,7 +123,7 @@ const protocol = ref(false)
<div> <div>
<div class="upload-video"> <div class="upload-video">
<div class="upload-box"> <div class="upload-box">
<AppUpload :limit="1" v-model="form.file"></AppUpload> <AppUpload accept=".doc,.docx,.xls,.xlsx,.pdf,.ppt,.pptx" :limit="1" v-model="form.file"></AppUpload>
<div class="upload-btn">本地文件</div> <div class="upload-btn">本地文件</div>
</div> </div>
</div> </div>
......
<script setup lang="ts"> <script setup lang="ts">
import PreviewFiles from '@/components/base/PreviewFiles.vue'
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
...@@ -9,11 +10,8 @@ const props = defineProps({ ...@@ -9,11 +10,8 @@ const props = defineProps({
<template> <template>
<div class="center-video-box"> <div class="center-video-box">
<div class="file-box"> <div class="file-box">
<embed width="812" height="433" :src="props.data?.url" /> <PreviewFiles :url="props.data?.url"></PreviewFiles>
</div> </div>
<!-- <video width="812" height="433" controls>
<source src="https://video.shipin520.com/videos/17/36/71/b_KSyZ5ujXfz7R1567173671.mp4" type="video/mp4">
</video> -->
<div class="right-statistics"> <div class="right-statistics">
<div class="stat-item"> <div class="stat-item">
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/view-vicon1.png" /> <img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/view-vicon1.png" />
......
...@@ -105,6 +105,7 @@ const listOptions = $computed(() => { ...@@ -105,6 +105,7 @@ const listOptions = $computed(() => {
background: #fafafa; background: #fafafa;
padding: 20px; padding: 20px;
display: flex; display: flex;
flex-wrap: wrap;
} }
.video-head { .video-head {
position: relative; position: relative;
......
...@@ -123,7 +123,7 @@ const protocol = ref(false) ...@@ -123,7 +123,7 @@ const protocol = ref(false)
<div> <div>
<div class="upload-video"> <div class="upload-video">
<div class="upload-box"> <div class="upload-box">
<AppUpload :limit="1" v-model="form.file"></AppUpload> <AppUpload accept=".doc,.docx,.pdf,.ppt,.pptx" :limit="1" v-model="form.file"></AppUpload>
<div class="upload-btn">本地文件</div> <div class="upload-btn">本地文件</div>
</div> </div>
</div> </div>
......
<script setup lang="ts"> <script setup lang="ts">
import PreviewFiles from '@/components/base/PreviewFiles.vue'
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
...@@ -9,11 +10,8 @@ const props = defineProps({ ...@@ -9,11 +10,8 @@ const props = defineProps({
<template> <template>
<div class="center-video-box"> <div class="center-video-box">
<div class="file-box"> <div class="file-box">
<embed width="812" height="433" :src="props.data?.url" /> <PreviewFiles :url="props.data?.url"></PreviewFiles>
</div> </div>
<!-- <video width="812" height="433" controls>
<source src="https://video.shipin520.com/videos/17/36/71/b_KSyZ5ujXfz7R1567173671.mp4" type="video/mp4">
</video> -->
<div class="right-statistics"> <div class="right-statistics">
<div class="stat-item"> <div class="stat-item">
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/view-vicon1.png" /> <img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/view-vicon1.png" />
......
...@@ -114,6 +114,7 @@ const listOptions = $computed(() => { ...@@ -114,6 +114,7 @@ const listOptions = $computed(() => {
background: #fafafa; background: #fafafa;
padding: 20px; padding: 20px;
display: flex; display: flex;
flex-wrap: wrap;
} }
.video-head { .video-head {
position: relative; position: relative;
......
...@@ -117,6 +117,7 @@ const listOptions = $computed(() => { ...@@ -117,6 +117,7 @@ const listOptions = $computed(() => {
background: #fafafa; background: #fafafa;
padding: 20px; padding: 20px;
display: flex; display: flex;
flex-wrap: wrap;
} }
.video-head { .video-head {
position: relative; position: relative;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论