release v2.8.10

release v2.8.10
pull/1304/head v2.8.10
贤心 2023-07-03 18:37:04 +08:00 committed by GitHub
commit a08001fc72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 8 deletions

2
dist/layui.js vendored

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,7 @@ toc: true
| [treeTable.reloadData(id, options)](#reload) | 树表数据重载。 |
| [treeTable.reloadAsyncNode(id, index)](#reloadAsyncNode) | 重载异步子节点 |
| [treeTable.getData(id, isSimpleData)](#getData) | 获取树表数据。 |
| [treeTable.getNodeById(id)](#getNodeById) | 获取节点信息集 |
| [treeTable.getNodeById(id, dataId)](#getNodeById) | 获取节点信息集 |
| [treeTable.getNodesByFilter(id, filter, opts)](#getNodesByFilter) | 获取符合过滤规则的节点信息集 |
| [treeTable.getNodeDataByIndex(id, index)](#getNodeDataByIndex) | 通过行元素对应的 `data-index` 属性获取对应行数据。 |
| [treeTable.updateNode(id, index, data)](#updateNode) | 更新行数据。 |
@ -119,9 +119,10 @@ console.log(data);
<h3 id="getNodeById" lay-pid="api" class="ws-anchor ws-bold">获取节点信息集</h3>
`treeTable.getNodeById(id)`
`treeTable.getNodeById(id, dataId)`
- 参数 `id` : treeTable 渲染时的 `id` 属性值
- 参数 `dataId` : 数据项的 `id` 属性值
```js
// 渲染
@ -131,7 +132,7 @@ treeTable.render({
// 其他属性 …
});
// 获取节点信息集
var obj = treeTable.getNodeById('test');
var obj = treeTable.getNodeById('test', 1);
console.log(obj);
```

View File

@ -11,6 +11,16 @@ toc: true
> 导读:📑 [Layui 2.8 《升级指南》](/notes/2.8/upgrade-guide.html) · 📑 [Layui 新版文档站上线初衷](/notes/2.8/news.html)
<h2 id="2.8.10" class="ws-anchor">
2.8.10
<span class="layui-badge-rim">2023-07-03</span>
</h2>
- 修复 `layui.js` 在 IE 和 Safari 等「古董浏览器」存在一个正则零宽断言报错的问题 # I7HZCZ/I7I0TO
### 下载: [layui-v2.8.10.zip](https://gitee.com/layui/layui/attach_files/1455365/download)
---
<h2 id="2.8.9" class="ws-anchor">
2.8.9
@ -31,7 +41,7 @@ toc: true
- 新增 `countdown``date,now,clock,done` 等属性
- 新增 `countdown``clear,reload` 等实例方法,用于清除和重置倒计时等操作
### 下载: [layui-v2.8.9.zip](https://gitee.com/layui/layui/attach_files/1454465/download)
### 下载: [~~layui-v2.8.9.zip~~](https://gitee.com/layui/layui/attach_files/1454465/download)
---

View File

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

View File

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

View File

@ -296,7 +296,8 @@ layui.define(['lay', 'layer', 'util'], function(exports){
// 小数点后保留位数
var fixed = function(step){
return (step.match(/(?<=\.)[\d]+$/) || [''])[0].length;
var decimals = (step.match(/\.(\d+$)/) || [])[1] || '';
return decimals.length;
}(step.toString());
if(fixed) value = value.toFixed(fixed);