|
@@ -1,15 +1,15 @@
|
|
|
<template>
|
|
|
<div class="word-card" v-loading="loading">
|
|
|
<div class="word-card-top">
|
|
|
- <span class="progress" v-if="wordList&&wordList.length>0">{{(activeObjIndex+1)+' / '+wordList.length}}</span>
|
|
|
+ <span class="progress" v-if="wordList&&wordList.length>0">{{(phraseActiveIndex+1)+' / '+wordList.length}}</span>
|
|
|
<template v-else>
|
|
|
<ul>
|
|
|
<li class="active">本文释义</li>
|
|
|
</ul>
|
|
|
</template>
|
|
|
<div class="btn-box">
|
|
|
- <svg-icon icon-class="arrow-left-line" :class="[activeObjIndex===0?'not-allow':'']" v-if="wordList&&wordList.length>0" @click="changeIndex('-')"></svg-icon>
|
|
|
- <svg-icon icon-class="arrow-right-line" :class="[activeObjIndex===wordList.length-1?'not-allow':'']" v-if="wordList&&wordList.length>0" @click="changeIndex('+')"></svg-icon>
|
|
|
+ <svg-icon icon-class="arrow-left-line" :class="[phraseActiveIndex===0?'not-allow':'']" v-if="wordList&&wordList.length>0" @click="changeIndex('-')"></svg-icon>
|
|
|
+ <svg-icon icon-class="arrow-right-line" :class="[phraseActiveIndex===wordList.length-1?'not-allow':'']" v-if="wordList&&wordList.length>0" @click="changeIndex('+')"></svg-icon>
|
|
|
<svg-icon icon-class="like-line" className="icon-like" v-if="!data.collect" @click="handleCollect(data)"></svg-icon>
|
|
|
<svg-icon icon-class="like" className="icon-like active" v-else @click="handleCollect(data)"></svg-icon>
|
|
|
<i class="el-icon-close" @click="closeWord"></i>
|
|
@@ -246,14 +246,14 @@ export default {
|
|
|
if(type==='-'){
|
|
|
if(this.phraseActiveIndex>0){
|
|
|
this.phraseActiveIndex--
|
|
|
-
|
|
|
+ this.data = this.wordList[this.phraseActiveIndex]
|
|
|
}else{
|
|
|
return
|
|
|
}
|
|
|
}else{
|
|
|
if(this.phraseActiveIndex<this.wordList.length-1){
|
|
|
this.phraseActiveIndex++
|
|
|
- this.mageazineDetailIndex = null
|
|
|
+ this.data = this.wordList[this.phraseActiveIndex]
|
|
|
}else{
|
|
|
return
|
|
|
}
|