refine application list
This commit is contained in:
1 parent
7f3a50e787
commit
7a57531bc6
3 files changed
+101
-64
No files matched your search
@@ -1,12 +1,21 @@
|
||||
<template>
|
||||
<el-card v-if="application && service" shadow="hover">
|
||||
<el-card v-if="application && service" shadow="hover" class="card">
|
||||
<div class="item">
|
||||
<div class="icon">
|
||||
<font-awesome-icon :icon="'fa-regular fa-' + service.icon" />
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="title">
|
||||
{{ service.title }}
|
||||
<router-link
|
||||
:to="{
|
||||
name: 'service-detail',
|
||||
params: {
|
||||
id: service.id
|
||||
}
|
||||
}"
|
||||
>
|
||||
{{ service.title }}
|
||||
</router-link>
|
||||
</div>
|
||||
<div class="key">
|
||||
<span class="label">{{ $t('application.field.apiKey') }}</span>
|
||||
@@ -19,13 +28,29 @@
|
||||
<span class="label">{{ $t('application.field.remainingCount') }}</span>
|
||||
<span class="value">{{ application.remainingCount }}</span>
|
||||
</div>
|
||||
<div class="operations">
|
||||
<div class="operation">
|
||||
<div class="links">
|
||||
<div class="link">
|
||||
<font-awesome-icon icon="fa-regular fa-file-lines" class="label" />
|
||||
<span class="link">{{ $t('application.button.document') }}</span>
|
||||
<span class="text">{{ $t('application.button.document') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operations">
|
||||
<div class="operation">
|
||||
<router-link
|
||||
:to="{
|
||||
name: 'service-detail',
|
||||
params: {
|
||||
id: service.id
|
||||
}
|
||||
}"
|
||||
>
|
||||
<el-button type="danger">
|
||||
{{ $t('application.button.buyMore') }}
|
||||
</el-button>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@@ -69,76 +94,87 @@ export default defineComponent({
|
||||
this.service = data;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.item {
|
||||
height: 200px;
|
||||
display: flex;
|
||||
$icon-size: 150px;
|
||||
$icon-font-size: 50px;
|
||||
.icon {
|
||||
width: $icon-size;
|
||||
height: $icon-size;
|
||||
line-height: $icon-size;
|
||||
font-size: $icon-font-size;
|
||||
text-align: center;
|
||||
margin: auto 0;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
.main {
|
||||
padding: 0 15px;
|
||||
position: relative;
|
||||
.title {
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 10px;
|
||||
.card {
|
||||
margin-bottom: 20px;
|
||||
.item {
|
||||
height: 200px;
|
||||
display: flex;
|
||||
$icon-size: 150px;
|
||||
$icon-font-size: 50px;
|
||||
.icon {
|
||||
width: $icon-size;
|
||||
height: $icon-size;
|
||||
line-height: $icon-size;
|
||||
font-size: $icon-font-size;
|
||||
text-align: center;
|
||||
margin: auto 0;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
.key {
|
||||
font-size: 14px;
|
||||
margin-bottom: 5px;
|
||||
.label {
|
||||
font-weight: 600;
|
||||
.main {
|
||||
padding: 0 15px;
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
.title {
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.value {
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.copy {
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
color: #666;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.remaining-count {
|
||||
font-size: 14px;
|
||||
margin-bottom: 5px;
|
||||
.label {
|
||||
font-weight: 600;
|
||||
}
|
||||
.value {
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.operations {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
left: 20px;
|
||||
.operation {
|
||||
color: #666;
|
||||
.key {
|
||||
font-size: 14px;
|
||||
margin-bottom: 5px;
|
||||
.label {
|
||||
color: var(--el-color-primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
.link {
|
||||
.value {
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.copy {
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
color: #666;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.remaining-count {
|
||||
font-size: 14px;
|
||||
margin-bottom: 5px;
|
||||
.label {
|
||||
font-weight: 600;
|
||||
}
|
||||
.value {
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.links {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
left: 20px;
|
||||
.link {
|
||||
color: #666;
|
||||
.label {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
.text {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.operations {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export default {
|
||||
document: '文档'
|
||||
document: '文档',
|
||||
buyMore: '购买更多'
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
export interface IService {
|
||||
id: number;
|
||||
id: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
tags?: string[];
|
||||
|
||||
Reference in new issue
Block a user