最近测试报告增加时间

This commit is contained in:
q4speed 2020-05-20 14:21:34 +08:00
parent 55e6ab076f
commit d769d79c5e
2 changed files with 17 additions and 1 deletions

View File

@ -88,6 +88,7 @@
}, },
reportRecent: { reportRecent: {
title: this.$t('report.recent'), title: this.$t('report.recent'),
showTime: true,
url: "/api/report/recent/5", url: "/api/report/recent/5",
index: function (item) { index: function (item) {
return '/api/report/view/' + item.id; return '/api/report/view/' + item.id;

View File

@ -6,7 +6,10 @@
<i class="el-icon-refresh" @click="recent"/> <i class="el-icon-refresh" @click="recent"/>
</div> </div>
<el-menu-item :key="i.id" v-for="i in items" :index="getIndex(i)" :route="getRouter(i)"> <el-menu-item :key="i.id" v-for="i in items" :index="getIndex(i)" :route="getRouter(i)">
<span class="title">{{ i.name }}</span> <template slot="title">
<div class="title">{{ i.name }}</div>
<div class="time" v-if="options.showTime && i.updateTime">{{ i.updateTime | timestampFormatDate}}</div>
</template>
</el-menu-item> </el-menu-item>
</div> </div>
</template> </template>
@ -81,6 +84,18 @@
} }
.title { .title {
display: inline-block;
padding-left: 20px; padding-left: 20px;
max-width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.time {
color: #C0C4CC;
display: inline-block;
padding-left: 20px;
float: right;
} }
</style> </style>