release v2.8.18-beta.1 (#1395)

release v2.8.18-beta.1
pull/1400/head v2.8.18-beta.1
贤心 2023-10-14 16:44:04 +08:00 committed by GitHub
commit a18695a4eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 51 additions and 23 deletions

2
dist/css/layui.css vendored

File diff suppressed because one or more lines are too long

2
dist/layui.js vendored

File diff suppressed because one or more lines are too long

View File

@ -114,7 +114,16 @@ toc: true
数字输入框 <sup>2.8.9+</sup>
</h3>
一般搭配 `<input type="number">` 使用,用于替代原生数字输入框,可继承 `step,min,max` 等原生属性。
一般搭配 `<input type="number">` 使用,用于替代原生数字输入框,支持的属性如下:
| 属性 | 描述 |
| --- | --- |
| step | 设置数字的加减间隔 |
| min | 设置数字的最小值 |
| max | 设置数字的最大值 |
| lay-precision <sup>2.8.18+</sup> | 设置数字的小数位精度 |
### 示例
<pre class="layui-code" lay-options="{preview: true, layout: ['preview', 'code'], done: function(obj){
obj.render();
@ -130,10 +139,13 @@ toc: true
<div class="layui-col-xs6">
<input type="number" lay-affix="number" placeholder="设置 step,min,max" step="10" min="0" max="100" class="layui-input">
</div>
<div class="layui-col-xs6">
<div class="layui-col-xs4">
<input type="number" lay-affix="number" placeholder="设置小数位精度为 2" step="0.1" lay-precision="2" class="layui-input">
</div>
<div class="layui-col-xs4">
<input type="number" lay-affix="number" readonly placeholder="不允许输入状态" class="layui-input">
</div>
<div class="layui-col-xs6">
<div class="layui-col-xs4">
<input type="number" lay-affix="number" disabled placeholder="禁用状态" class="layui-input">
</div>
</div>

View File

@ -74,7 +74,7 @@ npm i layui
```
```
<!-- 引入 layui.js -->
<script src="//unpkg.com/layui@{{= d.layui.v }}/dist/layui.js">
<script src="//unpkg.com/layui@{{= d.layui.v }}/dist/layui.js"></script>
```
<h2 id="quickstart" lay-toc="{}">快速上手</h2>

View File

@ -255,7 +255,7 @@ layui.use(function(){
| 属性 | 描述 |
| --- | --- |
| lay-shrink | 导航容器属性。展开子菜单时,是否收缩兄弟节点已展开的子菜单。可选值:<ul><li>`lay-shrink=""` 不收缩兄弟菜单子菜单,默认; </li><li>`lay-shrink="all"` 收缩全部兄弟菜单子菜单</li></ul> |
| lay-accordion <sup>2.8.18+</sup> | 导航容器属性。用于开启垂直导航菜单展开时的手风琴效果。如:<br>`<div class="layui-nav layui-nav-tree" lay-accordion></div>` |
| lay-bar | 导航容器属性。用于禁用滑块跟随功能。如:<br>`<div class="layui-nav" lay-bar="disabled"></div>` |
| lay-unselect | 导航菜单项属性。 设置后,点击对应菜单项时,不会出现选中效果。 |
@ -344,4 +344,4 @@ layui.use(function(){
- 参数 `'breadcrumb'` 是渲染面包屑导航的固定值
- 参数 `filter` : 对应面包屑导航容器 `lay-filter` 的属性值
该方法主要用于对动态插入的面包屑导航的初始化渲染,用法同上述导航菜单。
该方法主要用于对动态插入的面包屑导航的初始化渲染,用法同上述导航菜单。

View File

@ -370,11 +370,7 @@ edit: function(d){
</td>
<td>boolean</td>
<td>
-
</td>
<td>-</td>
</tr>
<tr>
<td>escape</td>

View File

@ -478,6 +478,20 @@ error: function(e, msg) {
}
```
</td>
</tr>
<tr>
<td>complete <sup>2.8.18+</sup></td>
<td colspan="3">
数据接口请求完成后执行,无论成功还是失败均会触发
```
complete: function(xhr, ts) {
console.log(xhr, ts)
}
```
</td>
</tr>
</tbody>

View File

@ -24,11 +24,12 @@ toc: true
- 优化 `input` 数字输入框当表单验证失败时的边框颜色 # 1371
- #### nav
- 新增 垂直导航菜单展开和收缩时的过渡动画 # 1384
- 新增 `lay-accordion` 属性支持,用于开启手风琴,兼容旧版 `lay-shrink="all"` # 1384
- #### layer
- 优化 移动端定位 # 1376
- #### table
- 新增 `complete` 属性,当数据接口请求完成后执行,无论成功还是失败均会触发 # 1379
- #### treeTable
- 修复 `ignoreExport` 表头属性值效果与文档不符的问题 # I86DBY
- 修复 treeTable 组件 treeTable.setRowChecked 未逐层展开上级节点的问题 # 1385/I84RUT
- #### upload
- 修复 `unified: true` 时的报错问题
@ -43,8 +44,10 @@ toc: true
- #### code
- 新增 `code` 属性,用于设置原始 code 值,优先级高于目标元素中的内容
- 优化 若干小问题
- #### 其他
- 优化 `<hr>` 全局样式优先级 # I86R6G
### 下载: [layui-v2.8.18-beta.zip](https://gitee.com/layui/layui/attach_files/1545385/download)
### 下载: [layui-v2.8.18.1-beta.zip](https://gitee.com/layui/layui/attach_files/1553466/download)
---

View File

@ -161,7 +161,7 @@ layui.use(['table', 'dropdown'], function(){
{type: 'checkbox', fixed: 'left'},
// {type: 'numbers', fixed: 'left'},
{field:'id', title:'ID', width:80, fixed: 'left', unresize: true, sort: true, totalRowText: '合计:'},
{field:'username', expandedStyle: 'tips', title:'用户名 <i class="layui-icon layui-icon-username" lay-event="username"></i>', width:120, edit: function(d){
{field:'username', ignoreExport: false, expandedStyle: 'tips', title:'用户名 <i class="layui-icon layui-icon-username" lay-event="username"></i>', width:120, edit: function(d){
return !d.LAY_DISABLED;
}, templet: '#usernameTpl'},
{field:'xxx', title:'测试', edit: 'text'},

View File

@ -1,6 +1,6 @@
{
"name": "layui",
"version": "2.8.18-beta",
"version": "2.8.18-beta.1",
"description": "Classic modular Front-End UI library",
"main": "dist/layui.js",
"license": "MIT",

View File

@ -19,7 +19,7 @@ pre{white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; w
/** 初始化全局标签 **/
body{line-height: 1.6; color: #333; color: rgba(0,0,0,.85); font: 14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;}
hr{height: 0; line-height: 0; margin: 10px 0; padding: 0; border: none!important; border-bottom: 1px solid #eee !important; clear: both; overflow: hidden; background: none;}
hr{height: 0; line-height: 0; margin: 10px 0; padding: 0; border: none; border-bottom: 1px solid #eee; clear: both; overflow: hidden; background: none;}
a{color: #333; text-decoration:none;}
a:hover{color: #777;}
a cite{font-style: normal; *cursor:pointer;}

View File

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

View File

@ -298,7 +298,7 @@ layui.define('jquery', function(exports){
// 若有子菜单,则展开
if(child[0]){
child.slideToggle(200, function() {
child.stop().slideToggle(200, function() {
isNone || parent.removeClass(NAV_ITEMED);
});
parent[isNone ? 'addClass': 'removeClass'](NAV_EXPAND);
@ -308,7 +308,7 @@ layui.define('jquery', function(exports){
parent.siblings().removeClass([
NAV_ITEMED,
NAV_EXPAND
].join(' ')).children('.'+NAV_CHILD).slideUp(200);
].join(' ')).children('.'+NAV_CHILD).stop().slideUp(200);
}
}
}

View File

@ -2875,8 +2875,11 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
} else {
table.eachCols(id, function(i3, item3){
if(item3.ignoreExport === false || item3.field && item3.type == 'normal'){
// 不导出隐藏列
if(item3.hide || item3.ignoreExport){
// 不导出隐藏列,除非设置 ignoreExport 强制导出
if (
(item3.hide && item3.ignoreExport !== false) ||
item3.ignoreExport === true // 忽略导出
) {
if(i1 == 0) fieldsIsHide[item3.field] = true; // 记录隐藏列
return;
}