修复 laydate 开启 `shade` 后,遮罩 `z-index` 未能正确计算的问题

pull/1220/head
贤心 2023-03-26 14:49:45 +08:00
parent fab6f817fd
commit 012ae89104
1 changed files with 1 additions and 1 deletions

View File

@ -663,7 +663,7 @@
,that.position() //定位
);
var shade = options.shade ? ('<div class="'+ ELEM_SHADE +'" style="'+ ('z-index:'+ (elem.style.zIndex-1) +'; background-color: ' + (options.shade[1] || '#000') + '; opacity: ' + (options.shade[0] || options.shade)) +'"></div>') : '';
var shade = options.shade ? ('<div class="'+ ELEM_SHADE +'" style="'+ ('z-index:'+ (parseInt(layui.getStyle(elem, 'z-index'))-1) +'; background-color: ' + (options.shade[1] || '#000') + '; opacity: ' + (options.shade[0] || options.shade)) +'"></div>') : '';
elem.insertAdjacentHTML('beforebegin', shade);
that.checkDate().calendar(null, 0, 'init'); //初始校验