问题描述
$(".structure-draggable").sortable({ connectWith: "#dashboardwidget-container,.widgetplace",forcePlaceholderSize:真, 句柄:'div', 不透明度:0.6, 光标:'移动', 容差:“指针”, 助手:函数(事件,用户界面){ var copyHelper = ui.clone().insertAfter(ui); 返回 ui.clone(); },
stop: function (event,ui) {
$("#dashboardwidget-container .blocks-droppable-items-place").addClass('widgetplace');
$("#dashboardwidget-container .structuretoDelete ").addClass('h-100p');
var strlen = $(event.target).find('.droppablePlaceCol').length
for (var i = 0; i < strlen; i++) {
let SortedItem = $($(event.target).find('.droppablePlaceCol')[i]).attr("id");
var Strcon = Math.random().toString(32).substring(8);
var StructureCount = SortedItem + '_' + Strcon;
***strong text*** //$('#dashboardwidget-container .structuretoDelete ').addClass('str_' + Strcon + '');
$('#dashboardwidget-container #' + SortedItem + ' ').attr("id",StructureCount);
$("#dashboardwidget-container .blocks-droppable-items-place").removeClass("border-2 border-primary");
$("#dashboardwidget-container .card").addClass("mb-0");
$("#dashboardwidget-container .droppablePlaceCol").addClass("p-0 ").removeClass("p-1 ");
var structureContent = " <div class='p-2 structureContent text-center w-50 mx-auto '>Drag your Widget Here </div>"
$('#' + StructureCount + ' .widgetplace').html(structureContent);
//$("#dashboardwidget-container .structuretoDelete ").addClass('TapToDelete');
}
},})
// 小部件可排序 $(".sortableWidgetList").sortable({ connectWith: '.widgetplace,#tab-container',光标:'移动', 容差:“指针”, 占位符:“ui-state-highlight”, 助手:函数(e,li){ const copyHelper = li.clone().insertAfter(li); 返回 li.clone(); },开始:功能(事件,用户界面){ //$(".divNewWidgetListContainer").css("overflow-y","hidden"); $('.divNewWidgetListContainer').removeAttr("style");
},stop: function (event,ui) {
//copyHelper && copyHelper.remove();
$(".divNewWidgetListContainer").css("overflow-y","auto");
$('.droppablePlaceCol ').each(function (i,e) {
if ($(e).find(' .dashboardwidget-item').length > 0) {
$(e).find('.structureContent').remove();
}
});
//$(".divNewWidgetListContainer").css("height","709px");
},});[enter image description here][1]
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)