refactor: tab支持图层侧拖拽排序

This commit is contained in:
wangjiahao 2024-11-28 15:29:52 +08:00
parent ac4f18810b
commit 9f95018a61
2 changed files with 2 additions and 10 deletions

View File

@ -13,7 +13,7 @@
<el-color-picker <el-color-picker
:effect="themes" :effect="themes"
v-model="seniorStyleSetting.linkageIconColor" v-model="seniorStyleSetting.linkageIconColor"
:trigger-width="197" :trigger-width="100"
is-custom is-custom
:predefine="state.predefineColors" :predefine="state.predefineColors"
@change="themeChange" @change="themeChange"
@ -30,7 +30,7 @@
<el-color-picker <el-color-picker
v-model="seniorStyleSetting.drillLayerColor" v-model="seniorStyleSetting.drillLayerColor"
:effect="themes" :effect="themes"
:trigger-width="197" :trigger-width="100"
is-custom is-custom
:predefine="state.predefineColors" :predefine="state.predefineColors"
@change="themeChange" @change="themeChange"

View File

@ -74,14 +74,6 @@ const closeEditComponentName = () => {
const dragOnEnd = ({ oldIndex, newIndex }) => { const dragOnEnd = ({ oldIndex, newIndex }) => {
const source = componentData.value[newIndex] const source = componentData.value[newIndex]
const comLength = componentData.value.length
//
componentData.value.splice(newIndex, 1)
componentData.value.splice(oldIndex, 0, source)
const target = componentData.value[comLength - 1 - oldIndex]
//
componentData.value.splice(comLength - 1 - oldIndex, 1)
componentData.value.splice(comLength - 1 - newIndex, 0, target)
dvMainStore.setCurTabName(source.title) dvMainStore.setCurTabName(source.title)
eventBus.emit('onTabSortChange-' + tabElement.value?.id) eventBus.emit('onTabSortChange-' + tabElement.value?.id)
snapshotStore.recordSnapshotCache() snapshotStore.recordSnapshotCache()