|
|
|
@ -1268,7 +1268,8 @@
|
|
|
|
// 同步更改
|
|
|
|
// 同步更改
|
|
|
|
this.rows = rows
|
|
|
|
this.rows = rows
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.updateFormValues()
|
|
|
|
this.recalcSortNumber()
|
|
|
|
|
|
|
|
this.forceUpdateFormValues()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
// 触发 insert 事件
|
|
|
|
// 触发 insert 事件
|
|
|
|
this.$emit('inserted', {
|
|
|
|
this.$emit('inserted', {
|
|
|
|
@ -1911,12 +1912,19 @@
|
|
|
|
sort(this.rows)
|
|
|
|
sort(this.rows)
|
|
|
|
sort(this.inputValues)
|
|
|
|
sort(this.inputValues)
|
|
|
|
|
|
|
|
|
|
|
|
// 重置排序字段
|
|
|
|
this.recalcSortNumber()
|
|
|
|
this.inputValues.forEach((val, idx) => val[this.dragSortKey] = (idx + 1))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.forceUpdateFormValues()
|
|
|
|
this.forceUpdateFormValues()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 重新计算排序字段的数值 */
|
|
|
|
|
|
|
|
recalcSortNumber() {
|
|
|
|
|
|
|
|
if (this.dragSort) {
|
|
|
|
|
|
|
|
// 重置排序字段
|
|
|
|
|
|
|
|
this.inputValues.forEach((val, idx) => val[this.dragSortKey] = (idx + 1))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 当前行向上移一位 */
|
|
|
|
/** 当前行向上移一位 */
|
|
|
|
_handleRowMoveUp(rowIndex) {
|
|
|
|
_handleRowMoveUp(rowIndex) {
|
|
|
|
if (rowIndex > 0) {
|
|
|
|
if (rowIndex > 0) {
|
|
|
|
|