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 }) => (
)