mirror of https://github.com/layui/layui
新增 laydate 快捷选择 `shortcuts.value `选项函数类型支持
parent
f428eceb6c
commit
0dc95b4ee9
|
@ -591,7 +591,9 @@
|
||||||
return shortcutBtns.join('');
|
return shortcutBtns.join('');
|
||||||
}()).find('li').on('click', function (event) {
|
}()).find('li').on('click', function (event) {
|
||||||
var btnSetting = options.shortcuts[this.dataset['index']] || {};
|
var btnSetting = options.shortcuts[this.dataset['index']] || {};
|
||||||
var value = btnSetting.value || [];
|
var value = (typeof btnSetting.value === 'function'
|
||||||
|
? btnSetting.value()
|
||||||
|
: btnSetting.value) || [];
|
||||||
if (!layui.isArray(value)) {
|
if (!layui.isArray(value)) {
|
||||||
value = [value];
|
value = [value];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue