refactor(components): add autoEdit call to story form component
				
					
				
			... if `canDraft` == false
This commit is contained in:
		
							parent
							
								
									6dfabd87d0
								
							
						
					
					
						commit
						410cb580d8
					
				| @ -15,7 +15,7 @@ | |||||||
| 		FormStory, | 		FormStory, | ||||||
| 		defaultChapter, | 		defaultChapter, | ||||||
| 	} from "~/lib/client/types/form/story"; | 	} from "~/lib/client/types/form/story"; | ||||||
| 	import { autoSave } from "~/lib/client/utils"; | 	import { autoEdit, autoSave } from "~/lib/client/utils"; | ||||||
| 
 | 
 | ||||||
| 	import findUser from "~/components/findUser.vue"; | 	import findUser from "~/components/findUser.vue"; | ||||||
| 
 | 
 | ||||||
| @ -59,7 +59,13 @@ | |||||||
| 		@submit="onSubmit" | 		@submit="onSubmit" | ||||||
| 		@invalid-submit="inval" | 		@invalid-submit="inval" | ||||||
| 	> --> | 	> --> | ||||||
| 	<form @submit="subCb" @change="() => canDraft && autoSave(values)"> | 	<form | ||||||
|  | 		@submit="subCb" | ||||||
|  | 		@change=" | ||||||
|  | 			() => | ||||||
|  | 				canDraft ? autoSave(values) : autoEdit(values, endpoint, endpointMethod) | ||||||
|  | 		" | ||||||
|  | 	> | ||||||
| 		<!-- <a-form v-bind:model="acData"> --> | 		<!-- <a-form v-bind:model="acData"> --> | ||||||
| 		<Field name="title" v-slot="{ value, field, errorMessage }"> | 		<Field name="title" v-slot="{ value, field, errorMessage }"> | ||||||
| 			<a-form-item | 			<a-form-item | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user