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