Browse Source

商品分类

skyblued 3 years ago
parent
commit
831dece105
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/shop-mall/goods-list/index.tsx

+ 2 - 2
src/views/shop-mall/goods-list/index.tsx

@@ -200,9 +200,9 @@ export default defineComponent({
             </Col>
             </Col>
           </Row>
           </Row>
 
 
-          {this.productCategory.id ? (
+          {this.productCategory.id && this.productCategory.children && this.productCategory.children.length ? (
             <Tabs class={styles['filter-productCategory']} shrink ellipsis={false} v-model:active={this.productCategory.active} onChange={() => this.onToggleTag()}>
             <Tabs class={styles['filter-productCategory']} shrink ellipsis={false} v-model:active={this.productCategory.active} onChange={() => this.onToggleTag()}>
-              {this.productCategory &&
+              {this.productCategory && 
                 this.productCategory.children.map((n: any, i: number) => (
                 this.productCategory.children.map((n: any, i: number) => (
                   <Tab
                   <Tab
                     name={i}
                     name={i}