* [task#126413] optimize linkage display issues thinkmatrixoptions wodget.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user