fix: 修复题型拖拽移动问题 (#218)

This commit is contained in:
alwayrun 2024-05-29 21:35:43 +08:00 committed by sudoooooo
parent 1bd2968982
commit ea342a0d0b

View File

@ -87,11 +87,17 @@ export default defineComponent({
}
const checkEnd = ({ oldIndex, newIndex }) => {
emit('changeSeq', {
type: 'move',
index: oldIndex,
range: newIndex - oldIndex
})
if (oldIndex !== newIndex) {
emit('changeSeq', {
type: 'move',
index: newIndex,
range: 0
})
if (props.currentEditOne === oldIndex) {
emit('select', newIndex)
}
}
}
const instance = getCurrentInstance()