This commit is contained in:
ly19960718 2021-07-28 17:53:24 +08:00
parent 8b1203510f
commit 391914ee0b

View File

@ -74,6 +74,7 @@
</div> </div>
</div> </div>
<div class="layui-col-lg3" id="rightContainer"> <div class="layui-col-lg3" id="rightContainer">
<div class="layui-form-item" pane > <div class="layui-form-item" pane >
<label class="layui-form-label">字段列名<span style="color: red">*</span></label> <label class="layui-form-label">字段列名<span style="color: red">*</span></label>
<div class="layui-input-block"> <div class="layui-input-block">
@ -502,15 +503,21 @@
// 排序 // 排序
var container = document.getElementById("container"); var container = document.getElementById("container");
var sort = Sortable.create(container, { var sort = Sortable.create(container, {
animation: 30, // ms, animation speed moving items when sorting, `0` — without animation animation: 150, // ms, animation speed moving items when sorting, `0` — without animation
handle: ".module1", // Restricts sort start click/touch to the specified element handle: ".module1", // Restricts sort start click/touch to the specified element
draggable: ".module1", // Specifies which items inside the element should be sortable draggable: ".module1", // Specifies which items inside the element should be sortable
onUpdate: function (evt){ onUpdate: function (evt){
console.log(evt); console.log(evt);
console.log(evt.item); console.log(evt.item);
console.log(evt.nextSibling); console.log(evt.nextSibling);
},
onChoose: function (evt) {
console.log("点击")
console.log(evt.item.id)
evt.oldIndex; // element index within parent
},
}
}); });
form.render(null, 'dataForm'); form.render(null, 'dataForm');
}, function(code, data) { }, function(code, data) {