提交 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">
import PreviewFiles from '@/components/base/PreviewFiles.vue'
const props = defineProps({
data: {
type: Object,
......@@ -9,11 +10,8 @@ const props = defineProps({
<template>
<div class="center-video-box">
<div class="file-box">
<embed width="812" height="433" :src="props.data?.url" />
<PreviewFiles :url="props.data?.url"></PreviewFiles>
</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="stat-item">
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/view-vicon1.png" />
......
......@@ -106,6 +106,7 @@ const listOptions = $computed(() => {
background: #fafafa;
padding: 20px;
display: flex;
flex-wrap: wrap;
}
.video-head {
position: relative;
......
......@@ -123,7 +123,7 @@ const protocol = ref(false)
<div>
<div class="upload-video">
<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>
</div>
......
<script setup lang="ts">
import PreviewFiles from '@/components/base/PreviewFiles.vue'
const props = defineProps({
data: {
type: Object,
......@@ -9,11 +10,8 @@ const props = defineProps({
<template>
<div class="center-video-box">
<div class="file-box">
<embed width="812" height="433" :src="props.data?.url" />
<PreviewFiles :url="props.data?.url"></PreviewFiles>
</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="stat-item">
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/view-vicon1.png" />
......
......@@ -105,6 +105,7 @@ const listOptions = $computed(() => {
background: #fafafa;
padding: 20px;
display: flex;
flex-wrap: wrap;
}
.video-head {
position: relative;
......
......@@ -123,7 +123,7 @@ const protocol = ref(false)
<div>
<div class="upload-video">
<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>
</div>
......
<script setup lang="ts">
import PreviewFiles from '@/components/base/PreviewFiles.vue'
const props = defineProps({
data: {
type: Object,
......@@ -9,11 +10,8 @@ const props = defineProps({
<template>
<div class="center-video-box">
<div class="file-box">
<embed width="812" height="433" :src="props.data?.url" />
<PreviewFiles :url="props.data?.url"></PreviewFiles>
</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="stat-item">
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/view-vicon1.png" />
......
......@@ -114,6 +114,7 @@ const listOptions = $computed(() => {
background: #fafafa;
padding: 20px;
display: flex;
flex-wrap: wrap;
}
.video-head {
position: relative;
......
......@@ -117,6 +117,7 @@ const listOptions = $computed(() => {
background: #fafafa;
padding: 20px;
display: flex;
flex-wrap: wrap;
}
.video-head {
position: relative;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论