MCPcopy
hub / github.com/layui/layui / openPanel

Function openPanel

src/modules/table.js:2702–2725  ·  view source on GitHub ↗
(sets)

Source from the content-addressed store, hash-verified

2700
2701 // 弹出工具下拉面板
2702 var openPanel = function (sets) {
2703 var list = $(sets.list);
2704 var panel = $('<ul class="' + ELEM_TOOL_PANEL + '"></ul>');
2705
2706 panel.html(list);
2707
2708 // 限制最大高度
2709 if (options.height) {
2710 panel.css(
2711 'max-height',
2712 options.height - (that.layTool.outerHeight() || 50)
2713 );
2714 }
2715
2716 // 插入元素
2717 othis.find('.' + ELEM_TOOL_PANEL)[0] || othis.append(panel);
2718 that.renderForm({ elem: panel });
2719
2720 panel.on('click', function (e) {
2721 layui.stope(e);
2722 });
2723
2724 sets.done && sets.done(panel, list);
2725 };
2726
2727 layui.stope(e);
2728 _DOC.trigger('table.tool.panel.remove');

Callers 1

table.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected