This commit is contained in:
ann 2024-10-10 08:58:43 +08:00
parent fb1a74c8bb
commit e68c46d7c3
2 changed files with 23 additions and 9 deletions

View File

@ -87,7 +87,7 @@ export function formatTime(time, option) {
const diff = (now - d) / 1000
if (diff < 30) {
return '刚刚'
return '小于1分钟'
} else if (diff < 3600) {
// less 1 hour
return Math.ceil(diff / 60) + '分钟前'
@ -119,7 +119,7 @@ export function formatTime(time, option) {
*/
export function runtimeFormat(diff) {
if (diff < 30) {
return '刚刚'
return '小于1分钟'
} else if (diff < 3600) {
// less 1 hour
return Math.round(diff / 60) + '分钟'

View File

@ -45,10 +45,12 @@
<el-card class="instanceCard">
<img :src="item.logo_path" alt="">
<p class="title">{{ item.instance_name }}</p>
<el-tag>{{ item.instance_type === 1 ? '应用实例' : '模型实例' }}</el-tag>
<el-tag>{{ item.instance_class_chinese }}</el-tag>
<br>
<p>描述 </p>
<div class="desc">{{ item.description }}</div>
<p>版本 {{ item.version }}</p>
<p class="version">版本 {{ item.version }}</p>
<el-button
type="primary"
@click="goDetail(item)"
@ -120,8 +122,6 @@ export default {
this.form = val
this.result = ''
this.dialogExecuteVisible = true
},
createFunc() {
}
}
}
@ -152,7 +152,8 @@ export default {
margin: 30px auto;
margin-top: 0;
.el-tag{
margin-right: 1rem;
margin-left:1rem;
float: left;
}
.desc{
margin: 0.05rem 2rem;
@ -172,19 +173,22 @@ export default {
}
p{
margin: 10px 30px;
clear: both;
// margin-top: 1rem;
font-size: 0.875rem;
text-align: left;
position: relative;
text-indent: 1em;
padding-top: 1rem;
}
p:before{
content: '';
position: absolute;
width: 8px;
height: 8px;
width: 0.5rem;
height: 0.5rem;
background: #2FB4AA;
border-radius: 50%;
top: 5px;
top: 1.25rem;
left: 0em;
}
.title{
@ -196,11 +200,21 @@ export default {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
clear: none;
padding-top: 0;
}
.title:before{
width: 0;
height: 0;
}
.version{
height: 3vh;
padding-top: 0rem
}
.version:before{
top: 0.25rem;
}
.el-button--text{
line-height: 1.1rem;
}