style: 格式化代,修改单词错误

This commit is contained in:
奔跑的面条 2022-08-30 17:28:21 +08:00
parent 714dac93bc
commit df10ae58f4
4 changed files with 18 additions and 15 deletions

View File

@ -104,5 +104,5 @@ export class PublicGroupConfigClass extends publicConfig implements CreateCompon
// 标识 // 标识
public id = getUUID() public id = getUUID()
// 基本信息 // 基本信息
public attr = { w: 0, h: 0, x: 0, y: 0, zIndex: -1 } public attr = { w: 0, h: 0, x: 0, y: 0, offsetX: 0, offsetY: 0, zIndex: -1 }
} }

View File

@ -25,7 +25,10 @@ export const chartInitConfig = {
x: 50, x: 50,
y: 50, y: 50,
w: 500, w: 500,
h: 300 h: 300,
// 不建议动 offset
offsetX: 0,
offsetY: 0,
} }
// dialog 图标的大小 // dialog 图标的大小

View File

@ -314,7 +314,7 @@ export const useChartEditStore = defineStore({
} }
}, },
// * 重置组件位置 // * 重置组件位置
resetComponentPostion(item: CreateComponentType | CreateComponentGroupType, isForward: boolean):void{ resetComponentPosition(item: CreateComponentType | CreateComponentGroupType, isForward: boolean): void {
const index = this.fetchTargetIndex(item.id) const index = this.fetchTargetIndex(item.id)
if (index > -1) { if (index > -1) {
const componentInstance = this.getComponentList[index] const componentInstance = this.getComponentList[index]
@ -556,7 +556,7 @@ export const useChartEditStore = defineStore({
const isMove = HistoryItem.actionType === HistoryActionTypeEnum.MOVE const isMove = HistoryItem.actionType === HistoryActionTypeEnum.MOVE
if (isMove) { if (isMove) {
historyData.forEach(item => { historyData.forEach(item => {
this.resetComponentPostion(item, isForward) this.resetComponentPosition(item, isForward)
}) })
return return
} }
@ -598,7 +598,7 @@ export const useChartEditStore = defineStore({
ids.push(item.id) ids.push(item.id)
}) })
} else { } else {
(historyData[0] as CreateComponentGroupType).groupList.forEach(item => { ;(historyData[0] as CreateComponentGroupType).groupList.forEach(item => {
ids.push(item.id) ids.push(item.id)
}) })
} }