fix
This commit is contained in:
		
							parent
							
								
									bb1f87292f
								
							
						
					
					
						commit
						b34cc75d4f
					
				| @ -1,15 +1,16 @@ | ||||
| <script setup lang="ts"> | ||||
| import JSON5 from 'json5'; | ||||
| import stringifyObject from 'stringify-object'; | ||||
| import type { UseValidationRule } from '@/composable/validation'; | ||||
| import { isNotThrowing } from '@/utils/boolean'; | ||||
| import { withDefaultOnError } from '@/utils/defaults'; | ||||
| import stringifyObject from "stringify-object" | ||||
| 
 | ||||
| const transformer = (value: string) => withDefaultOnError(() => stringifyObject(JSON5.parse(value), { | ||||
| 	indent: '  ', | ||||
| 	singleQuotes: false | ||||
| }), ''); | ||||
| 
 | ||||
| function transformer(value: string) { | ||||
|   return withDefaultOnError(() => stringifyObject(JSON5.parse(value), { | ||||
|     indent: '  ', | ||||
|     singleQuotes: false, | ||||
|   }), ''); | ||||
| } | ||||
| 
 | ||||
| const rules: UseValidationRule<string>[] = [ | ||||
|   { | ||||
| @ -28,4 +29,4 @@ const rules: UseValidationRule<string>[] = [ | ||||
|     :input-validation-rules="rules" | ||||
|     :transformer="transformer" | ||||
|   /> | ||||
| </template> | ||||
| </template> | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user