mirror of https://github.com/layui/layui
发布 v2.9.0-rc.3
commit
b47e652661
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -137,7 +137,7 @@ toc: true
|
|||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="{{= d.layui.cdn.css }}" rel="stylesheet">
|
||||
<link href="{{= d.layui[2].cdn.css }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-text" style="padding: 16px;">
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="{{= d.layui.cdn.css }}" rel="stylesheet">
|
||||
<link href="{{= d.layui[2].cdn.css }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div id="target-test" style="position: relative; padding: 16px;">
|
||||
页<br>面<br>内<br>容<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。<br>。
|
||||
</div>
|
||||
|
||||
<script src="{{= d.layui.cdn.js }}"></script>
|
||||
<script src="{{= d.layui[2].cdn.js }}"></script>
|
||||
<script>
|
||||
layui.use(function(){
|
||||
var util = layui.util;
|
||||
|
|
|
@ -142,7 +142,7 @@ form 还可以借助*栅格*实现更灵活的响应式布局。
|
|||
layui.use(function(){
|
||||
var form = layui.form;
|
||||
|
||||
// 当表单元素被插入插入时,需进行组件渲染才能显示
|
||||
// 当表单元素被动态插入时,需主动进行组件渲染才能显示
|
||||
form.render(); // 渲染全部表单
|
||||
form.render('select'); // 仅渲染 select 元素
|
||||
form.render(null, 'test'); // 仅渲染 lay-filter="test" 的容器内的全部表单
|
||||
|
|
|
@ -70,11 +70,11 @@ npm i layui
|
|||
|
||||
```
|
||||
<!-- 引入 layui.css -->
|
||||
<link href="//unpkg.com/layui@{{= d.layui.v }}/dist/css/layui.css" rel="stylesheet">
|
||||
<link href="//unpkg.com/layui@{{= d.layui[2].v }}/dist/css/layui.css" rel="stylesheet">
|
||||
```
|
||||
```
|
||||
<!-- 引入 layui.js -->
|
||||
<script src="//unpkg.com/layui@{{= d.layui.v }}/dist/layui.js"></script>
|
||||
<script src="//unpkg.com/layui@{{= d.layui[2].v }}/dist/layui.js"></script>
|
||||
```
|
||||
|
||||
<h2 id="quickstart" lay-toc="{}">快速上手</h2>
|
||||
|
@ -89,11 +89,11 @@ npm i layui
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Quick Start - Layui</title>
|
||||
<link href="{{= d.layui.cdn.css }}" rel="stylesheet">
|
||||
<link href="{{= d.layui[2].cdn.css }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<!-- HTML Content -->
|
||||
<script src="{{= d.layui.cdn.js }}"></script>
|
||||
<script src="{{= d.layui[2].cdn.js }}"></script>
|
||||
<script>
|
||||
// Usage
|
||||
layui.use(function(){
|
||||
|
|
|
@ -34,7 +34,7 @@ toc: true
|
|||
| 关闭 : | - |
|
||||
| [layer.close(index, callback)](#close) | 关闭对应的层,核心方法。 |
|
||||
| [layer.closeAll(type, callback)](#closeAll) | 关闭所有对应类型的层。 |
|
||||
| [layer.closeLast(type)](#closeLast) <sup>2.8+</sup> | 关闭最近打开的对应类型的层。 |
|
||||
| [layer.closeLast(type, callback)](#closeLast) <sup>2.8+</sup> | 关闭最近打开的对应类型的层。 |
|
||||
| 其他 : | - |
|
||||
| [layer.config(options)](#config) | 全局配置默认属性。 |
|
||||
| [layer.ready(callback)](#ready) | 样式初始化就绪。 |
|
||||
|
@ -385,9 +385,10 @@ layer.closeAll('tips'); // 关闭所有的 tips 层
|
|||
|
||||
<h2 id="closeLast" lay-pid="api" class="ws-anchor ws-bold">关闭最近一次打开的层 <sup>2.8+</sup></h2>
|
||||
|
||||
`layer.closeLast(type);`
|
||||
`layer.closeLast(type, callback);`
|
||||
|
||||
- 参数 `type` : 弹层的类型。可选值:`dialog,page,iframe,loading,tips`
|
||||
- 参数 `callback` : 关闭弹层后的回调函数
|
||||
|
||||
该方法用于关闭最近一次打开的对应类型的层。
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ toc: true
|
|||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="{{= d.layui.cdn.css }}" rel="stylesheet">
|
||||
<link href="{{= d.layui[2].cdn.css }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
|
@ -111,7 +111,7 @@ toc: true
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="{{= d.layui.cdn.js }}"></script>
|
||||
<script src="{{= d.layui[2].cdn.js }}"></script>
|
||||
<script>
|
||||
//JS
|
||||
layui.use(['element', 'layer', 'util'], function(){
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="{{= d.layui.cdn.css }}" rel="stylesheet">
|
||||
<link href="{{= d.layui[2].cdn.css }}" rel="stylesheet">
|
||||
</head>
|
||||
<body class="layui-bg-gray">
|
||||
<div class="layui-panel" style="width: 260px; margin: 16px;">
|
||||
|
@ -97,7 +97,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<script src="{{= d.layui.cdn.js }}"></script>
|
||||
<script src="{{= d.layui[2].cdn.js }}"></script>
|
||||
<script>
|
||||
layui.use(function(){
|
||||
var dropdown = layui.dropdown;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="{{= d.layui.cdn.css }}" rel="stylesheet">
|
||||
<link href="{{= d.layui[2].cdn.css }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<ul class="layui-nav layui-nav-tree layui-nav-side">
|
||||
|
@ -31,7 +31,7 @@
|
|||
<li class="layui-nav-item"><a href="javascript:;">菜单3</a></li>
|
||||
</ul>
|
||||
|
||||
<script src="{{= d.layui.cdn.js }}"></script>
|
||||
<script src="{{= d.layui[2].cdn.js }}"></script>
|
||||
<script>
|
||||
layui.use(function(){
|
||||
var element = layui.element;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="{{= d.layui.cdn.css }}" rel="stylesheet">
|
||||
<link href="{{= d.layui[2].cdn.css }}" rel="stylesheet">
|
||||
<style>
|
||||
/* 自定义样式 */
|
||||
.layui-table-testcss .layui-table-header,
|
||||
|
@ -40,7 +40,7 @@
|
|||
</div>
|
||||
!}}</script>
|
||||
|
||||
<script src="{{= d.layui.cdn.js }}"></script>
|
||||
<script src="{{= d.layui[2].cdn.js }}"></script>
|
||||
<script>
|
||||
layui.use(['table'], function(){
|
||||
var table = layui.table;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="{{= d.layui.cdn.css }}" rel="stylesheet">
|
||||
<link href="{{= d.layui[2].cdn.css }}" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
</script>
|
||||
|
||||
<script src="{{= d.layui.cdn.js }}"></script>
|
||||
<script src="{{= d.layui[2].cdn.js }}"></script>
|
||||
<script>
|
||||
layui.use(['table', 'dropdown'], function(){
|
||||
var table = layui.table;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<tr>
|
||||
<td>孔子</td>
|
||||
<td>华夏</td>
|
||||
<td>有朋至远方来,不亦乐乎</td>
|
||||
<td>有朋自远方来,不亦乐乎</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>孟子</td>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<tr>
|
||||
<td>孔子</td>
|
||||
<td>华夏</td>
|
||||
<td>有朋至远方来,不亦乐乎</td>
|
||||
<td>有朋自远方来,不亦乐乎</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>孟子</td>
|
||||
|
@ -46,7 +46,7 @@
|
|||
<tr>
|
||||
<td>孔子</td>
|
||||
<td>华夏</td>
|
||||
<td>有朋至远方来,不亦乐乎</td>
|
||||
<td>有朋自远方来,不亦乐乎</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>孟子</td>
|
||||
|
@ -75,7 +75,7 @@
|
|||
<tr>
|
||||
<td>孔子</td>
|
||||
<td>华夏</td>
|
||||
<td>有朋至远方来,不亦乐乎</td>
|
||||
<td>有朋自远方来,不亦乐乎</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>孟子</td>
|
||||
|
@ -104,7 +104,7 @@
|
|||
<tr>
|
||||
<td>孔子</td>
|
||||
<td>华夏</td>
|
||||
<td>有朋至远方来,不亦乐乎</td>
|
||||
<td>有朋自远方来,不亦乐乎</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>孟子</td>
|
||||
|
@ -133,7 +133,7 @@
|
|||
<tr>
|
||||
<td>孔子</td>
|
||||
<td>华夏</td>
|
||||
<td>有朋至远方来,不亦乐乎</td>
|
||||
<td>有朋自远方来,不亦乐乎</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>孟子</td>
|
||||
|
@ -162,7 +162,7 @@
|
|||
<tr>
|
||||
<td>孔子</td>
|
||||
<td>华夏</td>
|
||||
<td>有朋至远方来,不亦乐乎</td>
|
||||
<td>有朋自远方来,不亦乐乎</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>孟子</td>
|
||||
|
@ -191,7 +191,7 @@
|
|||
<tr>
|
||||
<td>孔子</td>
|
||||
<td>华夏</td>
|
||||
<td>有朋至远方来,不亦乐乎</td>
|
||||
<td>有朋自远方来,不亦乐乎</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>孟子</td>
|
||||
|
|
|
@ -136,7 +136,7 @@ layui.use(function(){
|
|||
transfer.render({
|
||||
elem: '#ID-transfer-demo-showSearch',
|
||||
data: data,
|
||||
title: ['文本墨客', '获奖文人'],
|
||||
title: ['文人墨客', '获奖文人'],
|
||||
showSearch: true
|
||||
});
|
||||
});
|
||||
|
|
|
@ -100,7 +100,11 @@ data: {
|
|||
|
||||
</td>
|
||||
<td>string</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
|
||||
`json`
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
|
|
@ -250,8 +250,8 @@ layui.use('util', function(){
|
|||
layer.tips(othis.html(), this);
|
||||
}, 3000) // 3s 内不重复执行
|
||||
}, {
|
||||
trigger: 'mouseenter' // 鼠标移入时触发事件);
|
||||
})
|
||||
trigger: 'mouseenter' // 鼠标移入时触发事件
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</textarea>
|
||||
|
|
|
@ -18,23 +18,69 @@ toc: true
|
|||
`2.9.x` 对 `2.8.18` 向下兼容,可覆盖升级。
|
||||
|
||||
- #### table
|
||||
- 修复 `complete` 属性导致 `$.ajaxSetup()` 的 `complete` 失效的问题 #1423
|
||||
- 修复 `complete` 属性导致 `$.ajaxSetup()` 的 `complete` 失效的问题 #1423 @Sight-wcg
|
||||
- 修复 单元格展开再收缩后,当列通过拖拽改变过宽度,列存在概率性错位的问题 [28347fc]
|
||||
- 修复 合计行单元格展开异常的问题 #gitee-I8FH3K
|
||||
- 优化 `height` 属性高度铺满语法中不支持浮点型数值的问题 #gitee-I8DSPH
|
||||
- 修复 合计行单元格展开异常的问题 #Gitee-I8FH3K
|
||||
- 优化 `height` 属性高度铺满语法中不支持浮点型数值的问题 #Gitee-I8DSPH
|
||||
- 优化 关闭单元格多行展开状态后,悬停状态样式未移除的问题 #1425 @Sight-wcg
|
||||
- 优化 在末行展开单元格后,出现的固定列水平未对其的问题 [85add62]
|
||||
- 优化 当数据值为 `0,undefined,null` 且开启列模板,编辑单元格会带入模板字符的问题 [1d408f0]
|
||||
- #### util
|
||||
- 优化 `util.on()` 方法,提升参数的灵活性和代码的可读性 [d74abb4]
|
||||
- 优化 `util.on()` 方法,提升参数的灵活性和代码的可读性 [d74abb4] [92c8580]
|
||||
- #### layer
|
||||
- 优化 `layer.closeLast()` 方法,给第二个参数增加回调 [ab4ded2]
|
||||
- 优化 `layer.closeLast()` 方法,给第二个参数增加回调函数 [ab4ded2]
|
||||
- #### tree
|
||||
- 修复 `title` 有特殊字符时点击编辑的显示问题 #1432 @Sight-wcg
|
||||
- #### colorpicker
|
||||
- 优化 colorpicker 内部输入框取值,移除字符串两侧的空白字符 #1427 @Sight-wcg
|
||||
- 优化 内部输入框取值,移除字符串两侧的空白字符 #1427 @Sight-wcg
|
||||
- #### 其他
|
||||
- 优化 `lay.clipboard.writeText()` 逻辑,以适配无写入权限时的场景 #1421 @Sight-wcg
|
||||
|
||||
### 下载: [layui-v2.9.0-rc.2.zip](https://gitee.com/layui/layui/attach_files/1595924/download)
|
||||
### 下载: [layui-v2.9.0-rc.3.zip](https://gitee.com/layui/layui/attach_files/1597292/download)
|
||||
|
||||
<script>
|
||||
(function(){
|
||||
// 解析更新日志关联链接
|
||||
var elem = document.querySelectorAll('#WS-text li');
|
||||
elem.forEach(function (item) {
|
||||
item.childNodes.forEach(function (node) {
|
||||
if (node.nodeType === 3) {
|
||||
var nodeValue = node.nodeValue;
|
||||
var types = [
|
||||
{
|
||||
rule: /(#)Gitee-(\S+)/g,
|
||||
href: 'https://gitee.com/layui/layui/issues/'
|
||||
},
|
||||
{
|
||||
rule: /(#)(\d+)/g,
|
||||
href: 'https://github.com/layui/layui/pull/'
|
||||
},
|
||||
{
|
||||
rule: /\[()([\d\w]+)\]/g,
|
||||
href: 'https://github.com/layui/layui/commit/'
|
||||
},
|
||||
{
|
||||
rule: /(@)(\S+)/g,
|
||||
href: 'https://github.com/'
|
||||
}
|
||||
];
|
||||
var i = 0;
|
||||
var sNode = document.createElement('span');
|
||||
for (; i < types.length; i++) {
|
||||
if (types[i].rule.test(nodeValue)) {
|
||||
nodeValue = nodeValue.replace(types[i].rule, function(s, s1, s2) {
|
||||
return '<a href="'+ types[i].href + s2 +'" target="_blank">'+ s1 + s2 +'</a>';
|
||||
});
|
||||
}
|
||||
}
|
||||
sNode.innerHTML = nodeValue;
|
||||
node.parentNode.insertBefore(sNode, node);
|
||||
node.parentNode.removeChild(node);
|
||||
}
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ layui.use(['table', 'dropdown'], function(){
|
|||
}, templet: '#usernameTpl'},
|
||||
{field:'xxx', title:'测试', edit: 'text'},
|
||||
{field:'email', minWidth: 160, maxWidth: 320, title:'邮箱 <i class="layui-icon layui-icon-email" lay-event="email"></i>', fieldTitle: '邮箱', hide: 0, edit: 'text', style: 'background-color: #fafafa; color: red;', templet: function(d){
|
||||
return '<em>'+ layui.util.escape(d.email) +'</em> 份'
|
||||
return '<em>'+ layui.util.escape(d.email) +'</em>'
|
||||
}},
|
||||
{field:'sex', title:'性别', width:80, edit: 'text', sort: true, escape: false},
|
||||
{field:'city', title:'城市', width:120, templet: '#cityTpl', exportTemplet: function(d, obj){
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "layui",
|
||||
"version": "2.9.0-rc.2",
|
||||
"version": "2.9.0-rc.3",
|
||||
"description": "Classic modular Front-End UI library",
|
||||
"keywords": [
|
||||
"layui",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
};
|
||||
|
||||
var Layui = function(){
|
||||
this.v = '2.9.0-rc.2'; // Layui 版本号
|
||||
this.v = '2.9.0-rc.3'; // Layui 版本号
|
||||
};
|
||||
|
||||
// 识别预先可能定义的指定全局对象
|
||||
|
|
|
@ -468,7 +468,7 @@ layui.define(['lay', 'layer', 'util'], function(exports){
|
|||
dl.scrollTop(posTop + dl.scrollTop() - dlHeight + ddHeight - 5);
|
||||
}
|
||||
|
||||
// 若选择玄素在滚动条不可见顶部
|
||||
// 若选择元素在滚动条不可见顶部
|
||||
if(posTop < 0){
|
||||
dl.scrollTop(posTop + dl.scrollTop() - 5);
|
||||
}
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
* tree 树组件
|
||||
*/
|
||||
|
||||
layui.define('form', function(exports){
|
||||
layui.define(['form','util'], function(exports){
|
||||
"use strict";
|
||||
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var util = layui.util;
|
||||
|
||||
// 模块名
|
||||
var MOD_NAME = 'tree';
|
||||
|
@ -547,7 +548,7 @@ layui.define('form', function(exports){
|
|||
// 添加输入框,覆盖在文字上方
|
||||
elemMain.append('<input type="text" class="layui-tree-editInput">');
|
||||
// 获取焦点
|
||||
elemMain.children('.layui-tree-editInput').val(text).focus();
|
||||
elemMain.children('.layui-tree-editInput').val(util.unescape(text)).focus();
|
||||
// 嵌入文字移除输入框
|
||||
var getVal = function(input){
|
||||
var textNew = input.val().trim();
|
||||
|
|
|
@ -386,9 +386,9 @@ layui.define('jquery', function(exports){
|
|||
/**
|
||||
* 批量事件
|
||||
* @param {string} [attr="lay-on"] - 触发事件的元素属性名
|
||||
* @param {Object.<string, Function} events - 事件集合
|
||||
* @param {Object.<string, Function>} events - 事件集合
|
||||
* @param {Object} [options] - 参数的更多选项
|
||||
* @param {(string|HTMLElement|jQuery)} [options.elem="body"] - 触发事件的委托元素
|
||||
* @param {(string|HTMLElement|JQuery)} [options.elem="body"] - 触发事件的委托元素
|
||||
* @param {string} [options.trigger="click"] - 事件触发的方式
|
||||
* @returns {Object} 返回当前 events 参数设置的事件集合
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue