mirror of https://github.com/layui/layui
Merge branch '2.x' into feat/dropdown-menu-anim
commit
ed316089d5
|
@ -1,23 +1,20 @@
|
|||
# 🍀 提 Issue 的正确方式
|
||||
|
||||
## 标题
|
||||
为了保持 Issues 区域版面整洁可读, 创建 Issue 时,**标题应尽量言简意赅** (一句话概括问题)
|
||||
## 自助
|
||||
|
||||
## 说明
|
||||
创建 Issue 前,为了避免议题重复而造成大家不必要的消耗,您可以先尝试通过以下渠道寻找解决方案:
|
||||
|
||||
创建 Issue 时,**[内容请按照文本框中的文字模板规范填写(点击查看示例)](https://foruda.gitee.com/images/1660197253451887123/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png)**,尽量将您所遇到的问题描述详细,如:
|
||||
- 仔细查看 Layui 官方文档,大部分问题都能通过文档找到答案:https://layui.dev
|
||||
- 在 Issues 中搜索类似问题,基本上都有相关回复
|
||||
|
||||
- **版本:** 提供所使用的 Layui 版本号。
|
||||
- **描述:** 提供尽可能详细的问题描述和具体操作步骤等信息,以便我们也能够更轻松地将问题复现。
|
||||
- **代码:** 提供与问题对应的业务代码,以便我们更好排查。
|
||||
- **补充:** 如若必要,还可以提供其他补充,如截图等信息。
|
||||
## 创建
|
||||
|
||||
> 按照模板规范填写的初衷,是为了减少大家不必要的时间消耗,还望遵循并理解
|
||||
若上述渠道未能找到解决方案,那么创建 Issue 时,**请按照表单模板规范逐一填写**。
|
||||
其中,标题应尽量言简意赅(一句话概括议题),其他表单项则尽量将您所遇到的问题描述详细。
|
||||
|
||||
- **若 Issue 未遵循模板规范,可能将无法获得相关回答,敬请知晓**
|
||||
- 若 issue 是建议/分享/讨论性质的 ,则可以自由发挥
|
||||
> **若 Issue 未遵循模板规范仔细填写,可能将无法获得相关回答,敬请知晓和理解**
|
||||
|
||||
## 对接
|
||||
|
||||
- 在 Issue 交流过程中,若问题已经得到解决,或 Issue 并非项目相关的问题,请及时将状态设置为 「已完成」
|
||||
- 大家本着相互尊重、理解和友善的态度进行交流,共同维护好 Layui 来之不易的良好社区氛围。谢谢 :sparkling_heart:
|
||||
- 在 Issue 交流过程中,若议题已经得到解决,或 Issue 并非项目相关问题,请在 Issue 右上角将状态设置为:已完成
|
||||
- 大家本着相互尊重、理解和友善的态度进行交流,共同维护好 Layui 来之不易的良好的社区氛围。谢谢
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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` 的属性值
|
||||
|
||||
该方法主要用于对动态插入的面包屑导航的初始化渲染,用法同上述导航菜单。
|
||||
该方法主要用于对动态插入的面包屑导航的初始化渲染,用法同上述导航菜单。
|
||||
|
|
|
@ -1,19 +1,6 @@
|
|||
<h3 lay-toc="{level: 2, id: 'examples'}" class="layui-hide">综合演示 🔥</h3>
|
||||
|
||||
<pre class="layui-code" lay-options="{preview: 'iframe', id: 'table-demo-1', text: {preview: '综合演示 🔥'}, style: 'height: 506px;', layout: ['preview', 'code'], tools: ['full','window'], done: function(obj){
|
||||
setTimeout(function(){
|
||||
layer.tipsIndex = layer.tips(
|
||||
'点击该图标可最大化查看效果',
|
||||
layui.$('#table-demo-1 .layui-icon-screen-full'), {
|
||||
tips: 4,
|
||||
time: 30*1000
|
||||
})
|
||||
});
|
||||
}, toolsEvent: function(oi, type){
|
||||
if(type === 'full'){
|
||||
layer.close(layer.tipsIndex);
|
||||
}
|
||||
}}">
|
||||
<pre class="layui-code" lay-options="{preview: 'iframe', id: 'table-demo-1', text: {preview: '综合演示 🔥'}, style: 'height: 506px;', layout: ['preview', 'code'], tools: ['full','window']}">
|
||||
<textarea>
|
||||
{{- d.include("/table/examples/demo.md") }}
|
||||
</textarea>
|
||||
|
|
|
@ -370,11 +370,7 @@ edit: function(d){
|
|||
|
||||
</td>
|
||||
<td>boolean</td>
|
||||
<td>
|
||||
|
||||
-
|
||||
|
||||
</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>escape</td>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -13,8 +13,8 @@ toc: true
|
|||
|
||||
|
||||
<h2 id="2.8.18" class="ws-anchor">
|
||||
2.8.18-beta
|
||||
<span class="layui-badge-rim">2023-10-07</span>
|
||||
2.8.18-beta.1
|
||||
<span class="layui-badge-rim">2023-10-14</span>
|
||||
</h2>
|
||||
|
||||
- #### form
|
||||
|
@ -24,12 +24,14 @@ toc: true
|
|||
- 优化 `input` 数字输入框当表单验证失败时的边框颜色 # 1371
|
||||
- #### nav
|
||||
- 新增 垂直导航菜单展开和收缩时的过渡动画 # 1384
|
||||
- 新增 `lay-accordion` 属性支持,用于开启手风琴,兼容旧版 `lay-shrink="all"` # 1384
|
||||
- #### layer
|
||||
- 优化 移动端定位 # 1376
|
||||
- #### table
|
||||
- 新增 `complete` 属性,当数据接口请求完成后执行,无论成功还是失败均会触发 # 1379
|
||||
- 修复 `ignoreExport` 表头属性值效果与文档不符的问题 # I86DBY
|
||||
- #### treeTable
|
||||
- 修复 treeTable 组件 treeTable.setRowChecked 未逐层展开上级节点的问题 # 1385/I84RUT
|
||||
- 修复 `treeTable.setRowChecked()` 方法未逐层展开上级节点的问题 # 1385/I84RUT
|
||||
- #### upload
|
||||
- 修复 `unified: true` 时的报错问题
|
||||
- 优化 渲染入口逻辑,以解决因重复渲染导致的若干问题
|
||||
|
@ -43,8 +45,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)
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -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'},
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
};
|
||||
|
||||
var Layui = function(){
|
||||
this.v = '2.8.18-beta'; // Layui 版本号
|
||||
this.v = '2.8.18-beta.1'; // Layui 版本号
|
||||
};
|
||||
|
||||
// 识别预先可能定义的指定全局对象
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue