mirror of https://github.com/layui/layui
Merge branch '2.x' into feat/touch
commit
a4c78cc886
|
@ -23,7 +23,7 @@ body:
|
|||
- type: input
|
||||
attributes:
|
||||
label: 浏览器
|
||||
placeholder: 如:Chrome 116.0.5845.111(正式版本) (64 位)
|
||||
placeholder: 如:Chrome x.x.x.x(正式版本)(64 位)
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
|
|
|
@ -2,4 +2,4 @@ blank_issues_enabled: false
|
|||
contact_links:
|
||||
- name: 📄 官方文档
|
||||
url: https://layui.dev/
|
||||
about: 建议你在创建 Issue 之前,仔细查阅 Layui 开发文档,以便对其有更深入的了解,和更好地分析问题。
|
||||
about: 建议在创建 Issue 之前,仔细查阅 Layui 开发文档,以便对其有更深入的了解,和更好地分析问题。
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
name: 😇 问题反馈
|
||||
description: 使用 Layui 过程中遇到的 Bug、异常或其他困惑。
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**系统提示**:此处只接受 Layui 相关技术问题,其他如 layuiAdmin 或 LayIM 等主题相关问题请勿在此反馈。
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: 议题条件
|
||||
options:
|
||||
- label: 我确认已查看官方使用文档:**https://layui.dev** ,但没有找到相关解决方案。
|
||||
required: true
|
||||
- label: 我确认已在 **Issues** 中搜索过类似的问题,但没有找到相关解决方案。
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: 版本号
|
||||
placeholder: 请提供您当前使用的 Layui 版本号
|
||||
description: 若不清楚,可打开 `layui.js`,头部注释有对应的版本号
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: 浏览器
|
||||
placeholder: 如:Chrome x.x.x.x(正式版本)(64 位)
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: type
|
||||
attributes:
|
||||
label: 问题类型
|
||||
options:
|
||||
- 疑是 BUG
|
||||
- 报错提示
|
||||
- 功能困惑
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: 问题描述
|
||||
placeholder: 请提供详细的问题描述和操作步骤等信息,以便我们也能够更轻松地将问题复现。
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: 业务代码
|
||||
description: 直接粘贴问题对应的 `HTML,CSS,JavaScript` 等代码到下面的文本框,无需书写 `Markdown`
|
||||
placeholder: 请提供与该问题对应的业务代码片段,以便我们更好地排查问题。
|
||||
render: auto
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: 截图补充
|
||||
placeholder: 如上述仍然无法准确地表述问题,可提供必要的截图(可直接粘贴上传)
|
||||
- type: input
|
||||
attributes:
|
||||
label: 演示地址
|
||||
description: 若能提供 Stackblitz, CodePen 或自主搭建的页面演示地址,将更有助于解决问题
|
||||
placeholder: URL
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: 友好承诺
|
||||
options:
|
||||
- label: 我承诺将本着相互尊重、理解和友善的态度进行交流,共同维护 Layui 良好的社区氛围。
|
||||
required: true
|
|
@ -1,8 +1,5 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 😇 问题反馈
|
||||
url: https://gitee.com/layui/layui/issues
|
||||
about: 使用 Layui 过程中遇到的 Bug、异常或其他功能困惑。
|
||||
- name: 📄 官方文档
|
||||
url: https://layui.dev/
|
||||
about: 建议您在创建 Issue 之前,仔细查阅 Layui 开发文档,以便对其有更深入的了解,和更好地分析问题。
|
||||
about: 建议在创建 Issue 之前,仔细查阅 Layui 开发文档,以便对其有更深入的了解,和更好地分析问题。
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -345,7 +345,7 @@ console.log(checkStatus.isAll ) // 表格是否全选
|
|||
| opts | 描述 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| type | 选中方式。可选值: `checkbox,radio` | string | `checkbox` |
|
||||
| index | 选中行的下标。即数据的所在数组下标(`0` 开头)。<br>可设置 `all` 表示全选。 | number<br>string | - |
|
||||
| index | 选中行的下标。支持以下几种情况:<ul><li>若值为 `number` 类型,则表示行所在的数组下标(`0` 开头)</li><li>若值为 `array` 类型 <sup>2.9.1+</sup>,则表示批量下标。</li><li>若值为 `string` 类型,则可设置 `all` 操作全选。</li></ul> | number<br>array<br>string | - |
|
||||
| checked | 选中状态值。 <ul><li>若传递该属性,则赋值固定值。</li><li>若不传递该属性(默认),则 `checkbox` 将在 `true\|false` 中自动切换值,而 `radio` 将赋值 `true` 固定值。<sup>2.8.4+</sup></li></ul> | boolean | - |
|
||||
|
||||
该方法用于设置行的选中样式及相关的特定属性值 `LAY_CHECKED`。
|
||||
|
@ -363,10 +363,15 @@ table.setRowChecked('test', {
|
|||
index: 0, // 选中行的下标。 0 表示第一行
|
||||
});
|
||||
|
||||
// 批量选中行
|
||||
table.setRowChecked('test', {
|
||||
index: [1,3,5] // 2.9.1+
|
||||
});
|
||||
|
||||
// 取消选中行
|
||||
table.setRowChecked('test', {
|
||||
index: 'all', // 所有行
|
||||
checked: false
|
||||
checked: false // 此处若设置 true,则表示全选
|
||||
});
|
||||
```
|
||||
|
||||
|
|
|
@ -9,13 +9,41 @@ toc: true
|
|||
|
||||
<h2 id="2.9.x" lay-toc="{title: '2.9.x'}"></h2>
|
||||
|
||||
<h2 id="2.9.0" class="ws-anchor">
|
||||
2.9.0
|
||||
<span class="layui-badge-rim" style="color: #16b777;">稳定版</span>
|
||||
<span class="layui-badge-rim">2023-11-29</span>
|
||||
<h2 id="2.9.1" class="ws-anchor">
|
||||
2.9.1
|
||||
<!-- <span class="layui-badge-rim" style="color: #16b777;">稳定版</span> -->
|
||||
<span class="layui-badge-rim">2023-12-11</span>
|
||||
</h2>
|
||||
|
||||
`2.9.x` 是对 `2.8.18` 的进一步完善,旨在提供一个可长期用于生产环境的稳定版本。对 `2.8.x` 向下兼容,可覆盖升级。
|
||||
`2.9.x` 是对 `2.8.18` 的进一步完善,旨在打造一个可长期用于生产环境的稳定版本。对 `2.8.x` 向下兼容,可覆盖升级。
|
||||
|
||||
- #### table
|
||||
- 增强 `height` 选项,支持函数 #1437 @Sight-wcg
|
||||
- 增强 `table.setRowChecked()` 方法,支持批量选中 [7c12ddf]
|
||||
- 修复 全选时,禁用行仍有选中样式的问题 #1436 @Sight-wcg
|
||||
- 修复 `templet` 模板字符中的一些特殊 laytpl 界定符被转义的问题 #1438 @Sight-wcg
|
||||
- #### layer
|
||||
- 修复 `iframe` 层在某些情况出现异常纵向滚动条的问题 [8f0c87f]
|
||||
- 优化 `layer.tips` 在触发元素高度较小时的定位 #1439 @Sight-wcg
|
||||
- #### treeTable
|
||||
- 修复 `treeTable.reloadData()` 在某些情况下报错的问题 [3f148a9]
|
||||
- #### laydate
|
||||
- 清除 内部 `MODE_NAME` 变量重复声明 #1441 @mek1986
|
||||
- #### laypage
|
||||
- 新增 `countText` 选项,用于自定义数据总数区域文本 #1444 @Sight-wcg
|
||||
- #### nav
|
||||
- 修复 IE8 下子菜单背景色问题 #1445 @Sight-wcg
|
||||
- #### util
|
||||
- 优化 `util.on()` 在特殊情况下的用法问题 [3b78139]
|
||||
|
||||
### 下载: [layui-v2.9.1.zip](https://gitee.com/layui/layui/attach_files/1608279/download)
|
||||
|
||||
---
|
||||
|
||||
<h2 id="2.9.0" class="ws-anchor">
|
||||
2.9.0
|
||||
<span class="layui-badge-rim">2023-11-29</span>
|
||||
</h2>
|
||||
|
||||
- #### table
|
||||
- 修复 `complete` 属性导致 `$.ajaxSetup()` 的 `complete` 失效的问题 #1423 @Sight-wcg
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "layui",
|
||||
"version": "2.9.0",
|
||||
"version": "2.9.1",
|
||||
"description": "Classic modular Front-End UI library",
|
||||
"keywords": [
|
||||
"layui",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
};
|
||||
|
||||
var Layui = function(){
|
||||
this.v = '2.9.0'; // Layui 版本号
|
||||
this.v = '2.9.1'; // Layui 版本号
|
||||
};
|
||||
|
||||
// 识别预先可能定义的指定全局对象
|
||||
|
|
|
@ -77,6 +77,16 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
|||
return config || null;
|
||||
};
|
||||
|
||||
// lay 函数可以处理 Selector,HTMLElement,JQuery 类型
|
||||
// 无效的 CSS 选择器字符串,会抛出 SyntaxError 异常,此时直接返回 laytpl 模板字符串
|
||||
var resolveTplStr = function(templet){
|
||||
try{
|
||||
return lay(templet).html();
|
||||
}catch{
|
||||
return templet;
|
||||
}
|
||||
}
|
||||
|
||||
// 解析自定义模板数据
|
||||
var parseTempData = function(obj){
|
||||
obj = obj || {};
|
||||
|
@ -97,9 +107,9 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
|||
if(templet){
|
||||
content = typeof templet === 'function'
|
||||
? templet.call(item3, obj.tplData, obj.obj)
|
||||
: laytpl($(templet).html() || String(content)).render($.extend({
|
||||
LAY_COL: item3
|
||||
}, obj.tplData));
|
||||
: laytpl(resolveTplStr(templet) || String(content)).render($.extend({
|
||||
LAY_COL: item3
|
||||
}, obj.tplData));
|
||||
}
|
||||
|
||||
// 是否只返回文本
|
||||
|
|
Loading…
Reference in New Issue