|
@@ -550,6 +550,12 @@ export default {
|
|
|
_this.refresh = false;
|
|
|
if (val) {
|
|
|
_this.initContextData();
|
|
|
+ if (_this.FatherTreeData) {
|
|
|
+ _this.idArr = [];
|
|
|
+ _this.FatherTreeData.forEach((item, itemIndex) => {
|
|
|
+ this.seekCurrentTree(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
_this.handleTitleData();
|
|
|
_this.$nextTick(() => {
|
|
|
// 重新渲染组件
|
|
@@ -562,8 +568,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
- created() {
|
|
|
- },
|
|
|
+ created() {},
|
|
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
const _this = this;
|
|
@@ -571,6 +576,12 @@ export default {
|
|
|
_this.initContextData();
|
|
|
_this.handleTitleData();
|
|
|
}
|
|
|
+ if (_this.FatherTreeData) {
|
|
|
+ _this.idArr = [];
|
|
|
+ _this.FatherTreeData.forEach((item, itemIndex) => {
|
|
|
+ this.seekCurrentTree(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
beforeCreate() {}, // 生命周期 - 创建之前
|
|
|
beforeMount() {}, // 生命周期 - 挂载之前
|
|
@@ -587,16 +598,16 @@ export default {
|
|
|
let curQue = JSON.parse(JSON.stringify(this.cur));
|
|
|
curQue.detailList.forEach((dItem, dIndex) => {
|
|
|
let paraArr = [];
|
|
|
- if(dItem.detail){
|
|
|
- dItem.detail.wordsList.forEach((sItem, sIndex) => {
|
|
|
+ if (dItem.detail) {
|
|
|
+ dItem.detail.wordsList.forEach((sItem, sIndex) => {
|
|
|
let obj = {
|
|
|
- pinyin: sItem.pinyin,
|
|
|
- chs: sItem.chs,
|
|
|
- isShow: true,
|
|
|
+ pinyin: sItem.pinyin,
|
|
|
+ chs: sItem.chs,
|
|
|
+ isShow: true,
|
|
|
};
|
|
|
- paraArr.push(obj);
|
|
|
- });
|
|
|
- this.$set(_this.cur.detailList[dIndex].detail, "resArr", paraArr);
|
|
|
+ paraArr.push(obj);
|
|
|
+ });
|
|
|
+ this.$set(_this.cur.detailList[dIndex].detail, "resArr", paraArr);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -653,9 +664,6 @@ export default {
|
|
|
handleNNPEprev() {
|
|
|
let _this = this;
|
|
|
if (_this.queIndex == 0) {
|
|
|
- _this.FatherTreeData.forEach((item, itemIndex) => {
|
|
|
- this.seekCurrentTree(item);
|
|
|
- });
|
|
|
this.idArr.forEach((item, i) => {
|
|
|
if (item == _this.currentTreeID) {
|
|
|
if (i == 0) {
|
|
@@ -694,9 +702,6 @@ export default {
|
|
|
handleNNPEnext() {
|
|
|
const _this = this;
|
|
|
if (_this.queIndex == _this.queTotal - 1) {
|
|
|
- _this.FatherTreeData.forEach((item, itemIndex) => {
|
|
|
- this.seekCurrentTree(item);
|
|
|
- });
|
|
|
this.idArr.forEach((item, i) => {
|
|
|
if (item == _this.currentTreeID) {
|
|
|
if (i == this.idArr.length - 1) {
|