mirror of
https://gitee.com/dromara/go-view.git
synced 2025-06-30 00:29:16 +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' }
|
||||
]
|
||||
|
||||
export interface PublicConfigAttrType {
|
||||
x: number; y: number; w: number; h: number; zIndex: number; offsetX: number; offsetY: number, isHeadInsert?: boolean, isFixedInit?: boolean
|
||||
}
|
||||
|
||||
// 组件实例类
|
||||
export interface PublicConfigType {
|
||||
id: string
|
||||
isGroup: boolean
|
||||
// isHeadInsert 组件置底
|
||||
// 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: {
|
||||
[FilterEnum.FILTERS_SHOW]: boolean
|
||||
[FilterEnum.OPACITY]: number
|
||||
|
@ -15,6 +15,7 @@ import {
|
||||
import {
|
||||
ChartFrameEnum,
|
||||
PublicConfigType,
|
||||
PublicConfigAttrType,
|
||||
CreateComponentType,
|
||||
CreateComponentGroupType
|
||||
} from '@/packages/index.d'
|
||||
@ -123,7 +124,7 @@ export class PublicConfigClass implements PublicConfigType {
|
||||
public id = getUUID()
|
||||
public isGroup = false
|
||||
// 基本信息
|
||||
public attr = { ...chartInitConfig, zIndex: -1 }
|
||||
public attr = { ...chartInitConfig, zIndex: -1 } as PublicConfigAttrType
|
||||
// 基本样式
|
||||
public styles = {
|
||||
// 使用滤镜
|
||||
|
@ -129,7 +129,7 @@ const dblclickHandle = async (item: ConfigType) => {
|
||||
newComponent.chartConfig.chartFrame = item.chartFrame
|
||||
}
|
||||
// 组件置底插入
|
||||
let isHead = !!newComponent.chartConfig.isHeadInsert
|
||||
let isHead = !!newComponent.attr.isHeadInsert
|
||||
// 添加
|
||||
chartEditStore.addComponentList(newComponent, isHead, true)
|
||||
// 选中
|
||||
|
Loading…
x
Reference in New Issue
Block a user