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';