Skip to content

Commit 096c381

Browse files
committed
0.4.1
1 parent 94abb24 commit 096c381

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "form-api-ex",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "Work with LLSE forms easily!",
55
"main": "lib/FormAPIEx.cjs",
66
"module": "lib/FormAPIEx.mjs",

Diff for: readme.md

+4
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ QQ:3076823485
124124

125125
## 更新日志
126126

127+
### 0.4.1
128+
129+
- 修复 `SimpleFormEx` 的默认 `searcher` 的一些问题
130+
127131
### 0.4.0
128132

129133
- 新增 `SimpleFormOperational`

Diff for: src/simple-ex.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,15 @@ export class SimpleFormEx<T> {
5454
buttons,
5555
param
5656
): T[] => {
57-
const params = param.split(/\s/g);
58-
const formatted = this.formatButtons(buttons).map((v) => v[0]);
57+
const params = param.toLowerCase().split(/\s/g);
58+
const formatted = this.formatButtons(buttons).map((v) =>
59+
v[0].toLowerCase()
60+
);
5961
const result: T[] = [];
6062
formatted.forEach((v, i) => {
6163
for (const wd of params) {
62-
if (v.includes(wd)) result.push(buttons[i]);
64+
const btn = buttons[i];
65+
if (v.includes(wd) && !result.includes(btn)) result.push(btn);
6366
}
6467
});
6568
return result;

Diff for: tooth.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://raw.githubusercontent.com/lippkg/lip/main/schemas/tooth.v2.schema.json",
33
"format_version": 2,
44
"tooth": "github.com/lgc-LLDev/FormAPIEx",
5-
"version": "0.4.0",
5+
"version": "0.4.1",
66
"info": {
77
"name": "FormAPIEx",
88
"description": "Work with LSE forms easily!",

0 commit comments

Comments
 (0)