修复:分享页面播放视频时没有关闭按钮的问题

This commit is contained in:
jmal 2021-01-02 16:23:08 +08:00
parent 80e6007b11
commit ee135d61fc
6 changed files with 33 additions and 33 deletions

View File

@ -2656,7 +2656,7 @@ export default {
isFolder: row.isFolder isFolder: row.isFolder
}).then(res => { }).then(res => {
if (res.data) { if (res.data) {
this.shareLink = 'http://' + window.location.host + '/s?s=' + res.data this.shareLink = window.location.origin + '/s?s=' + res.data
this.generateShareLinkLoading = false this.generateShareLinkLoading = false
} }
}) })

View File

@ -671,6 +671,7 @@
.files-title { .files-title {
margin-left: 3%; margin-left: 3%;
font-size: 20px; font-size: 20px;
line-height: 3.5rem;
} }
.operate { .operate {
flex: 1; flex: 1;

View File

@ -24,7 +24,7 @@
<div class="url-desc" v-if="uploadState > 0" slot="tip"> <div class="url-desc" v-if="uploadState > 0" slot="tip">
<span v-show="uploadState === 1">图片上传中{{uploadPercentage}}%</span> <span v-show="uploadState === 1">图片上传中{{uploadPercentage}}%</span>
<span v-show="uploadState === 2">图片上传成功</span> <span v-show="uploadState === 2">图片上传成功</span>
<span v-show="uploadState === 3">该图片不支持自动上传,请下载后手动上传</span> <span v-show="uploadState === 3">该图片不支持自动上传</span>
<span v-show="uploadState === 4">图片加载中</span> <span v-show="uploadState === 4">图片加载中</span>
<i :class="{ <i :class="{
'el-icon-loading': uploadState === 1 || uploadState === 4, 'el-icon-loading': uploadState === 1 || uploadState === 4,

View File

@ -2,9 +2,15 @@
<div class="preview" v-if="show"> <div class="preview" v-if="show">
<van-overlay :show="show"> <van-overlay :show="show">
<div class="wrapper"> <div class="wrapper">
<div class="block" @mousemove="onmousemove" @mouseout="onmouseout" @mouseenter="onmouseenter" @mouseleave="onmouseleave"> <div class="block"
<!-- <div role="button" @click="close" class="viewer-button viewer-close" data-viewer-action="mix"></div>--> @mousemove="onmousemove"
<div v-show="pc?closeBarShow:true" class="close-bar" @click="close"> @mouseout="onmouseout"
@mouseenter="onmouseenter"
@mouseleave="onmouseleave"
@touchstart="onmouseenter"
@touchend="onmousemove"
>
<div v-show="closeBarShow" class="close-bar" @click="close">
<svg-icon class="audio-player-close" icon-class="close"/> <svg-icon class="audio-player-close" icon-class="close"/>
</div> </div>
<video-player class="video-player vjs-custom-skin" <video-player class="video-player vjs-custom-skin"
@ -150,7 +156,9 @@ export default {
if(this.playing){ if(this.playing){
if(!this.$pc){ if(!this.$pc){
const closeBar = document.querySelector('.block .close-bar') const closeBar = document.querySelector('.block .close-bar')
closeBar.style.display = "none" if(closeBar){
closeBar.style.display = "none"
}
} }
this.closeBarShow = false this.closeBarShow = false
} }
@ -158,25 +166,16 @@ export default {
}, },
onmouseenter() { onmouseenter() {
this.closeBarShow = true this.closeBarShow = true
let player = document.querySelector('.video-player.video-player.vjs-custom-skin')
// console.log('player',player)
// if(!player) return;
// this.onhover(function() {
// console.log('124')
// }, player, 2000);
}, },
// onhover(fun, obj, time) { ontouchstart() {
// var s; console.log('ontouchstart', this.closeBarShow)
// obj.onmouseover = function() { this.closeBarShow = true
// console.log('onmouseover') },
// s = setTimeout(fun, 1000); ontouchsend() {
// }; console.log('ontouchsend', this.closeBarShow)
// obj.onmouseout = function() { this.closeBarShow = false
// console.log('onmouseout') this.clearTimeout()
// if(!s) return; }
// clearTimeout(s);
// };
// },
} }
} }
</script> </script>

View File

@ -132,11 +132,11 @@ export function formatSize(size) {
} else if (size < 1024) { } else if (size < 1024) {
return size + 'B' return size + 'B'
} else if (size < 1024 * 1024) { } else if (size < 1024 * 1024) {
return (size/1024).toFixed(2) + 'k' return (size/1024).toFixed(1) + 'k'
} else if (size < 1024 * 1024 * 1024) { } else if (size < 1024 * 1024 * 1024) {
return (size/(1024 * 1024)).toFixed(2) + 'M' return (size/(1024 * 1024)).toFixed(1) + 'M'
} else { } else {
return (size/(1024 * 1024 * 1024)).toFixed(2) + 'G' return (size/(1024 * 1024 * 1024)).toFixed(1) + 'G'
} }
} }
@ -146,14 +146,14 @@ export function formatSize(size) {
*/ */
export function formatNetSpeed(size) { export function formatNetSpeed(size) {
if (size === 0) { if (size === 0) {
return '0 B/s' return '0B/s'
} else if (size < 1024) { } else if (size < 1024) {
return size + ' B/s' return size + 'B/s'
} else if (size < 1024 * 1024) { } else if (size < 1024 * 1024) {
return (size/1024).toFixed(2) + ' KB/s' return (size/1024).toFixed(2) + 'KB/s'
} else if (size < 1024 * 1024 * 1024) { } else if (size < 1024 * 1024 * 1024) {
return (size/(1024 * 1024)).toFixed(2) + ' MB/s' return (size/(1024 * 1024)).toFixed(2) + 'MB/s'
} else { } else {
return (size/(1024 * 1024 * 1024)).toFixed(2) + ' GB/s' return (size/(1024 * 1024 * 1024)).toFixed(2) + 'GB/s'
} }
} }

View File

@ -474,7 +474,7 @@
fileClick(row) { fileClick(row) {
this.shareDialog = true this.shareDialog = true
this.shareFileName = row.fileName this.shareFileName = row.fileName
this.shareLink = 'http://'+window.location.host+'/s?s='+row.id this.shareLink = window.location.origin+'/s?s='+row.id
this.generateShareLinkLoading = false this.generateShareLinkLoading = false
}, },
// 复制分享链接 // 复制分享链接