From 4ff8bcd475ad34f5779e0c91a3198e0fab9aae7d Mon Sep 17 00:00:00 2001 From: zhongzm Date: Wed, 25 Dec 2024 11:30:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=B8=A6=E5=AE=BD=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=99=90=E9=80=9F=E5=88=A4=E6=96=AD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/billing/ratelimit/index.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/views/billing/ratelimit/index.vue b/src/views/billing/ratelimit/index.vue index 30e9edb..64e5e06 100644 --- a/src/views/billing/ratelimit/index.vue +++ b/src/views/billing/ratelimit/index.vue @@ -124,7 +124,7 @@ import { useElementSize } from '@vueuse/core'; import { fetchRateLimitList, addRateLimit, editRateLimit, removeRateLimit } from '@/service/api/auth'; import { message, Modal, Button } from 'ant-design-vue'; import type { Rule } from 'ant-design-vue/es/form'; -import { PlusOutlined, ExclamationCircleOutlined,DeleteOutlined,FormOutlined } from '@ant-design/icons-vue'; +import { PlusOutlined, ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { bandwidthUnits, convertBandwidth, formatBandwidth, type BandwidthUnit } from '@/utils/units'; interface RateLimitForm extends Omit { @@ -327,7 +327,8 @@ const { dataIndex: 'upLimit', title: '上行限速', align: 'center', - customRender: ({ text }) => { + customRender: ({ text, record }) => { + if (!record.upLimitEnable) return '无限制'; const { value, unit } = formatBandwidth(text); return `${value} ${unit}`; } @@ -337,7 +338,8 @@ const { dataIndex: 'downLimit', title: '下行限速', align: 'center', - customRender: ({ text }) => { + customRender: ({ text, record }) => { + if (!record.downLimitEnable) return '无限制'; const { value, unit } = formatBandwidth(text); return `${value} ${unit}`; } @@ -351,10 +353,10 @@ const { customRender: ({ record }) => (
)