Refine console ux detail (#233)

This commit is contained in:
Germey authored and GitHub committed 2025-07-27 02:08:41 +08:00
1 parent 9019629c42
commit ffea198d14
15 files changed
+315 -393

No files matched your search

+2 -2
View File
@@ -26,12 +26,12 @@
</div>
<div class="flex flex-col justify-center align-middle gap-2">
<div class="flex">
<el-button size="small" round @click="onGoUsage">
<el-button size="small" round @click.stop="onGoUsage">
{{ $t('application.button.usage') }}
</el-button>
</div>
<div class="flex">
<el-button type="primary" round size="small" @click="onBuyMore">
<el-button type="primary" round size="small" @click.stop="onBuyMore">
{{ $t('application.button.buyMore') }}
</el-button>
</div>
+7 -35
View File
@@ -4,45 +4,17 @@
<script lang="ts">
import { getCookie } from 'typescript-cookie';
import { isOfficial } from '@/utils';
import { defineComponent } from 'vue';
export default {
export default defineComponent({
emits: ['click'],
data() {
return {
url1: 'https://cdn.acedata.cloud/logo.png/thumb_450x_',
url2: 'https://cdn.acedata.cloud/logo2.png/thumb_450x_',
dark: getCookie('THEME') === 'dark',
url: '',
isOfficial: isOfficial(),
interval: undefined as number | undefined
};
},
watch: {
computed: {
dark() {
this.updateUrl();
}
},
mounted() {
this.interval = window.setInterval(this.checkCookie, 500);
this.updateUrl();
},
unmounted() {
if (this.interval) {
clearInterval(this.interval);
}
},
methods: {
checkCookie() {
this.dark = getCookie('THEME') === 'dark';
return getCookie('THEME') === 'dark';
},
updateUrl() {
if (this.isOfficial) {
this.url = this.dark ? this.url2 : this.url1;
} else {
this.url = this.$store.state.site?.logo || '';
}
url() {
return this.$store.state.site?.favicon;
}
}
};
});
</script>
-20
View File
@@ -1,20 +0,0 @@
<template>
<img :src="url" class="logo tiny" @click="$emit('click')" />
</template>
<script lang="ts">
import { getCookie } from 'typescript-cookie';
import { defineComponent } from 'vue';
export default defineComponent({
emits: ['click'],
computed: {
dark() {
return getCookie('THEME') === 'dark';
},
url() {
return this.$store.state.site?.favicon;
}
}
});
</script>
+15 -47
View File
@@ -1,8 +1,8 @@
<template>
<div :direction="direction" class="navigator">
<div class="top">
<div v-if="direction === 'column'">
<logo-tiny @click="onHome" />
<div class="w-full flex justify-center">
<logo v-if="direction === 'column'" @click.stop="onHome" />
</div>
<div
v-for="(link, linkIndex) in links"
@@ -44,14 +44,14 @@ import {
ROUTE_KLING_HISTORY
} from '@/router/constants';
import { CHAT_MODEL_ICON_CHATGPT, CHAT_MODEL_ICON_DEEPSEEK, CHAT_MODEL_ICON_GROK } from '@/constants/chat';
import LogoTiny from './LogoTiny.vue';
import Logo from './Logo.vue';
import UserCenter from '@/components/user/Center.vue';
export default defineComponent({
name: 'Navigator',
components: {
ElImage,
LogoTiny,
Logo,
ElTooltip,
UserCenter
},
@@ -267,53 +267,21 @@ export default defineComponent({
}
&[direction='column'] {
flex-direction: column;
.el-menu {
width: 150px;
border-right: none;
background: none;
.el-menu-item {
height: 50px;
color: var(--el-text-color-primary);
&.active,
&:hover,
&:focus {
background-color: var(--el-button-hover-bg-color);
color: var(--el-color-primary);
}
}
}
.chevron {
position: absolute;
right: -12px;
top: 50%;
transform: translateY(-50%) scale(0.8);
z-index: 10;
}
.logo {
width: 80%;
max-height: 50px;
cursor: pointer;
margin: 10px auto 20px auto;
display: block;
&.tiny {
margin: 0 auto 10px auto;
width: 40px;
height: 40px;
}
}
.top,
.bottom {
.top {
flex: 1;
display: flex;
flex-direction: column;
padding-top: 10px;
min-width: 60px;
width: 60px;
gap: 15px;
.logo {
width: 40px;
height: 40px;
cursor: pointer;
}
.link {
width: 100%;
height: 40px;
margin-bottom: 10px;
.avatar {
display: block;
margin: auto;
@@ -325,9 +293,9 @@ export default defineComponent({
}
}
}
.bottom {
position: absolute;
bottom: 0;
height: 50px;
display: flex;
flex-direction: column;
width: 100%;
+8 -11
View File
@@ -1,5 +1,5 @@
<template>
<div class="side-panel">
<div class="side">
<div class="links">
<a
v-for="(link, linkIndex) in links"
@@ -107,29 +107,26 @@ export default defineComponent({
<style lang="scss" scoped>
$width: 200px;
$padding-left: 10px;
.side-panel {
.side {
padding-left: $padding-left;
width: $width;
padding-top: 50px;
height: 100%;
}
.logo {
width: 100%;
cursor: pointer;
margin-bottom: 30px;
}
.links {
width: $width;
width: $width - $padding-left;
display: flex;
flex-direction: column;
position: relative;
gap: 5px;
.link {
$height: 40px;
height: $height;
display: block;
width: calc(100% - #{$padding-left});
width: 100%;
border-radius: 6px;
cursor: pointer;
margin-bottom: 5px;
position: relative;
color: var(--el-text-color-primary);
line-height: $height;
+94
View File
@@ -0,0 +1,94 @@
<template>
<el-dialog :model-value="visible" :title="$t('application.title.buyService')" width="500px" center>
<p class="text-center">
{{ $t('order.message.buyInExternalUrl') }}
</p>
</el-dialog>
</template>
<script lang="ts">
import { IOrder, IOrderDetailResponse, OrderState } from '@/models';
import { defineComponent } from 'vue';
import { ElDialog } from 'element-plus';
import { orderOperator } from '@/operators';
interface IData {
refreshTimer: number | undefined;
}
export default defineComponent({
name: 'PayOrderDialog',
components: {
ElDialog
},
props: {
modelValue: {
type: Object as () => IOrder,
required: true
},
visible: {
type: Boolean,
required: false,
default: false
}
},
emits: ['hide', 'update:modelValue'],
data(): IData {
return {
refreshTimer: undefined
};
},
watch: {
visible: {
handler(val) {
if (val && this.modelValue.pay_url) {
window.open(this.modelValue.pay_url, '_blank');
}
}
}
},
mounted() {
this.onRefresh();
},
unmounted() {
if (this.refreshTimer) {
clearTimeout(this.refreshTimer);
}
},
methods: {
onRefresh() {
if (!this.modelValue.id) {
console.error('id does not exist');
return;
}
orderOperator
.refresh(this.modelValue.id)
.then(({ data: data }: { data: IOrderDetailResponse }) => {
// if not paid, check for next loop
if (data.state !== OrderState.PAID) {
setTimeout(() => {
this.onRefresh();
}, 2000);
} else {
// paid, just notify parent, and hide the dialog
this.$emit('hide');
}
this.$emit('update:modelValue', data);
})
.catch(() => {
setTimeout(() => {
this.onRefresh();
}, 5000);
});
}
}
});
</script>
<style lang="scss" scoped>
.paycodes {
padding: 30px 0;
width: 500px;
margin: auto;
}
</style>
+44 -1
View File
@@ -1,5 +1,5 @@
<template>
<div class="wrapper">
<div class="wrapper console">
<div class="main">
<side-panel class="side" />
<router-view class="panel" />
@@ -41,6 +41,7 @@ export default defineComponent({
.navigator {
height: 100%;
width: 60px;
border-right: 1px solid var(--el-border-color);
}
@@ -50,6 +51,17 @@ export default defineComponent({
flex: 1;
display: flex;
flex-direction: row;
.side {
width: 200px;
height: 100%;
}
.panel {
width: calc(100% - 200px);
height: 100%;
padding: 30px;
background-color: var(--el-bg-color-page);
overflow: hidden;
}
}
}
@@ -78,3 +90,34 @@ export default defineComponent({
}
}
</style>
<style lang="scss">
.wrapper.console {
.panel {
.title {
font-size: 26px;
font-weight: bold;
margin-bottom: 20px;
color: var(--el-text-color-primary);
}
.el-table {
max-height: calc(100vh - 250px);
margin-bottom: 50px;
overflow-y: scroll;
}
}
.pagination {
margin: auto;
width: fit-content;
}
@media (max-width: 767px) {
.panel {
width: 100%;
height: 100%;
}
}
}
</style>
+3
View File
@@ -131,10 +131,13 @@ export default defineComponent({
display: flex;
flex-direction: row-reverse;
overflow: hidden;
.navigator {
height: 100%;
width: 60px;
border-right: 1px solid var(--el-border-color);
}
.main {
height: 100%;
width: calc(100% - 60px);
-26
View File
@@ -13,10 +13,6 @@
<el-col :span="16" :offset="4">
<el-skeleton v-if="loading" />
<el-form v-else-if="application" label-width="100px">
<div v-if="!application?.service">
<p class="description">{{ $t('application.message.globalBalanceBuyDescription') }}</p>
<el-divider border-style="dashed" />
</div>
<el-form-item v-if="application?.service" :label="$t('application.field.service')">
{{ application?.service?.title }}
</el-form-item>
@@ -273,13 +269,6 @@ export default defineComponent({
</script>
<style lang="scss" scoped>
.title {
font-size: 26px;
font-weight: bold;
margin-bottom: 20px;
color: var(--el-text-color-primary);
}
.el-form {
.el-radio-group {
.el-radio-button {
@@ -301,10 +290,6 @@ export default defineComponent({
}
.panel {
padding: 30px;
width: calc(100% - 200px);
background-color: var(--el-bg-color-page);
.el-card {
padding: 50px 0;
.price {
@@ -319,15 +304,4 @@ export default defineComponent({
}
}
}
.pagination {
float: right;
}
@media (max-width: 767px) {
.panel {
width: 100%;
height: 100%;
}
}
</style>
+10 -44
View File
@@ -16,7 +16,7 @@
table-layout="fixed"
:empty-text="$t('common.message.noData')"
>
<el-table-column prop="id" :label="$t('application.field.id')" width="280px" class-name="text-center">
<el-table-column prop="id" :label="$t('application.field.id')" width="190px" class-name="text-center">
<template #default="scope">
<span>{{ scope.row.id }}</span>
<span class="copy">
@@ -26,10 +26,10 @@
</el-table-column>
<el-table-column :label="$t('application.field.type')" width="80px">
<template #default="scope">
<el-tag v-if="scope.row?.type === 'Period'" type="success" effect="dark">
<el-tag v-if="scope.row?.type === 'Period'" type="success" effect="dark" round>
{{ $t('application.type.period') }}
</el-tag>
<el-tag v-if="scope.row?.type === 'Usage'" effect="dark">
<el-tag v-if="scope.row?.type === 'Usage'" effect="dark" round>
{{ $t('application.type.usage') }}
</el-tag>
</template>
@@ -42,7 +42,7 @@
<el-table-column
prop="remaining_amount"
:label="$t('application.field.remainingAmount')"
width="160px"
width="140px"
class-name="text-center"
>
<template #default="scope">
@@ -52,14 +52,14 @@
<el-table-column
prop="used_amount"
:label="$t('application.field.usedAmount')"
width="160px"
width="140px"
class-name="text-center"
>
<template #default="scope">
<span>{{ getUsedAmount(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('application.field.expiredAt')" width="200px">
<el-table-column :label="$t('application.field.expiredAt')" width="170px">
<template #default="scope">
<span v-if="scope.row.expired_at" class="expired-at">{{ $dayjs.format(scope.row.expired_at) }}</span>
</template>
@@ -84,7 +84,7 @@
</el-col>
</el-row>
<el-row>
<el-col>
<el-col :span="24">
<div class="pagination">
<pagination :current-page="page" :page-size="limit" :total="total" @change="onPageChange"> </pagination>
</div>
@@ -100,7 +100,7 @@ import { applicationOperator } from '@/operators';
import Pagination from '@/components/common/Pagination.vue';
import CopyToClipboard from '@/components/common/CopyToClipboard.vue';
import { ElTable, ElRow, ElCol, ElTableColumn, ElCard, ElButton, ElTag } from 'element-plus';
import { ROUTE_CONSOLE_APPLICATION_SUBSCRIBE } from '@/router/constants';
import { ROUTE_CONSOLE_APPLICATION_EXTRA, ROUTE_CONSOLE_APPLICATION_SUBSCRIBE } from '@/router/constants';
import { IApplication, IApplicationListResponse, ICredentialType, IService } from '@/models';
interface IData {
@@ -139,7 +139,7 @@ export default defineComponent({
loading: false,
total: undefined,
buying: false,
limit: 10,
limit: 12,
form: {
amount: 1
},
@@ -175,7 +175,7 @@ export default defineComponent({
methods: {
onBuyMore(application: IApplication) {
this.$router.push({
name: ROUTE_CONSOLE_APPLICATION_SUBSCRIBE,
name: ROUTE_CONSOLE_APPLICATION_EXTRA,
params: {
id: application.id
}
@@ -225,37 +225,3 @@ export default defineComponent({
}
});
</script>
<style lang="scss" scoped>
.panel {
padding: 30px;
width: calc(100% - 200px);
background-color: var(--el-bg-color-page);
.title {
font-size: 26px;
font-weight: bold;
margin-bottom: 20px;
color: var(--el-text-color-primary);
}
.el-table {
min-height: calc(100vh - 350px);
margin-bottom: 50px;
.el-button {
border-radius: 20px;
}
}
}
.pagination {
margin: auto;
width: fit-content;
}
@media (max-width: 767px) {
.panel {
width: 100%;
height: 100%;
}
}
</style>
@@ -296,19 +296,7 @@ export default defineComponent({
</script>
<style lang="scss" scoped>
.title {
font-size: 26px;
font-weight: bold;
margin-bottom: 20px;
color: var(--el-text-color-primary);
}
.panel {
padding: 30px;
overflow: scroll;
width: calc(100% - 200px);
background-color: var(--el-bg-color-page);
.card {
padding: 50px 0 100px 0;
cursor: pointer;
@@ -377,15 +365,4 @@ export default defineComponent({
font-size: 14px;
}
}
.pagination {
float: right;
}
@media (max-width: 767px) {
.panel {
width: 100%;
height: 100%;
}
}
</style>
+109 -102
View File
@@ -29,6 +29,7 @@
<el-descriptions-item v-if="order?.pay_way" :label="$t('order.field.payWay')">
<span v-if="order?.pay_way === PayWay.WechatPay">{{ $t('order.title.wechatPay') }}</span>
<span v-if="order?.pay_way === PayWay.Stripe">{{ $t('order.title.stripe') }}</span>
<span v-if="order?.pay_way === PayWay.AliPay">{{ $t('order.title.aliPay') }}</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('order.field.createdAt')">
{{ $dayjs.format(order?.created_at) }}
@@ -72,7 +73,6 @@
<span class="payname">{{ $t('order.title.wechatPay') }}</span>
</div>
<div
v-if="false"
:class="{
payway: true,
alipay: true,
@@ -111,15 +111,30 @@
</el-card>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<wechat-pay-order
v-if="order && payWay === PayWay.WechatPay"
v-model="order"
:visible="paying"
@hide="paying = false"
/>
<stripe-pay-order
v-if="order && payWay === PayWay.Stripe"
v-model="order"
:visible="paying"
@hide="paying = false"
/>
<alipay-pay-order
v-if="order && payWay === PayWay.AliPay"
v-model="order"
:visible="paying"
@hide="paying = false"
/>
</el-col>
</el-row>
</el-col>
</el-row>
<wechat-pay-order
v-if="order && payWay === PayWay.WechatPay"
v-model="order"
:visible="paying"
@hide="paying = false"
/>
<stripe-pay-order v-if="order && payWay === PayWay.Stripe" v-model="order" :visible="paying" @hide="paying = false" />
</template>
<script lang="ts">
@@ -138,6 +153,7 @@ import {
} from 'element-plus';
import WechatPayOrder from '@/components/order/WechatPay.vue';
import StripePayOrder from '@/components/order/StripePay.vue';
import AlipayPayOrder from '@/components/order/AliPay.vue';
import { IApplicationType, IOrder, IOrderDetailResponse, OrderState } from '@/models';
import { getPriceString } from '@/utils';
import CopyToClipboard from '@/components/common/CopyToClipboard.vue';
@@ -174,7 +190,8 @@ export default defineComponent({
ElDescriptions,
ElDescriptionsItem,
WechatPayOrder,
StripePayOrder
StripePayOrder,
AlipayPayOrder
},
data(): IData {
return {
@@ -258,110 +275,100 @@ export default defineComponent({
</script>
<style lang="scss" scoped>
.title {
font-size: 26px;
font-weight: bold;
margin-bottom: 20px;
color: var(--el-text-color-primary);
.el-card {
min-height: 500px;
}
.panel {
padding: 30px;
width: calc(100% - 200px);
background-color: var(--el-bg-color-page);
.el-card {
min-height: 500px;
.order {
padding-top: 50px;
.price {
font-size: 20px;
font-weight: bold;
&.unfree {
color: #ff5441;
}
&.free {
color: #29c287;
}
}
.order {
padding-top: 50px;
.price {
font-size: 20px;
font-weight: bold;
&.unfree {
color: #ff5441;
}
&.free {
color: #29c287;
}
.payways {
overflow: hidden;
.payway {
cursor: pointer;
font-size: 14px;
float: left;
width: 120px;
line-height: 40px;
text-align: center;
height: 40px;
border: 2px solid var(--el-border-color);
&:first-child {
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
&:last-child {
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}
&:not(:last-child) {
border-right: none;
}
&.active {
border-top: 2px solid var(--el-color-primary);
border-right: 2px solid var(--el-color-primary);
border-bottom: 2px solid var(--el-color-primary);
border-left: 2px solid var(--el-color-primary);
& + .payway {
border-left: none;
}
}
}
.payways {
overflow: hidden;
.payway {
cursor: pointer;
font-size: 14px;
float: left;
width: 120px;
line-height: 40px;
text-align: center;
height: 40px;
border: 2px solid var(--el-border-color);
&:first-child {
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
&:last-child {
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}
&:not(:last-child) {
border-right: none;
}
&.active {
border-top: 2px solid var(--el-color-primary);
border-right: 2px solid var(--el-color-primary);
border-bottom: 2px solid var(--el-color-primary);
border-left: 2px solid var(--el-color-primary);
& + .payway {
border-left: none;
}
}
}
.payname {
display: inline-block;
font-size: 12px;
margin-left: 5px;
.payname {
display: inline-block;
font-size: 12px;
margin-left: 5px;
position: relative;
top: -2px;
}
.payicon {
width: 20px;
height: 20px;
margin-top: 2px;
display: inline-block;
&.wechatpay {
position: relative;
top: -2px;
top: 3px;
width: 22px;
height: 19px;
background-image: url(//midas.gtimg.cn/enterprise/images/ep_new_sprites@2x.png);
background-repeat: no-repeat;
background-size: 60px 250px;
background-position: 0 -50px;
}
.payicon {
width: 20px;
height: 20px;
margin-top: 2px;
display: inline-block;
&.wechatpay {
position: relative;
top: 3px;
width: 22px;
height: 19px;
background-image: url(//midas.gtimg.cn/enterprise/images/ep_new_sprites@2x.png);
background-repeat: no-repeat;
background-size: 60px 250px;
background-position: 0 -50px;
}
&.stripe {
position: relative;
top: 3px;
width: 22px;
height: 18px;
background-image: url(//cdn.acedata.cloud/2023-08-27-164440.png);
background-size: contain;
background-repeat: no-repeat;
}
&.stripe {
position: relative;
top: 3px;
width: 22px;
height: 18px;
background-image: url(//cdn.acedata.cloud/2023-08-27-164440.png);
background-size: contain;
background-repeat: no-repeat;
}
&.alipay {
position: relative;
top: 3px;
width: 22px;
height: 18px;
background-image: url(//cdn.acedata.cloud/alipay.webp);
background-size: contain;
background-repeat: no-repeat;
}
}
.btn-pay {
width: 150px;
}
}
@media (max-width: 767px) {
.panel {
width: 100%;
height: 100%;
}
.btn-pay {
width: 150px;
}
</style>
+6 -40
View File
@@ -10,7 +10,7 @@
<el-col :span="24">
<el-card shadow="hover">
<el-table v-loading="loading" :data="orders" stripe>
<el-table-column prop="id" :label="$t('order.field.id')" class-name="text-center" width="350px">
<el-table-column prop="id" :label="$t('order.field.id')" class-name="text-center" width="190px">
<template #default="scope">
<span class="key">{{ scope.row.id }}</span>
<span class="copy">
@@ -26,19 +26,19 @@
<el-table-column prop="state" :label="$t('order.field.state')" class-name="text-center" width="150px">
<template #default="scope">
<span v-if="scope.row.state === OrderState?.PENDING">
<el-tag type="info" class="mx-1" effect="dark">{{ $t('order.state.pending') }}</el-tag>
<el-tag type="info" class="mx-1" effect="dark" round>{{ $t('order.state.pending') }}</el-tag>
</span>
<span v-else-if="scope.row.state === OrderState?.PAID" class="state state-paid">
<el-tag type="success" class="mx-1" effect="dark">{{ $t('order.state.paid') }}</el-tag>
<el-tag type="success" class="mx-1" effect="dark" round>{{ $t('order.state.paid') }}</el-tag>
</span>
<span v-else-if="scope.row.state === OrderState?.FINISHED" class="state state-finished">
<el-tag type="success" class="mx-1" effect="dark">{{ $t('order.state.finished') }}</el-tag>
<el-tag type="success" class="mx-1" effect="dark" round>{{ $t('order.state.finished') }}</el-tag>
</span>
<span v-else-if="scope.row.state === OrderState?.EXPIRED" class="state state-expired">
<el-tag type="danger" class="mx-1" effect="dark">{{ $t('order.state.expired') }}</el-tag>
<el-tag type="danger" class="mx-1" effect="dark" round>{{ $t('order.state.expired') }}</el-tag>
</span>
<span v-else-if="scope.row.state === OrderState?.FAILED" class="state state-failed">
<el-tag type="danger" class="mx-1" effect="dark"> {{ $t('order.state.failed') }}</el-tag>
<el-tag type="danger" class="mx-1" effect="dark" round> {{ $t('order.state.failed') }}</el-tag>
</span>
</template>
</el-table-column>
@@ -197,37 +197,3 @@ export default defineComponent({
}
});
</script>
<style lang="scss" scoped>
.panel {
padding: 30px;
width: calc(100% - 200px);
background-color: var(--el-bg-color-page);
.title {
font-size: 26px;
font-weight: bold;
margin-bottom: 20px;
color: var(--el-text-color-primary);
}
.el-table {
height: calc(100vh - 350px);
margin-bottom: 50px;
.el-button {
border-radius: 20px;
}
}
}
.pagination {
margin: auto;
width: fit-content;
}
@media (max-width: 767px) {
.panel {
width: 100%;
height: 100%;
}
}
</style>
+10 -42
View File
@@ -36,46 +36,33 @@
table-layout="fixed"
:empty-text="$t('common.message.noData')"
>
<el-table-column :label="$t('application.field.name')" width="160px">
<el-table-column :label="$t('application.field.name')" width="140px">
<template #default="scope">
<span>{{ scope.row?.api?.title }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('usage.field.statusCode')" width="120px">
<el-table-column :label="$t('usage.field.statusCode')" width="80px">
<template #default="scope">
<span>{{ scope.row.status_code }}</span>
</template>
</el-table-column>
<el-table-column
prop="remaining_amount"
:label="$t('usage.field.remainingAmount')"
width="160px"
class-name="text-center"
>
<template #default="scope">
<span>{{ getRemainingAmount(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column
prop="deducted_amount"
:label="$t('usage.field.deductedAmount')"
width="150px"
width="130px"
class-name="text-center"
>
<template #default="scope">
<span>{{ getDeductedAmount(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column
prop="metadata"
:label="$t('usage.field.metadata')"
width="200px"
class-name="text-center"
>
<el-table-column prop="metadata" width="350px" :label="$t('usage.field.metadata')">
<template #default="scope">
<el-tag v-for="(name, key) in scope.row.metadata" :key="key" class="mb-2">
{{ key }}: {{ name }}
</el-tag>
<div class="flex flex-wrap gap-2 justify-start">
<div v-for="(name, key) in scope.row.metadata" :key="key" class="inline-block">
<el-tag round> {{ key }}: {{ name }} </el-tag>
</div>
</div>
</template>
</el-table-column>
<el-table-column
@@ -278,27 +265,8 @@ export default defineComponent({
<style lang="scss" scoped>
.panel {
padding: 30px;
width: calc(100% - 200px);
background-color: var(--el-bg-color-page);
.title {
font-size: 26px;
font-weight: bold;
margin-bottom: 20px;
color: var(--el-text-color-primary);
}
.el-table {
height: calc(100vh - 430px);
margin-bottom: 50px;
.el-button {
border-radius: 20px;
}
height: calc(100vh - 300px) !important;
}
}
.pagination {
margin: auto;
width: fit-content;
}
</style>