Browse Source

默认展开第一级

yangc 8 years ago
parent
commit
388d135091
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/store/CommodityList.vue

+ 1 - 1
components/store/CommodityList.vue

@@ -6,7 +6,7 @@
           <span style="line-height: 34px;">产品分类</span>
         </div>
         <div class="category-content">
-          <el-tree :data="kinds" :props="defaultProps" accordion :highlight-current="true" @current-change="handlerCurrentNode"></el-tree>
+          <el-tree :data="kinds" :props="defaultProps" :default-expanded-keys="[0]" node-key="level" accordion :highlight-current="true" @current-change="handlerCurrentNode"></el-tree>
         </div>
       </div>
       <!-- 产品列表 -->