fix: 修复题型拖拽移动问题 (#218)
This commit is contained in:
parent
1bd2968982
commit
ea342a0d0b
@ -87,11 +87,17 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const checkEnd = ({ oldIndex, newIndex }) => {
|
const checkEnd = ({ oldIndex, newIndex }) => {
|
||||||
emit('changeSeq', {
|
if (oldIndex !== newIndex) {
|
||||||
type: 'move',
|
emit('changeSeq', {
|
||||||
index: oldIndex,
|
type: 'move',
|
||||||
range: newIndex - oldIndex
|
index: newIndex,
|
||||||
})
|
range: 0
|
||||||
|
})
|
||||||
|
|
||||||
|
if (props.currentEditOne === oldIndex) {
|
||||||
|
emit('select', newIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const instance = getCurrentInstance()
|
const instance = getCurrentInstance()
|
||||||
|
Loading…
Reference in New Issue
Block a user