-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: user comments scroll to load data
- Loading branch information
1 parent
bb6c342
commit eec4a98
Showing
2 changed files
with
71 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<div> | ||
<video-player ref="videoPlayer" :options="videoOptions" @ended="videoEnded" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import 'video.js/dist/video-js.css'; // 引入样式 | ||
import VideoPlayer from 'vue-video-player'; | ||
export default { | ||
components: { | ||
VideoPlayer, | ||
}, | ||
data() { | ||
return { | ||
videoOptions: { | ||
autoplay: false, | ||
controls: true, | ||
sources: [ | ||
{ | ||
src: 'https://example.com/your-video.mp4', // 视频文件的 URL | ||
type: 'video/mp4', | ||
}, | ||
], | ||
}, | ||
}; | ||
}, | ||
methods: { | ||
videoEnded() { | ||
console.log('视频播放结束'); | ||
}, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters