mirror of
https://gitee.com/dromara/go-view.git
synced 2025-06-30 08:39:15 +08:00
fix: 优化组态 创建时固定位置
This commit is contained in:
parent
23bf1d2af4
commit
d07f25045c
6
src/packages/index.d.ts
vendored
6
src/packages/index.d.ts
vendored
@ -114,13 +114,17 @@ export const BlendModeEnumList = [
|
|||||||
{ label: '亮度', value: 'luminosity' }
|
{ label: '亮度', value: 'luminosity' }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
export interface PublicConfigAttrType {
|
||||||
|
x: number; y: number; w: number; h: number; zIndex: number; offsetX: number; offsetY: number, isHeadInsert?: boolean, isFixedInit?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
// 组件实例类
|
// 组件实例类
|
||||||
export interface PublicConfigType {
|
export interface PublicConfigType {
|
||||||
id: string
|
id: string
|
||||||
isGroup: boolean
|
isGroup: boolean
|
||||||
// isHeadInsert 组件置底
|
// isHeadInsert 组件置底
|
||||||
// isFixedInit 组件初始时位置以x,y为准 不以鼠标位置为准
|
// isFixedInit 组件初始时位置以x,y为准 不以鼠标位置为准
|
||||||
attr: { x: number; y: number; w: number; h: number; zIndex: number; offsetX: number; offsetY: number, isHeadInsert?: boolean, isFixedInit?: boolean }
|
attr: PublicConfigAttrType
|
||||||
styles: {
|
styles: {
|
||||||
[FilterEnum.FILTERS_SHOW]: boolean
|
[FilterEnum.FILTERS_SHOW]: boolean
|
||||||
[FilterEnum.OPACITY]: number
|
[FilterEnum.OPACITY]: number
|
||||||
|
@ -15,6 +15,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
ChartFrameEnum,
|
ChartFrameEnum,
|
||||||
PublicConfigType,
|
PublicConfigType,
|
||||||
|
PublicConfigAttrType,
|
||||||
CreateComponentType,
|
CreateComponentType,
|
||||||
CreateComponentGroupType
|
CreateComponentGroupType
|
||||||
} from '@/packages/index.d'
|
} from '@/packages/index.d'
|
||||||
@ -123,7 +124,7 @@ export class PublicConfigClass implements PublicConfigType {
|
|||||||
public id = getUUID()
|
public id = getUUID()
|
||||||
public isGroup = false
|
public isGroup = false
|
||||||
// 基本信息
|
// 基本信息
|
||||||
public attr = { ...chartInitConfig, zIndex: -1 }
|
public attr = { ...chartInitConfig, zIndex: -1 } as PublicConfigAttrType
|
||||||
// 基本样式
|
// 基本样式
|
||||||
public styles = {
|
public styles = {
|
||||||
// 使用滤镜
|
// 使用滤镜
|
||||||
|
@ -129,7 +129,7 @@ const dblclickHandle = async (item: ConfigType) => {
|
|||||||
newComponent.chartConfig.chartFrame = item.chartFrame
|
newComponent.chartConfig.chartFrame = item.chartFrame
|
||||||
}
|
}
|
||||||
// 组件置底插入
|
// 组件置底插入
|
||||||
let isHead = !!newComponent.chartConfig.isHeadInsert
|
let isHead = !!newComponent.attr.isHeadInsert
|
||||||
// 添加
|
// 添加
|
||||||
chartEditStore.addComponentList(newComponent, isHead, true)
|
chartEditStore.addComponentList(newComponent, isHead, true)
|
||||||
// 选中
|
// 选中
|
||||||
|
Loading…
x
Reference in New Issue
Block a user