File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed
Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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 ` 类
Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff line change 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!" ,
You can’t perform that action at this time.
0 commit comments