Merge branch 'main' into 2.x

pull/1740/head
贤心 2024-02-04 15:17:00 +08:00
commit e2a04fb838
9 changed files with 33 additions and 27 deletions

2
dist/layui.js vendored

File diff suppressed because one or more lines are too long

2
dist/layui.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -9,22 +9,27 @@ toc: true
<h2 id="2.9.x" lay-toc="{title: '2.9.x'}"></h2>
<h2 id="v2.9.4" class="ws-anchor">
v2.9.4
<h2 id="v2.9.6" class="ws-anchor">
v2.9.6
<!-- <span class="layui-badge-rim" style="color: #16b777;">稳定版</span> -->
<span class="layui-badge-rim">2024-01-18</span>
<span class="layui-badge-rim">2024-01-24</span>
</h2>
- #### table
- 新增 `table.updateRow` 方法 #1540 @Sight-wcg
- 新增 `table.updateRow` 方法,用于更新指定行 #1540 @Sight-wcg
- 修复 关闭展开状态时,未重置单元格滚动条位置的问题 #1536 @Sight-wcg
- 修复 Chrome DevTools 审查 iframe srcdoc 中的 table 元素时导致页面崩溃的问题 #1571
- ~~修复 Chrome DevTools 审查 iframe srcdoc 中的 table 元素时导致页面崩溃的问题~~ #1571
<br> Chrome 121.0.x 版本自身已修复 DevTools 导致的网页崩溃问题,因此上述补丁已在 v2.9.6 中移除 #1584
- #### laydate
- 优化 时间选择器在 Safari on iOS, Firefox for Android 中的滑动操作 #1550 @Sight-wcg
- #### slider
- 新增 `tipsAlways` 选项,用于设置提示文本是否始终显示 #1520 @yxb94616
### 下载: [layui-v2.9.4.zip](https://gitee.com/layui/layui/attach_files/1652197/download)
### 下载: [layui-v2.9.6.zip](https://gitee.com/layui/layui/attach_files/1660301/download)
---
`2.9.4 / 2.9.5` 版本因为存在缺陷而被跳过
---

View File

@ -1,6 +1,6 @@
{
"name": "layui",
"version": "2.9.4",
"version": "2.9.6",
"description": "Classic modular Front-End UI library",
"keywords": [
"layui",

View File

@ -16,7 +16,7 @@
};
var Layui = function(){
this.v = '2.9.4'; // Layui 版本号
this.v = '2.9.6'; // Layui 版本号
};
// 识别预先可能定义的指定全局对象

View File

@ -167,7 +167,7 @@ layui.define(['jquery', 'laytpl', 'lay', 'util'], function(exports){
if(options.data.length > 0 ){
eachItemView(elemUl, options.data)
} else {
elemUl.html('<li class="layui-menu-item-none">No data</li>');
elemUl.html('<li class="layui-menu-item-none">暂无数据</li>');
}
return elemUl;
};

View File

@ -33,7 +33,7 @@ var ready = {
events: {resize: {}},
minStackIndex: 0,
minStackArr: [],
btn: ['&#x786E;&#x5B9A;', '&#x53D6;&#x6D88;'],
btn: ['确定', '取消'],
// 五种原始层模式
type: ['dialog', 'page', 'iframe', 'loading', 'tips'],
@ -264,7 +264,7 @@ Class.pt.config = {
shade: 0.3,
fixed: true,
move: doms[1],
title: '&#x4FE1;&#x606F;',
title: '信息',
offset: 'auto',
area: 'auto',
closeBtn: 1,
@ -1331,7 +1331,7 @@ layer.prompt = function(options, yes){
return layer.open($.extend({
type: 1,
btn: ['&#x786E;&#x5B9A;','&#x53D6;&#x6D88;'],
btn: ['确定','取消'],
content: content,
skin: 'layui-layer-prompt' + skin('prompt'),
maxWidth: win.width(),
@ -1344,7 +1344,7 @@ layer.prompt = function(options, yes){
yes: function(index){
var value = prompt.val();
if(value.length > (options.maxlength||500)) {
layer.tips('&#x6700;&#x591A;&#x8F93;&#x5165;'+ (options.maxlength || 500) +'&#x4E2A;&#x5B57;&#x6570;', prompt, {tips: 1});
layer.tips('最多输入'+ (options.maxlength || 500) +'个字符', prompt, {tips: 1});
} else {
yes && yes(value, index, prompt);
}
@ -1460,7 +1460,7 @@ layer.photos = function(options, loop, key){
// 不直接弹出
if (!loop) return;
} else if (data.length === 0){
return layer.msg('&#x6CA1;&#x6709;&#x56FE;&#x7247;');
return layer.msg('没有图片');
}
// 上一张
@ -1745,9 +1745,9 @@ layer.photos = function(options, loop, key){
}, options));
}, function(){
layer.close(dict.loadi);
layer.msg('&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;', {
layer.msg('当前图片地址异常,<br>是否继续查看下一张?', {
time: 30000,
btn: ['&#x4E0B;&#x4E00;&#x5F20;', '&#x4E0D;&#x770B;&#x4E86;'],
btn: ['下一张', '不看了'],
yes: function(){
data.length > 1 && dict.imgnext(true,true);
}

View File

@ -72,8 +72,8 @@ layui.define(function(exports){
groups = config.pages;
}
config.prev = 'prev' in config ? config.prev : '&#x4E0A;&#x4E00;&#x9875;'; // 上一页文本
config.next = 'next' in config ? config.next : '&#x4E0B;&#x4E00;&#x9875;'; // 下一页文本
config.prev = 'prev' in config ? config.prev : '上一页'; // 上一页文本
config.next = 'next' in config ? config.next : '下一页'; // 下一页文本
// 计算当前组
var index = config.pages > groups
@ -100,7 +100,7 @@ layui.define(function(exports){
// 首页
if(index > 1 && config.first !== false && groups !== 0){
pager.push('<a class="layui-laypage-first" data-page="1" title="&#x9996;&#x9875;">'+ (config.first || 1) +'</a>');
pager.push('<a class="layui-laypage-first" data-page="1" title="首页">'+ (config.first || 1) +'</a>');
}
// 计算当前页码组的起始页
@ -118,7 +118,7 @@ layui.define(function(exports){
// 输出左分割符
if(config.first !== false && start > 2){
pager.push('<span class="layui-laypage-spr">&#x2026;</span>')
pager.push('<span class="layui-laypage-spr">...</span>')
}
// 输出连续页码
@ -134,10 +134,10 @@ layui.define(function(exports){
// 输出输出右分隔符 & 末页
if(config.pages > groups && config.pages > end && config.last !== false){
if(end + 1 < config.pages){
pager.push('<span class="layui-laypage-spr">&#x2026;</span>');
pager.push('<span class="layui-laypage-spr">...</span>');
}
if(groups !== 0){
pager.push('<a class="layui-laypage-last" title="&#x5C3E;&#x9875;" data-page="'+ config.pages +'">'+ (config.last || config.pages) +'</a>');
pager.push('<a class="layui-laypage-last" title="尾页" data-page="'+ config.pages +'">'+ (config.last || config.pages) +'</a>');
}
}
@ -189,9 +189,9 @@ layui.define(function(exports){
// 跳页区域
skip: function(){
var skipText = typeof config.skipText === 'object' ? config.skipText : [
'&#x5230;&#x7B2C;',
'&#x9875;',
'&#x786e;&#x5b9a;'
'到第',
'',
'确定'
];
return [
'<span class="layui-laypage-skip">'+ skipText[0],

View File

@ -2154,6 +2154,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
}).on('mouseleave', function(){
var othis = $(this);
if(thisTable.eventMoveElem) return;
dict.allowResize = false;
_BODY.css('cursor', '');
}).on('mousedown', function(e){
var othis = $(this);