| | |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/soulTable.slim.js"></script> |
| | | <script src="../../../layuiadmin/zy_DragObserver.js"></script> |
| | | <style> |
| | | /* 鲿¢ä¸ææ¡ç䏿å表被éè---å¿
须设置--- */ |
| | | /*.layui-table-cell { |
| | |
| | | } |
| | | form.render('checkbox'); |
| | | form.render('select'); |
| | | |
| | | registerDragObserver() |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | var colTitleNames = colTitleName.split(','); |
| | |
| | | console.log(table.cache["mainTable"]) // æ¹å¨åæ°æ®ç´¢å¼ |
| | | } |
| | | } |
| | | , done: function () { |
| | | , done: function (res, curr, count) { |
| | | |
| | | soulTable.render(this) |
| | | } |
| | | }; |
| | |
| | | }) |
| | | } |
| | | |
| | | //// æ³¨åææ½è§å¯è
ï¼çå¬è¡¨æ ¼ææ½åå |
| | | function registerDragObserver() { |
| | | |
| | | // 妿䏿¯æï¼åä»ä¹é½ä¸æ§è¡ |
| | | if (typeof window.MutationObserver === 'undefined' |
| | | && typeof window.WebKitMutationObserver === 'undefined') { |
| | | console.warn('observer not supported') |
| | | return |
| | | } |
| | | let targetEl = $(".layui-table-box")[0]; |
| | | let config = { attributes: true, childList: true, subtree: true }; |
| | | let observer = new MutationObserver(mutations => { |
| | | mutations.forEach(function (mutation) { |
| | | if (mutation.attributeName === 'class') { |
| | | // çå¬classä¸å
容çåå |
| | | if ($(mutation.target).hasClass('noselect')) { |
| | | document.documentElement.style.userSelect = 'none'; |
| | | document.documentElement.style.webkitUserSelect = 'none'; |
| | | } else { |
| | | document.documentElement.style.userSelect = ''; |
| | | document.documentElement.style.webkitUserSelect = ''; |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | observer.observe(targetEl, config); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | }); |
| | | |
| | | |
| | | </script> |