* [task#126413] optimize linkage display issues thinkmatrixoptions wodget.

This commit is contained in:
wangzemei
2024-08-26 11:07:53 +08:00
committed by 刘刚
parent 7d92ae54b0
commit 3eb73b52b6
+5 -2
View File
@@ -116,6 +116,7 @@ class ThinkMatrixOptions extends zui.Component
if(!dropName || dragName === dropName) return;
if(this.dropSide === 'right') this.moveAfter(dragName, dropName);
else this.moveBefore(dragName, dropName);
this.saveData(true);
},
onDragOver: (event, dragElement, dropElement) =>
{
@@ -165,7 +166,7 @@ class ThinkMatrixOptions extends zui.Component
});
}
saveData()
saveData(isClear = false)
{
if(!this.options.isSaveData) return;
@@ -179,6 +180,7 @@ class ThinkMatrixOptions extends zui.Component
}
});
$('.required-options .picker-box').zui('picker').render({items: cols});
if(isClear) $('.required-options .picker-box').zui('picker').$.setValue('');
}
getByID(id)
@@ -355,8 +357,9 @@ class ThinkMatrixOptions extends zui.Component
if(index > -1) siblings.splice(index, 1);
}
if (!this._items.length) this.update(['1'], false);
const inputValue = this.$element.find(`.think-multiple-item[data-id="${item.id}"] .think-multiple-item-text`).val();
this.render();
this.saveData();
this.saveData(!!inputValue);
}
focus(name)