fix: 格式
This commit is contained in:
parent
abaf8f07ad
commit
c3096ed486
@ -32,7 +32,7 @@ export const useChartEditStoreStore = defineStore({
|
|||||||
height: 1080,
|
height: 1080,
|
||||||
// 偏移量
|
// 偏移量
|
||||||
offset: 20,
|
offset: 20,
|
||||||
// 系统控制缩放
|
// 系统控制缩放
|
||||||
scale: 1,
|
scale: 1,
|
||||||
// 用户控制的缩放
|
// 用户控制的缩放
|
||||||
userScale: 1,
|
userScale: 1,
|
||||||
@ -112,7 +112,7 @@ export const useChartEditStoreStore = defineStore({
|
|||||||
* @param chartData 新图表实例
|
* @param chartData 新图表实例
|
||||||
* @param isEnd 是否末端插入
|
* @param isEnd 是否末端插入
|
||||||
* @param isHistory 是否进行记录
|
* @param isHistory 是否进行记录
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
addComponentList(chartData: CreateComponentType, isEnd = false, isHistory = false): void {
|
addComponentList(chartData: CreateComponentType, isEnd = false, isHistory = false): void {
|
||||||
if(isHistory) {
|
if(isHistory) {
|
||||||
@ -159,7 +159,7 @@ export const useChartEditStoreStore = defineStore({
|
|||||||
try {
|
try {
|
||||||
loadingStart()
|
loadingStart()
|
||||||
const length = this.getComponentList.length
|
const length = this.getComponentList.length
|
||||||
if(length < 2) {
|
if(length < 2) {
|
||||||
loadingFinish()
|
loadingFinish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -167,7 +167,7 @@ export const useChartEditStoreStore = defineStore({
|
|||||||
const index = this.fetchTargetIndex()
|
const index = this.fetchTargetIndex()
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
// 置底排除最底层, 置顶排除最顶层
|
// 置底排除最底层, 置顶排除最顶层
|
||||||
if ((isEnd && index === 0) || (!isEnd && index === length - 1 )) {
|
if ((isEnd && index === 0) || (!isEnd && index === length - 1 )) {
|
||||||
loadingFinish()
|
loadingFinish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -195,7 +195,7 @@ export const useChartEditStoreStore = defineStore({
|
|||||||
try {
|
try {
|
||||||
loadingStart()
|
loadingStart()
|
||||||
const length = this.getComponentList.length
|
const length = this.getComponentList.length
|
||||||
if (length < 2) {
|
if (length < 2) {
|
||||||
loadingFinish()
|
loadingFinish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -211,7 +211,7 @@ export const useChartEditStoreStore = defineStore({
|
|||||||
const swapIndex = isDown ? index - 1 : index + 1
|
const swapIndex = isDown ? index - 1 : index + 1
|
||||||
const targetItem = this.getComponentList[index]
|
const targetItem = this.getComponentList[index]
|
||||||
const swapItem = this.getComponentList[swapIndex]
|
const swapItem = this.getComponentList[swapIndex]
|
||||||
|
|
||||||
chartHistoryStoreStore.createLaryerHistory(targetItem)
|
chartHistoryStoreStore.createLaryerHistory(targetItem)
|
||||||
this.updateComponentList(index, swapItem)
|
this.updateComponentList(index, swapItem)
|
||||||
this.updateComponentList(swapIndex, targetItem)
|
this.updateComponentList(swapIndex, targetItem)
|
||||||
@ -294,7 +294,7 @@ export const useChartEditStoreStore = defineStore({
|
|||||||
this.setRecordChart(undefined)
|
this.setRecordChart(undefined)
|
||||||
}
|
}
|
||||||
loadingFinish()
|
loadingFinish()
|
||||||
} catch(value) {
|
} catch(value) {
|
||||||
loadingError()
|
loadingError()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -321,12 +321,12 @@ export const useChartEditStoreStore = defineStore({
|
|||||||
this.setBackAndSetForwardHandle(e)
|
this.setBackAndSetForwardHandle(e)
|
||||||
})
|
})
|
||||||
loadingFinish()
|
loadingFinish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.setBackAndSetForwardHandle(targetData)
|
this.setBackAndSetForwardHandle(targetData)
|
||||||
loadingFinish()
|
loadingFinish()
|
||||||
|
|
||||||
} catch(value) {
|
} catch(value) {
|
||||||
loadingError()
|
loadingError()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -345,12 +345,12 @@ export const useChartEditStoreStore = defineStore({
|
|||||||
this.setBackAndSetForwardHandle(e, true)
|
this.setBackAndSetForwardHandle(e, true)
|
||||||
})
|
})
|
||||||
loadingFinish()
|
loadingFinish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.setBackAndSetForwardHandle(targetData, true)
|
this.setBackAndSetForwardHandle(targetData, true)
|
||||||
loadingFinish()
|
loadingFinish()
|
||||||
|
|
||||||
} catch(value) {
|
} catch(value) {
|
||||||
loadingError()
|
loadingError()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user