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

This commit is contained in:
alwayrun 2024-05-29 21:35:43 +08:00 committed by GitHub
parent df49b8f692
commit b18677e709
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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