数据列表更多操作容器自动处理
parent
816f5b288d
commit
5613f98b90
|
|
@ -24,6 +24,7 @@ return [
|
|||
'error_text' => '异常错误',
|
||||
'reminder_title' => '温馨提示',
|
||||
'operate_params_error' => '操作参数有误',
|
||||
'not_operate_error' => '没有相关操作',
|
||||
'select_reverse_name' => '反选',
|
||||
'select_all_name' => '全选',
|
||||
'loading_tips' => '加载中...',
|
||||
|
|
|
|||
|
|
@ -798,8 +798,9 @@ button.colorpicker-submit img {
|
|||
* 表格-操作栏更多操作列表样式
|
||||
*/
|
||||
.am-table-scrollable-horizontal .am-table tr .am-operate-grid-more-list .am-dropdown-content {
|
||||
padding: 10px;
|
||||
width: 140px;
|
||||
padding: 10px 5px;
|
||||
width: 75px;
|
||||
text-align: center;
|
||||
min-width: auto;
|
||||
-webkit-box-shadow: 0px -2px 10px rgb(136 136 136 / 40%);
|
||||
-moz-box-shadow: 0px -2px 10px rgb(136 136 136 / 0.4);
|
||||
|
|
|
|||
|
|
@ -2106,6 +2106,30 @@ function FormTableContainerInit()
|
|||
$(this).find('.am-grid-fixed-left').last().addClass('am-grid-fixed-left-shadow');
|
||||
$(this).find('.am-grid-fixed-right').first().addClass('am-grid-fixed-right-shadow');
|
||||
});
|
||||
|
||||
// 右侧操作栏更多按钮显示容器宽度处理
|
||||
$('.am-table-scrollable-horizontal .am-table tr .am-operate-grid-more-list button.am-dropdown-toggle').on('click', function()
|
||||
{
|
||||
var $parent = $(this).parent();
|
||||
var length = $parent.find('.am-dropdown-content .am-badge').length;
|
||||
if(length == 0)
|
||||
{
|
||||
Prompt(window['lang_not_operate_error'] || '没有相关操作', 'warning');
|
||||
$parent.removeClass('am-active');
|
||||
$parent.find('.am-dropdown-content').remove();
|
||||
} else {
|
||||
if(length > 1)
|
||||
{
|
||||
var width = ((length-1)*10)+30;
|
||||
$parent.find('.am-dropdown-content .am-badge').each(function(k, v)
|
||||
{
|
||||
width += $(this).outerWidth();
|
||||
});
|
||||
$parent.find('.am-dropdown-content').css('width', width+'px');
|
||||
}
|
||||
$parent.addClass('am-dropdown-flip');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue