mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-09 03:22:51 +08:00
修复使用table的fixed时,高度不一致的错误;
This commit is contained in:
@@ -48,6 +48,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
|
|||||||
width: 250,
|
width: 250,
|
||||||
title: '操作',
|
title: '操作',
|
||||||
templet: ea.table.tool,
|
templet: ea.table.tool,
|
||||||
|
fixed: 'right',
|
||||||
operat: [
|
operat: [
|
||||||
[{
|
[{
|
||||||
text: '编辑',
|
text: '编辑',
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
|
|||||||
{
|
{
|
||||||
width: 250,
|
width: 250,
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
fixed:'right',
|
||||||
templet: ea.table.tool,
|
templet: ea.table.tool,
|
||||||
operat: [
|
operat: [
|
||||||
'edit',
|
'edit',
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ define(["jquery", "easy-admin", "treetable", "iconPickerFa", "autocomplete"], fu
|
|||||||
{
|
{
|
||||||
width: 200,
|
width: 200,
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
templet: ea.table.tool,
|
templet: ea.table.tool,
|
||||||
operat: [
|
operat: [
|
||||||
[{
|
[{
|
||||||
@@ -82,6 +83,12 @@ define(["jquery", "easy-admin", "treetable", "iconPickerFa", "autocomplete"], fu
|
|||||||
]], init),
|
]], init),
|
||||||
done: function () {
|
done: function () {
|
||||||
layer.closeAll('loading');
|
layer.closeAll('loading');
|
||||||
|
|
||||||
|
$(".layui-table-main tr").each(function (index, val) {
|
||||||
|
$(".layui-table-fixed").each(function () {
|
||||||
|
$($(this).find(".layui-table-body tbody tr")[index]).height($(val).height());
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
|
|||||||
{field: 'mime_type', minWidth: 80, title: 'mime类型'},
|
{field: 'mime_type', minWidth: 80, title: 'mime类型'},
|
||||||
{field: 'file_ext', minWidth: 80, title: '文件后缀'},
|
{field: 'file_ext', minWidth: 80, title: '文件后缀'},
|
||||||
{field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'},
|
{field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'},
|
||||||
{width: 250, title: '操作', templet: ea.table.tool, operat: ['delete']}
|
{width: 250, title: '操作', templet: ea.table.tool, operat: ['delete'],fixed:'right'}
|
||||||
]],
|
]],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,6 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
|
|
||||||
var table2card = function () {
|
var table2card = function () {
|
||||||
|
|
||||||
|
|
||||||
if (admin.checkMobile()) {
|
if (admin.checkMobile()) {
|
||||||
var domTable = $('[lay-id="' + options.id + '"]');
|
var domTable = $('[lay-id="' + options.id + '"]');
|
||||||
|
|
||||||
@@ -236,6 +235,14 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var tableFixedAutoHeight = function () {
|
||||||
|
$(".layui-table-main tr").each(function (index, val) {
|
||||||
|
$(".layui-table-fixed").each(function () {
|
||||||
|
$($(this).find(".layui-table-body tbody tr")[index]).height($(val).height());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var optionDone = function () { }
|
var optionDone = function () { }
|
||||||
if (options.done != undefined) {
|
if (options.done != undefined) {
|
||||||
optionDone = options.done;
|
optionDone = options.done;
|
||||||
@@ -243,6 +250,9 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
options.done = function () {
|
options.done = function () {
|
||||||
optionDone()
|
optionDone()
|
||||||
table2card()
|
table2card()
|
||||||
|
tableFixedAutoHeight()
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断是否为移动端
|
// 判断是否为移动端
|
||||||
|
|||||||
Reference in New Issue
Block a user