mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 04:46:44 +08:00
ai视频一期功能提交
This commit is contained in:
@@ -41,6 +41,17 @@
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
export default {
|
||||
props: {
|
||||
// 视频链接对应的content Id
|
||||
blobId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isDrag:{
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
name: 'ai-script',
|
||||
data() {
|
||||
return {
|
||||
@@ -55,7 +66,8 @@ export default {
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'currentTime',
|
||||
'selectableLang'
|
||||
'selectableLang',
|
||||
'duration'
|
||||
]),
|
||||
},
|
||||
mounted: function() {
|
||||
@@ -162,6 +174,14 @@ export default {
|
||||
},
|
||||
// 跳转到指定时间点
|
||||
scrollToTime(time) {
|
||||
// console.log('scrollToTime', time , this.blobId, localStorage.getItem('videoProgressData'), this.duration)
|
||||
if(!this.isDrag && this.duration){
|
||||
var t = localStorage.getItem('videoProgressData')
|
||||
var arr = t&&JSON.parse(t) || {}
|
||||
if(arr[this.blobId] < time/this.duration || !arr[this.blobId]){
|
||||
return
|
||||
}
|
||||
}
|
||||
console.log('跳转到时间点:', time);
|
||||
this.$emit('changeCurrentTime', time);
|
||||
// 设置用户滚动状态,避免自动滚动干扰
|
||||
|
||||
Reference in New Issue
Block a user