实现view的扩展架构;调整think-view依赖;发布新版本

This commit is contained in:
2023-09-25 10:35:03 +08:00
parent 9f43e11f81
commit 5955a03d2c
94 changed files with 244 additions and 48 deletions

View File

@@ -0,0 +1,32 @@
$(function () {
var tree = layui.tree;
ua.request.get(
{
url: window.location.href,
}, function (res) {
res.data = res.data || [];
tree.render({
elem: '#node_ids',
data: res.data,
showCheckbox: true,
id: 'nodeDataId',
});
}
);
ua.listen(function (data) {
var checkedData = tree.getChecked('nodeDataId');
var ids = [];
$.each(checkedData, function (i, v) {
ids.push(v.id);
if (v.children !== undefined && v.children.length > 0) {
$.each(v.children, function (ii, vv) {
ids.push(vv.id);
});
}
});
data.node = JSON.stringify(ids);
return data;
});
});