Commit 2794eb73 by 李伟康

提交代码

1 parent 313d8481
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
highlight-color="#FC5B32" highlight-color="#FC5B32"
class="list" class="list"
:index-list="indexList" :index-list="indexList"
:key="updata"
> >
<template v-for="(item,index) in list"> <template v-for="(item,index) in list">
<div <div
...@@ -11,6 +12,7 @@ ...@@ -11,6 +12,7 @@
:key="index" :key="index"
> >
<van-index-anchor :index="item.name" /> <van-index-anchor :index="item.name" />
<template v-if="item.done">
<template v-if="item.childs && item.childs.length"> <template v-if="item.childs && item.childs.length">
<template v-for="(i,ind) in item.childs"> <template v-for="(i,ind) in item.childs">
<div <div
...@@ -22,7 +24,18 @@ ...@@ -22,7 +24,18 @@
</div> </div>
</template> </template>
</template> </template>
<!-- <template v-else> <template v-else>
<div class="loading text-center">
<van-icon
name="fail"
color="#282829"
size="80"
/>
<div>暂无该车型</div>
</div>
</template>
</template>
<template v-else>
<div class="loading text-center"> <div class="loading text-center">
<van-loading <van-loading
color="#282829" color="#282829"
...@@ -31,7 +44,7 @@ ...@@ -31,7 +44,7 @@
vertical vertical
>加载中...</van-loading> >加载中...</van-loading>
</div> </div>
</template> --> </template>
</div> </div>
</template> </template>
...@@ -65,7 +78,8 @@ export default { ...@@ -65,7 +78,8 @@ export default {
indexList: [], indexList: [],
showType: false, showType: false,
carTypeList: [], carTypeList: [],
brandInfo: null brandInfo: null,
updata:Date.now()
} }
}, },
activated () { activated () {
...@@ -93,7 +107,10 @@ export default { ...@@ -93,7 +107,10 @@ export default {
brandId, brandId,
childBrandId: e.id childBrandId: e.id
}).then(data => { }).then(data => {
if (!data) data = []
this.list[index].done = true
this.list[index].childs = data this.list[index].childs = data
this.updata = Date.now()
}) })
}, },
showCarType (i, item) { showCarType (i, item) {
...@@ -148,6 +165,7 @@ export default { ...@@ -148,6 +165,7 @@ export default {
.loading { .loading {
aspect-ratio: 1/1; aspect-ratio: 1/1;
color: #282829; color: #282829;
flex-direction: column;
} }
.card { .card {
height: 56px; height: 56px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!