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