mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
perf: 去除组件默认滤镜和变换,避免模糊问题
This commit is contained in:
@@ -5,6 +5,7 @@ import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHis
|
||||
import { fetchChartComponent, fetchConfigComponent, createComponent } from '@/packages/index'
|
||||
import { CreateComponentType, CreateComponentGroupType, ConfigType } from '@/packages/index.d'
|
||||
import { PublicGroupConfigClass } from '@/packages/public/publicConfig'
|
||||
import merge from 'lodash/merge'
|
||||
|
||||
// 请求处理
|
||||
export const useSync = () => {
|
||||
@@ -56,19 +57,19 @@ export const useSync = () => {
|
||||
let newComponent: CreateComponentType = await createComponent(_componentInstance.chartConfig)
|
||||
if (callBack) {
|
||||
if (changeId) {
|
||||
callBack(Object.assign(newComponent, { ..._componentInstance, id: getUUID() }))
|
||||
callBack(merge(newComponent, { ..._componentInstance, id: getUUID() }))
|
||||
} else {
|
||||
callBack(Object.assign(newComponent, _componentInstance))
|
||||
callBack(merge(newComponent, _componentInstance))
|
||||
}
|
||||
} else {
|
||||
if (changeId) {
|
||||
chartEditStore.addComponentList(
|
||||
Object.assign(newComponent, { ..._componentInstance, id: getUUID() }),
|
||||
merge(newComponent, { ..._componentInstance, id: getUUID() }),
|
||||
false,
|
||||
true
|
||||
)
|
||||
} else {
|
||||
chartEditStore.addComponentList(Object.assign(newComponent, _componentInstance), false, true)
|
||||
chartEditStore.addComponentList(merge(newComponent, _componentInstance), false, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,9 +78,9 @@ export const useSync = () => {
|
||||
// 创建分组
|
||||
let groupClass = new PublicGroupConfigClass()
|
||||
if (changeId) {
|
||||
groupClass = Object.assign(groupClass, { ...comItem, id: getUUID() })
|
||||
groupClass = merge(groupClass, { ...comItem, id: getUUID() })
|
||||
} else {
|
||||
groupClass = Object.assign(groupClass, comItem)
|
||||
groupClass = merge(groupClass, comItem)
|
||||
}
|
||||
|
||||
// 注册子应用
|
||||
@@ -100,7 +101,7 @@ export const useSync = () => {
|
||||
} else {
|
||||
// 非组件(顺便排除脏数据)
|
||||
if (key !== 'editCanvasConfig' && key !== 'requestGlobalConfig') return
|
||||
Object.assign(chartEditStore[key], projectData[key])
|
||||
merge(chartEditStore[key], projectData[key])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user