mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
优化lay-submit特性,支持btn上设置name和value
This commit is contained in:
@@ -12,12 +12,12 @@ use think\console\Output;
|
||||
|
||||
class VersionBase extends Command
|
||||
{
|
||||
public const VERSION = 'v2.0.68';
|
||||
public const VERSION = 'v2.0.67';
|
||||
|
||||
public const LAYUI_VERSION = '2.8.17';
|
||||
|
||||
public const COMMENT = [
|
||||
'删除错误的引入;优化目录创建',
|
||||
'优化lay-submit特性,支持btn上设置name和value',
|
||||
'发布新版本',
|
||||
];
|
||||
|
||||
|
||||
@@ -1890,6 +1890,16 @@
|
||||
url = admin.url(url);
|
||||
}
|
||||
form.on('submit(' + filter + ')', function (data) {
|
||||
|
||||
var btnElem = data.elem;
|
||||
|
||||
// 判断btn是否具备name和value属性,如果有,则加到表单数据里
|
||||
var btnName = $(btnElem).attr('name');
|
||||
var btnValue = $(btnElem).attr('value');
|
||||
if (btnName !== undefined && btnValue !== undefined) {
|
||||
data.field[btnName] = btnValue;
|
||||
}
|
||||
|
||||
var dataField = data.field;
|
||||
|
||||
dataField = admin.api.formSubmitEditor(dataField, v);
|
||||
|
||||
Reference in New Issue
Block a user