tableSelect.js 插件,判断 table 中是否存在 where 搜索条件

This commit is contained in:
wolfcode
2023-04-25 11:02:20 +08:00
parent 35a338e11e
commit 1a5e7278fe

View File

@@ -200,6 +200,12 @@ layui.define(['table', 'jquery', 'form'], function (exports) {
//关键词搜索 //关键词搜索
form.on('submit(tableSelect_btn_search)', function (data) { form.on('submit(tableSelect_btn_search)', function (data) {
// 判断 table 中是否存在 where 搜索条件
if (opt.table.where) {
$.each(opt.table.where, function (index, item) {
data.field[index] = item
});
}
tableSelect_table.reload({ tableSelect_table.reload({
where: data.field, where: data.field,
page: { page: {