Merge pull request #1166 from layui/main

同步最新若干 PR 到 2.x
This commit is contained in:
贤心 2022-11-14 00:54:18 +08:00 committed by GitHub
commit 3251c0f1bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View File

@ -98,7 +98,7 @@ html #layuicss-laydate{display: none; position: absolute; width: 1989px;}
/* 双日历 */
.layui-laydate-range{width: 546px;}
.layui-laydate-range .layui-laydate-main{display: inline-block; vertical-align: middle;}
.layui-laydate-range .layui-laydate-main{display: inline-block; vertical-align: middle;width:50%;}
.layui-laydate-range .laydate-main-list-1 .layui-laydate-header,
.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left: 1px solid #e2e2e2;}

View File

@ -208,13 +208,13 @@ layui.define(['layer', 'util'], function(exports){
// 密码显隐
,eye: [function(){ // 渲染
renderSuffix('eye');
renderSuffix('eye-invisible');
}, function(){ // 事件
var SHOW_NAME = 'LAY_FORM_INPUT_AFFIX_SHOW';
var isShow = othis.data(SHOW_NAME);
othis.attr('type', isShow ? 'password' : 'text').data(SHOW_NAME, !isShow);
renderSuffix(isShow ? 'eye' : 'eye-invisible');
renderSuffix(isShow ? 'eye-invisible' : 'eye');
}]
};

View File

@ -48,7 +48,7 @@ var isLayui = window.layui && layui.define, $, win, ready = {
var app = (cssname || href).replace(/\.|\//g, '');
var id = 'layuicss-'+ app
,STAUTS_NAME = 'creating'
,STATUS_NAME = 'creating'
,timeout = 0;
link.rel = 'stylesheet';
@ -74,13 +74,13 @@ var isLayui = window.layui && layui.define, $, win, ready = {
//css 加载就绪
if(parseInt(ready.getStyle(getLinkElem, 'width')) === 1989){
//如果参数来自于初始轮询(即未加载就绪时的),则移除 link 标签状态
if(status === STAUTS_NAME) getLinkElem.removeAttribute('lay-status');
if(status === STATUS_NAME) getLinkElem.removeAttribute('lay-status');
//如果 link 标签的状态仍为「创建中」,则继续进入轮询,直到状态改变,则执行回调
getLinkElem.getAttribute('lay-status') === STAUTS_NAME ? setTimeout(poll, delay) : fn();
getLinkElem.getAttribute('lay-status') === STATUS_NAME ? setTimeout(poll, delay) : fn();
} else {
getLinkElem.setAttribute('lay-status', STAUTS_NAME);
getLinkElem.setAttribute('lay-status', STATUS_NAME);
setTimeout(function(){
poll(STAUTS_NAME);
poll(STATUS_NAME);
}, delay);
}

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("-");