Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
bbc2ee1365
13
package.json
13
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jmal-cloud-view",
|
"name": "jmal-cloud-view",
|
||||||
"version": "2.1.9",
|
"version": "2.2.32",
|
||||||
"description": "jmalcloud",
|
"description": "jmalcloud",
|
||||||
"author": "Jmal <zhushilun084@163.com>",
|
"author": "Jmal <zhushilun084@163.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -15,6 +15,7 @@
|
|||||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
|
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@moefe/vue-aplayer": "^2.0.0-beta.5",
|
||||||
"ant-design-vue": "^1.6.5",
|
"ant-design-vue": "^1.6.5",
|
||||||
"clipboard": "^2.0.6",
|
"clipboard": "^2.0.6",
|
||||||
"cropperjs": "^1.5.6",
|
"cropperjs": "^1.5.6",
|
||||||
@ -48,7 +49,6 @@
|
|||||||
"vue-aplayer": "^1.6.1",
|
"vue-aplayer": "^1.6.1",
|
||||||
"vue-runtime-helpers": "^1.1.2",
|
"vue-runtime-helpers": "^1.1.2",
|
||||||
"vue-simple-uploader": "^0.7.4",
|
"vue-simple-uploader": "^0.7.4",
|
||||||
"vue-template-compiler": "^2.6.12",
|
|
||||||
"vue-video-player": "^5.0.2",
|
"vue-video-player": "^5.0.2",
|
||||||
"vue-wechat-title": "^2.0.5",
|
"vue-wechat-title": "^2.0.5",
|
||||||
"vuedraggable": "^2.23.2",
|
"vuedraggable": "^2.23.2",
|
||||||
@ -59,13 +59,13 @@
|
|||||||
"@babel/register": "7.0.0",
|
"@babel/register": "7.0.0",
|
||||||
"@vue/cli-plugin-babel": "3.6.0",
|
"@vue/cli-plugin-babel": "3.6.0",
|
||||||
"@vue/cli-plugin-eslint": "^3.9.1",
|
"@vue/cli-plugin-eslint": "^3.9.1",
|
||||||
"@vue/cli-plugin-unit-jest": "^4.5.12",
|
"@vue/cli-plugin-unit-jest": "3.6.3",
|
||||||
"@vue/cli-service": "^4.5.12",
|
"@vue/cli-service": "3.6.0",
|
||||||
"@vue/test-utils": "1.0.0-beta.29",
|
"@vue/test-utils": "1.0.0-beta.29",
|
||||||
"autoprefixer": "^9.5.1",
|
"autoprefixer": "^9.5.1",
|
||||||
"babel-core": "7.0.0-bridge.0",
|
"babel-core": "7.0.0-bridge.0",
|
||||||
"babel-eslint": "10.0.1",
|
"babel-eslint": "10.0.1",
|
||||||
"babel-jest": "^26.6.3",
|
"babel-jest": "23.6.0",
|
||||||
"babel-plugin-import": "^1.13.0",
|
"babel-plugin-import": "^1.13.0",
|
||||||
"chalk": "2.4.2",
|
"chalk": "2.4.2",
|
||||||
"connect": "3.6.6",
|
"connect": "3.6.6",
|
||||||
@ -79,7 +79,8 @@
|
|||||||
"script-loader": "0.7.2",
|
"script-loader": "0.7.2",
|
||||||
"serve-static": "^1.13.2",
|
"serve-static": "^1.13.2",
|
||||||
"svg-sprite-loader": "4.1.3",
|
"svg-sprite-loader": "4.1.3",
|
||||||
"svgo": "1.2.2"
|
"svgo": "1.2.2",
|
||||||
|
"vue-template-compiler": "2.6.10"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.9",
|
"node": ">=8.9",
|
||||||
|
|||||||
@ -18,20 +18,20 @@
|
|||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.12/lib/index.css"/>
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.12/lib/index.css"/>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vant@2.12/lib/vant.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/vant@2.12/lib/vant.js"></script>
|
||||||
<!--element-ui.js-->
|
<!--element-ui.js-->
|
||||||
<link rel="stylesheet" href="https://unpkg.com/element-ui@2.15.1/lib/theme-chalk/index.css">
|
<link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
|
||||||
<script src="https://unpkg.com/element-ui@2.15.1/lib/index.js"></script>
|
<script src="https://unpkg.com/element-ui@2.13.0/lib/index.js"></script>
|
||||||
<!--pl-table.js-->
|
<!--pl-table.js-->
|
||||||
<link rel="stylesheet" href="https://unpkg.com/pl-table@2.7.5/themes/index.css">
|
<link rel="stylesheet" href="https://unpkg.com/pl-table@2.7.5/themes/index.css">
|
||||||
<script src="https://unpkg.com/pl-table@2.7.5/lib/index.js"></script>
|
<script src="https://unpkg.com/pl-table@2.7.5/lib/index.js"></script>
|
||||||
<!--viewer css-->
|
<!--viewer css-->
|
||||||
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/viewerjs/1.7.1/viewer.min.css">
|
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/viewerjs/1.7.1/viewer.min.css">
|
||||||
<!--vue-aplayer-->
|
<!--vue-aplayer-theme-->
|
||||||
<script src="//cdn.jsdelivr.net/npm/vue-aplayer"></script>
|
<script src="https://cdn.jsdelivr.net/npm/colorthief@2.0.2/src/color-thief.js"></script>
|
||||||
|
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
<title><%= webpackConfig.name %></title>
|
<title><%= webpackConfig.name %></title>
|
||||||
<link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/5.13.0/css/all.min.css">
|
<link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/5.13.0/css/all.min.css">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/colorthief@2.0.2/src/color-thief.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
|||||||
@ -1374,7 +1374,6 @@ export default {
|
|||||||
}
|
}
|
||||||
// 开始拖拽
|
// 开始拖拽
|
||||||
container.ondragstart = (e) => {
|
container.ondragstart = (e) => {
|
||||||
e.target.style.cursor = 'no-drop'
|
|
||||||
// 正在选区获取按住关键键时禁止拖拽
|
// 正在选区获取按住关键键时禁止拖拽
|
||||||
if (_this.drawFlag || _this.isCmd || _this.selectPin) {
|
if (_this.drawFlag || _this.isCmd || _this.selectPin) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@ -1387,8 +1386,11 @@ export default {
|
|||||||
}
|
}
|
||||||
// 该文件正在重命名
|
// 该文件正在重命名
|
||||||
if (e.target.rowIndex === _this.editingIndex){
|
if (e.target.rowIndex === _this.editingIndex){
|
||||||
|
e.preventDefault()
|
||||||
|
e.stopPropagation()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
e.target.style.cursor = 'no-drop'
|
||||||
// 当滚动条滚动后禁止拖拽
|
// 当滚动条滚动后禁止拖拽
|
||||||
if (_this.fileListScrollTop === 0) {
|
if (_this.fileListScrollTop === 0) {
|
||||||
// 复制被拖拽dom的title, 拖拽过程中移除, 拖拽完后还原
|
// 复制被拖拽dom的title, 拖拽过程中移除, 拖拽完后还原
|
||||||
|
|||||||
@ -1,19 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="audioPreview" v-if="show">
|
<div ref="audioPreview" v-if="show">
|
||||||
<div class="audio-player"
|
<div class="audio-player"
|
||||||
v-aplayerDrag="{ x: transformX, y: transformY }"
|
v-aplayerDrag="{ x: transformX, y: transformY }"
|
||||||
@mouseenter="closeBarShow = true" @mouseleave="closeBarShow = false" @touchmove="closeBarShow = true" @touchend="touchend">
|
@mouseenter="closeBarShow = true" @mouseleave="closeBarShow = false" @touchmove="closeBarShow = true" @touchend="touchend">
|
||||||
<aplayer
|
<a-player
|
||||||
ref="audioPlayer"
|
ref="audioPlayer"
|
||||||
autoplay
|
autoplay
|
||||||
listFolded
|
listFolded
|
||||||
loop.sync="all"
|
loop.sync="all"
|
||||||
order.sync="list"
|
order.sync="list"
|
||||||
:mini.sync="mini"
|
:mini.sync="mini"
|
||||||
:music.sync="music"
|
:audio="list"
|
||||||
:list="list"
|
:lrc-type="0"
|
||||||
:lrc-type="0">
|
>
|
||||||
</aplayer>
|
</a-player>
|
||||||
<div v-show="closeBarShow" class="close-bar" @click="close">
|
<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>
|
||||||
@ -36,19 +36,12 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pc: this.$pc,
|
pc: this.$pc,
|
||||||
transformX: !this.$pc ? 20: (document.body.clientWidth-500)/2,
|
transformX: !this.$pc ? document.body.clientWidth - 100: (document.body.clientWidth-500)/2,
|
||||||
transformY: 0,
|
transformY: !this.$pc ? document.body.clientHeight/2 - 100 : 0,
|
||||||
show: false,
|
show: false,
|
||||||
closeBarShow: false,
|
closeBarShow: false,
|
||||||
music: {
|
// api ==> https://aplayer.netlify.app/docs/guide/options.html#volume
|
||||||
id: '',
|
audios: [],
|
||||||
src: '', // 音频文件的 URL
|
|
||||||
title: '', // 歌曲名称
|
|
||||||
artist: '', // 演唱者
|
|
||||||
pic: '', // 封面图片 URL
|
|
||||||
lrc: '', // LRC 歌词或者歌词文件的 URL
|
|
||||||
theme: '', // 歌曲的主题色,会覆盖播放器的主题色
|
|
||||||
},
|
|
||||||
list: [],
|
list: [],
|
||||||
mini: !this.$pc,
|
mini: !this.$pc,
|
||||||
audioPlayerDoc: undefined
|
audioPlayerDoc: undefined
|
||||||
@ -65,31 +58,40 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
Bus.$on('onAddAudio',(newFile, audioCoverUrl) => {
|
Bus.$on('onAddAudio',(newFile, audioCoverUrl) => {
|
||||||
this.show = true
|
if (!this.show) {
|
||||||
|
this.show = true
|
||||||
|
}
|
||||||
let url = fileConfig.previewUrl(this.$store.state.user.name, newFile, this.$store.getters.token)
|
let url = fileConfig.previewUrl(this.$store.state.user.name, newFile, this.$store.getters.token)
|
||||||
if(!this.$store.state.user.token){
|
if(!this.$store.state.user.token){
|
||||||
url = fileConfig.publicPreviewUrl(newFile.id, window.shareId);
|
url = fileConfig.publicPreviewUrl(newFile.id, window.shareId);
|
||||||
}
|
}
|
||||||
let music = newFile.music
|
let music = newFile.music
|
||||||
let fileName = newFile.name.substring(0,newFile.name.length - newFile.suffix.length-1)
|
let fileName = newFile.name.substring(0,newFile.name.length - newFile.suffix.length-1)
|
||||||
this.music = {
|
let musicOperation = {
|
||||||
id: newFile.id,
|
id: newFile.id,
|
||||||
src: url,
|
url: url,
|
||||||
title: music.songName ? music.songName : fileName,
|
name: music.songName ? music.songName : fileName,
|
||||||
artist: music.songName ? music.singer : fileName,
|
artist: music.songName ? music.singer : fileName,
|
||||||
pic: music.songName ? audioCoverUrl+newFile.id :'',
|
cover: music.songName ? audioCoverUrl+newFile.id :'',
|
||||||
lrc: '',
|
type: newFile.contentType
|
||||||
theme: 'pic'
|
|
||||||
}
|
}
|
||||||
let musicIndex = this.list.findIndex(item => item.id === newFile.id)
|
let musicIndex = this.audios.findIndex(item => item.id === newFile.id)
|
||||||
if(musicIndex < 0){
|
if(musicIndex < 0){
|
||||||
this.list.push(this.music)
|
if(this.audios.length === 1){
|
||||||
this.$nextTick(()=>{
|
let loop = document.querySelector('.aplayer-icon.aplayer-icon-loop');
|
||||||
this.$refs.audioPlayer.play()
|
loop.style.display = 'inline'
|
||||||
})
|
let order = document.querySelector('.aplayer-icon.aplayer-icon-order');
|
||||||
|
order.style.display = 'inline'
|
||||||
|
}
|
||||||
|
this.audios.push(musicOperation)
|
||||||
|
setTimeout(() => {
|
||||||
|
this.list = this.audios
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.audioPlayer.switch(this.audios.length - 1)
|
||||||
|
}, 0)
|
||||||
|
}, 0)
|
||||||
} else {
|
} else {
|
||||||
let listMusic = this.audioPlayerDoc.querySelectorAll('.aplayer-list ol li')[musicIndex]
|
this.$refs.audioPlayer.switch(musicIndex)
|
||||||
listMusic.click()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -98,7 +100,7 @@ export default {
|
|||||||
this.show = false
|
this.show = false
|
||||||
this.audioPlayerDoc = undefined
|
this.audioPlayerDoc = undefined
|
||||||
this.$refs.audioPlayer.pause()
|
this.$refs.audioPlayer.pause()
|
||||||
this.list.splice(0, this.list.length)
|
this.audios.splice(0, this.audios.length)
|
||||||
},
|
},
|
||||||
touchend() {
|
touchend() {
|
||||||
const that = this
|
const that = this
|
||||||
|
|||||||
@ -37,10 +37,11 @@ Vue.use(EVueContextmenu)
|
|||||||
|
|
||||||
Vue.use(vant.ImagePreview)
|
Vue.use(vant.ImagePreview)
|
||||||
|
|
||||||
Vue.component('Aplayer', VueAPlayer)
|
import APlayer from '@moefe/vue-aplayer';
|
||||||
VueAPlayer.disableVersionBadge = true
|
Vue.use(APlayer, {
|
||||||
|
defaultCover: 'https://images.unsplash.com/photo-1511671782779-c97d3d27a1d4?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=200&q=60',
|
||||||
Vue.config.productionTip = false
|
productionTip: false, // 是否在控制台输出版本信息
|
||||||
|
});
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
>>>.svg-icon {
|
>>>.svg-icon {
|
||||||
margin-top: 0.05em;
|
margin-top: 0.05em;
|
||||||
// vertical-align: unset;
|
// vertical-align: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +70,6 @@
|
|||||||
.newFileMenu li > .menuitem > .text {
|
.newFileMenu li > .menuitem > .text {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
margin-left: 15px;
|
|
||||||
}
|
}
|
||||||
.newFileMenu li > .menuitem > .svg-icon {
|
.newFileMenu li > .menuitem > .svg-icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -294,6 +293,7 @@
|
|||||||
color: #606266;
|
color: #606266;
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
width: -webkit-fill-available;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -336,7 +336,7 @@
|
|||||||
.grid-item-icon-image {
|
.grid-item-icon-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
top: 0;
|
top: 0px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
-webkit-backdrop-filter: contrast(0.5);
|
-webkit-backdrop-filter: contrast(0.5);
|
||||||
@ -346,21 +346,21 @@
|
|||||||
/deep/ .grid-time:hover {
|
/deep/ .grid-time:hover {
|
||||||
background-color: #e0f3fc;
|
background-color: #e0f3fc;
|
||||||
}
|
}
|
||||||
.checkbox-group-header {
|
.checkbox-group-header {
|
||||||
margin: 10px 0 0;
|
margin: 10px 0 0;
|
||||||
.grid-all-checkbox {
|
.grid-all-checkbox {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
margin-left: 25px;
|
margin-left: 25px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
.el-divider--horizontal {
|
.el-divider--horizontal {
|
||||||
display: block;
|
display: block;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/deep/ .grid-divider {
|
/deep/ .grid-divider {
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user