|
@@ -1,13 +1,13 @@
|
|
|
<template >
|
|
|
<div class="video-module">
|
|
|
- <div class="video-list">
|
|
|
+ <div class="video-list" @click.stop="handleSectionClick($event)">
|
|
|
<VueSeamlessScroll
|
|
|
:data="videoList"
|
|
|
:class-option="classOption"
|
|
|
class="warp"
|
|
|
>
|
|
|
<ul class="content-item">
|
|
|
- <li :class="item.name === activeName ? ['row', 'active'] : ['row']" v-for="item in videoList" @click="() => onVideoItemHandler(item)">{{item.name}}</li>
|
|
|
+ <li :class="['row']" :data-id="item.name" v-for="item in videoList">{{item.name}}</li>
|
|
|
</ul>
|
|
|
</VueSeamlessScroll>
|
|
|
</div>
|
|
@@ -56,8 +56,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- onVideoItemHandler(item) {
|
|
|
- this.activeName = item.name
|
|
|
+ handleSectionClick(e) {
|
|
|
+ // this.activeName = item.name
|
|
|
+ // console.log('')
|
|
|
+ let target = e.target;
|
|
|
+ if(target.nodeName == "LI") {
|
|
|
+ this.onVideoItemHandler(target.dataset.id);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onVideoItemHandler(name) {
|
|
|
+ this.activeName = name
|
|
|
console.log('onVideoItemHandler')
|
|
|
}
|
|
|
}
|