From 8703f7ddda1cbdbee1cefc4c8f9a31ea97272494 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期一, 18 十一月 2024 14:24:50 +0800 Subject: [PATCH] 打包优化: 1)使用 lodash-es 2)element-plus按需导入 --- src/components/chat/chatComponents/common.ts | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/chat/chatComponents/common.ts b/src/components/chat/chatComponents/common.ts index ebaddee..2a7183f 100644 --- a/src/components/chat/chatComponents/common.ts +++ b/src/components/chat/chatComponents/common.ts @@ -1,8 +1,8 @@ import type * as echarts from 'echarts'; import { buildProps } from 'element-plus/es/utils/vue/props/runtime'; -import _ from 'lodash'; import type { ExtractPropTypes, PropType } from 'vue'; import { axisLabelFormatter } from '/@/utils/chart'; +import { cloneDeep } from 'lodash-es'; export const timeDataOptionToContent = (opt) => { const headerList = [opt.xAxis[0]] @@ -54,6 +54,12 @@ }, originData: { type: Object as PropType<any>, + }, + conclusion: { + type: Array as PropType<Array<any>>, + }, + isTalking: { + type: Boolean, }, } as const); export type ChatComPropsType = ExtractPropTypes<typeof chatComProps>; @@ -122,5 +128,5 @@ }, } as echarts.EChartsOption; - return _.cloneDeep(option); + return cloneDeep(option); }; -- Gitblit v1.9.3