Merge pull request #1162 from sunxiaobin89/main

修复table的height配置#divid-差值的设定中如果divid出现横杆的话无法命中的问题
This commit is contained in:
贤心 2022-11-08 16:54:16 +08:00 committed by GitHub
commit c11d72cdee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -376,7 +376,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
if(options.height && /^full-\d+$/.test(options.height)){
that.fullHeightGap = options.height.split('-')[1];
options.height = _WIN.height() - that.fullHeightGap;
} else if (options.height && /^#\w+-{1}\d+$/.test(options.height)) {
} else if (options.height && /^#\w+\S*-\d+$/.test(options.height)) {
var parentDiv = options.height.split("-");
that.parentHeightGap = parentDiv.pop();
that.parentDiv = parentDiv.join("-");