Skip to content

Commit e1ebfe9

Browse files
committed
change tableLayoutsConf switch interface
1 parent 84ca4dd commit e1ebfe9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Skeleton.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ const currentLayoutId = ref<string>(tableLayoutsConf[0].id)
2323
2424
watch(tableLayoutsConf, () => {
2525
// Reset the current layout after the layout is deleted
26-
if (tableLayoutsConf.findIndex(layout => layout.id === currentLayoutId.value) === -1) {
27-
currentLayoutId.value = tableLayoutsConf[0].id
28-
}
26+
currentLayoutId.value = tableLayoutsConf[tableLayoutsConf.length - 1] && tableLayoutsConf[tableLayoutsConf.length - 1].id
2927
})
3028
3129
Event.init(tableBasicConf, tableLayoutsConf, currentLayoutId, props.events)

0 commit comments

Comments
 (0)