fix(goodsDetail): fix zoneList child not exists caused error
This commit is contained in:
parent
4011c7d5b2
commit
905f2ea14c
|
|
@ -429,7 +429,7 @@ export default {
|
||||||
filteredProductParams() {
|
filteredProductParams() {
|
||||||
return this.goodDetail.productParams.filter(
|
return this.goodDetail.productParams.filter(
|
||||||
(item) =>
|
(item) =>
|
||||||
item.waresItemsParamsList && item.waresItemsParamsList.length > 0
|
item.waresItemsParamsList && item.waresItemsParamsList?.length > 0
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -446,8 +446,8 @@ export default {
|
||||||
if (ctem.value == this.specialArea) {
|
if (ctem.value == this.specialArea) {
|
||||||
this.labelName = ctem.label;
|
this.labelName = ctem.label;
|
||||||
}
|
}
|
||||||
if (ctem.children.length > 0) {
|
if (ctem.children?.length > 0) {
|
||||||
ctem.children.forEach((stem) => {
|
ctem.children?.forEach((stem) => {
|
||||||
if (stem.value == this.specialArea) {
|
if (stem.value == this.specialArea) {
|
||||||
this.labelName = stem.label;
|
this.labelName = stem.label;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -489,7 +489,7 @@ export default {
|
||||||
this.specialArea0 = n.query.id;
|
this.specialArea0 = n.query.id;
|
||||||
this.specialArea = n.query.idTh;
|
this.specialArea = n.query.idTh;
|
||||||
// ||
|
// ||
|
||||||
this.zoneList.forEach((item) => {
|
this.zoneList?.forEach((item) => {
|
||||||
if (item.value == this.specialArea0) {
|
if (item.value == this.specialArea0) {
|
||||||
this.areaTwoList = item.children;
|
this.areaTwoList = item.children;
|
||||||
}
|
}
|
||||||
|
|
@ -828,11 +828,11 @@ export default {
|
||||||
},
|
},
|
||||||
goDetails(item) {
|
goDetails(item) {
|
||||||
let label;
|
let label;
|
||||||
this.zoneList.forEach((stem) => {
|
this.zoneList?.forEach((stem) => {
|
||||||
if (stem.value == this.specialArea) {
|
if (stem.value == this.specialArea) {
|
||||||
label = stem.label;
|
label = stem.label;
|
||||||
} else {
|
} else {
|
||||||
stem.children.forEach((ctem) => {
|
stem.children?.forEach((ctem) => {
|
||||||
if (ctem.value == this.specialArea) {
|
if (ctem.value == this.specialArea) {
|
||||||
label = ctem.label;
|
label = ctem.label;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue