Skip to content

Commit d6c7483

Browse files
committed
Fix AsyncSubmitForm example
1 parent 061f00f commit d6c7483

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

example/src/forms/AsyncSubmitForm/AsyncSubmitForm.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import Form, { Input } from '@detools/vue-form'
2-
import { Notification } from 'element-ui'
1+
import Form, { Input, Notification } from '@detools/vue-form'
32

43
export default {
54
data() {
@@ -9,14 +8,15 @@ export default {
98
},
109

1110
methods: {
12-
handleSubmit() {
11+
handleSubmit(values) {
1312
return new Promise(resolve => {
14-
setTimeout(resolve, 2000)
13+
setTimeout(() => {
14+
this.formValues = values
15+
16+
resolve()
17+
}, 2000)
1518
}).then(() => {
16-
Notification.success({
17-
title: 'Yay!',
18-
message: 'Async submission is working',
19-
})
19+
Notification.success('Async submission is working')
2020
})
2121
},
2222
},

0 commit comments

Comments
 (0)