Skip to content

Commit

Permalink
fix: 修复 inputDateRange 的 clear 动作只清楚了开始时间的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Feb 17, 2025
1 parent 884a816 commit a379741
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/amis-core/src/store/formItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,14 @@ export const FormItemStore = StoreNode.named('FormItemStore')
},
splitExtraValue(value: any) {
const delimiter = self.delimiter || ',';
const values = Array.isArray(value)
? value
: typeof value === 'string'
? value.split(delimiter || ',').map((v: string) => v.trim())
: [];
const values =
value === ''
? ['', '']
: Array.isArray(value)
? value
: typeof value === 'string'
? value.split(delimiter || ',').map((v: string) => v.trim())
: [];
return values;
},

Expand Down

0 comments on commit a379741

Please sign in to comment.