File tree 4 files changed +12
-5
lines changed
4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " form-api-ex" ,
3
- "version" : " 0.4.0 " ,
3
+ "version" : " 0.4.1 " ,
4
4
"description" : " Work with LLSE forms easily!" ,
5
5
"main" : " lib/FormAPIEx.cjs" ,
6
6
"module" : " lib/FormAPIEx.mjs" ,
Original file line number Diff line number Diff line change @@ -124,6 +124,10 @@ QQ:3076823485
124
124
125
125
## 更新日志
126
126
127
+ ### 0.4.1
128
+
129
+ - 修复 ` SimpleFormEx ` 的默认 ` searcher ` 的一些问题
130
+
127
131
### 0.4.0
128
132
129
133
- 新增 ` SimpleFormOperational ` 类
Original file line number Diff line number Diff line change @@ -54,12 +54,15 @@ export class SimpleFormEx<T> {
54
54
buttons ,
55
55
param
56
56
) : 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
+ ) ;
59
61
const result : T [ ] = [ ] ;
60
62
formatted . forEach ( ( v , i ) => {
61
63
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 ) ;
63
66
}
64
67
} ) ;
65
68
return result ;
Original file line number Diff line number Diff line change 2
2
"$schema" : " https://raw.githubusercontent.com/lippkg/lip/main/schemas/tooth.v2.schema.json" ,
3
3
"format_version" : 2 ,
4
4
"tooth" : " github.com/lgc-LLDev/FormAPIEx" ,
5
- "version" : " 0.4.0 " ,
5
+ "version" : " 0.4.1 " ,
6
6
"info" : {
7
7
"name" : " FormAPIEx" ,
8
8
"description" : " Work with LSE forms easily!" ,
You can’t perform that action at this time.
0 commit comments