Skip to content

Commit

Permalink
bump: 6.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Dec 2, 2024
1 parent 45268ec commit 40da906
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 57 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"packages/amis-editor"
],
"useWorkspaces": false,
"version": "6.9.0"
"version": "6.10.0"
}
6 changes: 3 additions & 3 deletions packages/amis-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amis-core",
"version": "6.9.0",
"version": "6.10.0",
"description": "amis-core",
"main": "lib/index.js",
"module": "esm/index.js",
Expand Down Expand Up @@ -49,9 +49,9 @@
],
"dependencies": {
"@rc-component/mini-decimal": "^1.0.1",
"cross-env": "^7.0.3",
"amis-formula": "*",
"amis-formula": "^6.10.0",
"classnames": "2.3.2",
"cross-env": "^7.0.3",
"file-saver": "^2.0.2",
"hoist-non-react-statics": "^3.3.2",
"lodash": "^4.17.15",
Expand Down
4 changes: 2 additions & 2 deletions packages/amis-editor-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amis-editor-core",
"version": "6.9.0",
"version": "6.10.0",
"description": "amis 可视化编辑器",
"main": "lib/index.js",
"module": "esm/index.js",
Expand Down Expand Up @@ -60,7 +60,6 @@
"sortablejs": "^1.14.0"
},
"devDependencies": {
"cross-env": "^7.0.3",
"@fortawesome/fontawesome-free": "^6.1.1",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-json": "^4.1.0",
Expand All @@ -84,6 +83,7 @@
"ajv": "^8.8.2",
"autoprefixer": "^10.4.12",
"concurrently": "^6.2.0",
"cross-env": "^7.0.3",
"css-loader": "^6.2.0",
"faker": "^5.5.3",
"i18n-command": "^0.0.23-beta.15",
Expand Down
6 changes: 3 additions & 3 deletions packages/amis-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amis-editor",
"version": "6.9.0",
"version": "6.10.0",
"description": "amis 可视化编辑器",
"main": "lib/index.js",
"module": "esm/index.js",
Expand Down Expand Up @@ -41,15 +41,14 @@
],
"dependencies": {
"@webcomponents/webcomponentsjs": "^2.6.0",
"amis-editor-core": "^6.9.0",
"amis-editor-core": "^6.10.0",
"amis-postcss": "1.0.0",
"amis-theme-editor-helper": "*",
"i18n-runtime": "*",
"lodash": "^4.17.15",
"mobx-state-tree": "^3.17.3"
},
"devDependencies": {
"cross-env": "^7.0.3",
"@fortawesome/fontawesome-free": "^6.1.1",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-json": "^4.1.0",
Expand All @@ -73,6 +72,7 @@
"ajv": "^8.8.2",
"axios": "0.21.1",
"concurrently": "^6.2.0",
"cross-env": "^7.0.3",
"css-loader": "^6.2.0",
"faker": "^5.5.3",
"i18n-command": "^0.0.23-beta.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/amis-formula/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amis-formula",
"version": "6.9.0",
"version": "6.10.0",
"description": "负责 amis 里面的表达式实现,内置公式,编辑器等",
"main": "lib/index.js",
"module": "esm/index.js",
Expand Down
46 changes: 30 additions & 16 deletions packages/amis-formula/src/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

### MAX

用法:`MAX(num1, num2, ...numN)`
用法:`MAX(num1, num2, ...numN) or MAX([num1, num2, ...numN])`

* `num:...number` 数值

Expand All @@ -99,7 +99,7 @@

### MIN

用法:`MIN(num1, num2, ...numN)`
用法:`MIN(num1, num2, ...numN) or MIN([num1, num2, ...numN])`

* `num:...number` 数值

Expand All @@ -109,7 +109,7 @@

### SUM

用法:`SUM(num1, num2, ...numN)`
用法:`SUM(num1, num2, ...numN) or SUM([num1, num2, ...numN])`

* `num:...number` 数值

Expand Down Expand Up @@ -189,7 +189,7 @@

### AVG

用法:`AVG(num1, num2, ...numN)`
用法:`AVG(num1, num2, ...numN) or AVG([num1, num2, ...numN])`

* `num:...number` 要处理的数字

Expand Down Expand Up @@ -515,7 +515,7 @@
* `text:string` 文本
* `startString:string` 起始文本

返回:`string` 判断结果
返回:`boolean` 判断结果

判断字符串(text)是否以特定字符串(startString)开始,是则返回 true,否则返回 false。

Expand All @@ -526,7 +526,7 @@
* `text:string` 文本
* `endString:string` 结束文本

返回:`string` 判断结果
返回:`boolean` 判断结果

判断字符串(text)是否以特定字符串(endString)结束,是则返回 true,否则返回 false。

Expand All @@ -537,7 +537,7 @@
* `text:string` 文本
* `searchText:string` 搜索文本

返回:`string` 判断结果
返回:`boolean` 判断结果

判断参数 1 中的文本是否包含参数 2 中的文本,是则返回 true,否则返回 false。

Expand Down Expand Up @@ -573,10 +573,14 @@
* `from:number` 起始位置
* `len:number` 处理长度

返回:`number` 命中的位置
返回:`string` 命中的位置

返回文本字符串中从指定位置开始的特定数目的字符。

示例:`MID("amis.baidu.com", 6, 3)`

返回 `aid`

### BASENAME

用法:`BASENAME(text)`
Expand All @@ -589,7 +593,7 @@

示例:`/home/amis/a.json`

返回:a.json`。
返回:`a.json`

### UUID

Expand Down Expand Up @@ -714,7 +718,7 @@ DATERANGESPLIT('1676563200, 1676735999', 'end' , 'YYYY.MM.DD hh:mm:ss') 得到 '
* `unit:string` 比如可以传入 'day'、'month'、'year' 或者 `week` 等等
* `format:string` 日期格式,可选

返回:`date` 新的日期对象
返回:`any` 新的日期对象, 如果传入 format 则返回格式化后的日期字符串

返回日期的指定范围的开端。

Expand All @@ -726,7 +730,7 @@ DATERANGESPLIT('1676563200, 1676735999', 'end' , 'YYYY.MM.DD hh:mm:ss') 得到 '
* `unit:string` 比如可以传入 'day'、'month'、'year' 或者 `week` 等等
* `format:string` 日期格式,可选

返回:`date` 新的日期对象
返回:`any` 新的日期对象, 如果传入 format 则返回格式化后的日期字符串

返回日期的指定范围的末尾。

Expand Down Expand Up @@ -936,7 +940,7 @@ DATEMODIFY(A, -2, 'month'),

* `arr:Array<any>` 数组

返回:`boolean` 结果
返回:`number` 结果

返回数组的长度。

Expand All @@ -947,22 +951,32 @@ DATEMODIFY(A, -2, 'month'),
* `arr:Array<any>` 数组
* `iterator:Array<any>` 箭头函数

返回:`boolean` 结果
返回:`Array<any>` 返回转换后的数组

数组做数据转换,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。

将数组中的每个元素转换成箭头函数返回的值。

示例:

ARRAYMAP([1, 2, 3], item => item + 1) 得到 [2, 3, 4]

### ARRAYFILTER

用法:`ARRAYFILTER(arr, item => item)`

* `arr:Array<any>` 数组
* `iterator:Array<any>` 箭头函数

返回:`boolean` 结果
返回:`Array<any>` 返回过滤后的数组

数据做数据过滤,需要搭配箭头函数一起使用,注意箭头函数只支持单表达式用法。
将第二个箭头函数返回为 false 的成员过滤掉。

示例:

ARRAYFILTER([1, 2, 3], item => item > 1) 得到 [2, 3]

### ARRAYFINDINDEX

用法:`ARRAYFINDINDEX(arr, item => item === 2)`
Expand Down Expand Up @@ -1063,7 +1077,7 @@ COMPACT([0, 1, false, 2, '', 3]) 得到 [1, 2, 3]。
* `arr:Array<any>` 数组
* `separator:String` 分隔符

返回:`String` 结果
返回:`string` 结果

数组转成字符串。

Expand Down Expand Up @@ -1098,7 +1112,7 @@ CONCAT(['a', 'b', 'c'], ['1'], ['3']) 得到 ['a', 'b', 'c', '1', '3']。

示例:

UNIQ([{a: '1'}, {b: '2'}, {a: '1'}], 'id')
UNIQ([{a: '1'}, {b: '2'}, {a: '1'}]) 得到 [{a: '1'}, {b: '2'}]

## 编码

Expand Down
Loading

0 comments on commit 40da906

Please sign in to comment.