mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-08 02:52:49 +08:00
优化表格转卡片底层逻辑,不再占用表格配置项done
This commit is contained in:
@@ -209,7 +209,8 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
extend: 'data-table-id="' + options.id + '"'
|
extend: 'data-table-id="' + options.id + '"'
|
||||||
}];
|
}];
|
||||||
|
|
||||||
options.done = function () {
|
var table2card = function () {
|
||||||
|
|
||||||
|
|
||||||
if (admin.checkMobile()) {
|
if (admin.checkMobile()) {
|
||||||
var domTable = $('[lay-id="' + options.id + '"]');
|
var domTable = $('[lay-id="' + options.id + '"]');
|
||||||
@@ -231,9 +232,17 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
$('<div class="data-item">' + colsHeader[indexTd] + '</div>').insertBefore($(domTd).find('.layui-table-cell'))
|
$('<div class="data-item">' + colsHeader[indexTd] + '</div>').insertBefore($(domTd).find('.layui-table-cell'))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var optionDone = function (){}
|
||||||
|
if (options.done != undefined) {
|
||||||
|
optionDone = options.done;
|
||||||
|
}
|
||||||
|
options.done = function(){
|
||||||
|
optionDone()
|
||||||
|
table2card()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断是否为移动端
|
// 判断是否为移动端
|
||||||
|
|||||||
Reference in New Issue
Block a user