diff --git a/public/assets/css/backend.css b/public/assets/css/backend.css index 924a01a0..f967a6a8 100644 --- a/public/assets/css/backend.css +++ b/public/assets/css/backend.css @@ -995,6 +995,20 @@ table.table-nowrap thead > tr > th { .wipecache li a { color: #444444 !important; } +div.pre { + display: block; + padding: 5px; + margin: 0 0 5px; + font-size: 11px; + line-height: 1.42857143; + word-break: break-all; + word-wrap: break-word; + color: #333333; + background-color: #f5f5f5; + border: 1px solid #ccc; + border-radius: 3px; + text-align: left; +} /*修正开关关闭下的颜色值*/ .btn-switcher.disabled { opacity: .6; diff --git a/public/assets/js/require-table.js b/public/assets/js/require-table.js index d865c3bf..197fcf65 100644 --- a/public/assets/js/require-table.js +++ b/public/assets/js/require-table.js @@ -130,6 +130,9 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table } //当内容渲染完成后 table.on('post-body.bs.table', function (e, settings, json, xhr) { + var ScrollHeight = self == top ? $(window).height() : $('.content-wrapper', parent.document).height(); + table.closest('#main').height(ScrollHeight); + table.closest('.slimScrollDiv').height(ScrollHeight); $(Table.config.refreshbtn, toolbar).find(".fa").removeClass("fa-spin"); $(Table.config.disabledbtn, toolbar).toggleClass('disabled', true); if ($(Table.config.firsttd, table).find("input[type='checkbox'][data-index]").size() > 0) { @@ -159,6 +162,11 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table }); }); } + if (table.find("div.pre").size() > 0) { + require(['slimscroll'], function () { + $('div.pre').slimScroll({width: '300px', height: '50px'}); + }); + } }); // 处理选中筛选框后按钮的状态统一变更 table.on('check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table', function () {