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() {
|
||||
return this.goodDetail.productParams.filter(
|
||||
(item) =>
|
||||
item.waresItemsParamsList && item.waresItemsParamsList.length > 0
|
||||
item.waresItemsParamsList && item.waresItemsParamsList?.length > 0
|
||||
);
|
||||
},
|
||||
},
|
||||
|
@ -446,8 +446,8 @@ export default {
|
|||
if (ctem.value == this.specialArea) {
|
||||
this.labelName = ctem.label;
|
||||
}
|
||||
if (ctem.children.length > 0) {
|
||||
ctem.children.forEach((stem) => {
|
||||
if (ctem.children?.length > 0) {
|
||||
ctem.children?.forEach((stem) => {
|
||||
if (stem.value == this.specialArea) {
|
||||
this.labelName = stem.label;
|
||||
}
|
||||
|
|
|
@ -489,7 +489,7 @@ export default {
|
|||
this.specialArea0 = n.query.id;
|
||||
this.specialArea = n.query.idTh;
|
||||
// ||
|
||||
this.zoneList.forEach((item) => {
|
||||
this.zoneList?.forEach((item) => {
|
||||
if (item.value == this.specialArea0) {
|
||||
this.areaTwoList = item.children;
|
||||
}
|
||||
|
@ -828,11 +828,11 @@ export default {
|
|||
},
|
||||
goDetails(item) {
|
||||
let label;
|
||||
this.zoneList.forEach((stem) => {
|
||||
this.zoneList?.forEach((stem) => {
|
||||
if (stem.value == this.specialArea) {
|
||||
label = stem.label;
|
||||
} else {
|
||||
stem.children.forEach((ctem) => {
|
||||
stem.children?.forEach((ctem) => {
|
||||
if (ctem.value == this.specialArea) {
|
||||
label = ctem.label;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue