From 433a4bfab9dcf24d851d54e876439cfe9f08b8bd Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Thu, 13 Oct 2022 14:28:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5=E4=BE=9D=E8=B5=96=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/monitor/trace/trace.data.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/monitor/trace/trace.data.ts b/src/views/monitor/trace/trace.data.ts index 2631362..3b4f0f1 100644 --- a/src/views/monitor/trace/trace.data.ts +++ b/src/views/monitor/trace/trace.data.ts @@ -1,6 +1,6 @@ import { BasicColumn } from '/@/components/Table'; import dayjs from 'dayjs'; -import lodash from 'lodash-es'; +import _get from 'lodash.get'; import { h } from 'vue'; import { Tag } from 'ant-design-vue'; @@ -18,7 +18,7 @@ export const columns: BasicColumn[] = [ dataIndex: 'request.method', width: 20, customRender({ record, column }) { - let value = lodash.get(record, column.dataIndex!); + let value = _get(record, column.dataIndex!); let color = ''; if (value === 'GET') { color = '#87d068'; @@ -40,7 +40,7 @@ export const columns: BasicColumn[] = [ dataIndex: 'request.uri', width: 200, customRender({ record, column }) { - return lodash.get(record, column.dataIndex!); + return _get(record, column.dataIndex!); }, }, { @@ -48,7 +48,7 @@ export const columns: BasicColumn[] = [ dataIndex: 'response.status', width: 50, customRender({ record, column }) { - let value = lodash.get(record, column.dataIndex!); + let value = _get(record, column.dataIndex!); let color = ''; if (value < 200) { color = 'pink'; @@ -69,7 +69,7 @@ export const columns: BasicColumn[] = [ dataIndex: 'timeTaken', width: 50, customRender({ record, column }) { - let value = lodash.get(record, column.dataIndex!); + let value = _get(record, column.dataIndex!); let color = 'red'; if (value < 500) { color = 'green';