Commit 0783badc by 李伟康

增加无数据样式

1 parent 6907279e
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<div class="data-view"> <div class="data-view">
<div class="title">旅程看板</div> <div class="title">旅程看板</div>
<div class="carousel-box"> <div class="carousel-box">
<template v-if="viewList.length">
<el-carousel <el-carousel
ref="carousel" ref="carousel"
:autoplay="false" :autoplay="false"
...@@ -93,12 +94,20 @@ ...@@ -93,12 +94,20 @@
> >
<img :src="viewIndex < viewList.length - 1 ? rightActiveIcon : rightIcon" /> <img :src="viewIndex < viewList.length - 1 ? rightActiveIcon : rightIcon" />
</div> </div>
</template>
<template v-else>
<div class="nothing">
<img :src="nothing">
暂无数据
</div>
</template>
</div> </div>
</div> </div>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import nothing from '@/assets/icon/data-view-nothing.png'
export default { export default {
name: '', name: '',
props: { props: {
...@@ -120,7 +129,8 @@ export default { ...@@ -120,7 +129,8 @@ export default {
leftActiveIcon: require('@/assets/icon/left-active.png'), leftActiveIcon: require('@/assets/icon/left-active.png'),
rightIcon: require('@/assets/icon/right.png'), rightIcon: require('@/assets/icon/right.png'),
rightActiveIcon: require('@/assets/icon/right-active.png'), rightActiveIcon: require('@/assets/icon/right-active.png'),
pageNumber: 1 pageNumber: 1,
nothing
} }
}, },
mounted () { mounted () {
...@@ -319,6 +329,20 @@ export default { ...@@ -319,6 +329,20 @@ export default {
transform: translateY(-50%) scale(1); transform: translateY(-50%) scale(1);
} }
} }
.nothing {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
font-size: 16px;
color: #999999;
img {
width: 268px;
height: 88px;
}
}
} }
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!