|
@@ -121,8 +121,10 @@
|
|
|
<span
|
|
|
:class="[
|
|
|
'coll-icon',
|
|
|
- item && !item.isColl ? 'disabled' : '',
|
|
|
- item && item.isColl && bgIndex == 1 ? 'coll-icon-yellow' : '',
|
|
|
+ !isCollArr[curSentIndex] ? 'disabled' : '',
|
|
|
+ isCollArr[curSentIndex] && bgIndex == 1
|
|
|
+ ? 'coll-icon-yellow'
|
|
|
+ : '',
|
|
|
]"
|
|
|
></span>
|
|
|
</div>
|
|
@@ -580,6 +582,7 @@ export default {
|
|
|
isBottomShow: false,
|
|
|
isRecording: false,
|
|
|
recordPlaying: false,
|
|
|
+ isCollArr: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -708,7 +711,8 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
LearnWebSI(MethodName, data).then((res) => {
|
|
|
- this.$set(this.item[this.curSentIndex], "isColl", true);
|
|
|
+ this.$set(this.isCollArr, this.curSentIndex, true);
|
|
|
+ console.log();
|
|
|
this.$message.success("收藏成功!");
|
|
|
});
|
|
|
},
|
|
@@ -802,17 +806,7 @@ export default {
|
|
|
},
|
|
|
getCurWordTime(curTime) {
|
|
|
let _this = this;
|
|
|
- // if (_this.isRepeat) {
|
|
|
- // let time = curTime * 1000;
|
|
|
- // if (time > _this.worded || time < _this.worded) {
|
|
|
- // _this.curWordTime = _this.worded;
|
|
|
- // _this.$refs.audioLineWord.onTimeupdateTime(_this.wordbg / 1000);
|
|
|
- // } else {
|
|
|
- // _this.curWordTime = curTime * 1000;
|
|
|
- // }
|
|
|
- // } else {
|
|
|
_this.curWordTime = curTime * 1000;
|
|
|
- // }
|
|
|
},
|
|
|
changeBg(bgIndex) {
|
|
|
this.bgIndex = bgIndex;
|
|
@@ -827,9 +821,8 @@ export default {
|
|
|
} else {
|
|
|
_this.item = item;
|
|
|
}
|
|
|
- _this.item = _this.item.map((sItem) => {
|
|
|
- sItem.isColl = false;
|
|
|
- return sItem;
|
|
|
+ _this.sentList.forEach((item) => {
|
|
|
+ this.isCollArr.push(false);
|
|
|
});
|
|
|
_this.bg = _this.curQue.wordTime[_this.curSentIndex].bg;
|
|
|
_this.ed = _this.curQue.wordTime[_this.curSentIndex].ed;
|