|
|
|
@ -392,6 +392,13 @@ export default {
|
|
|
|
required: false,
|
|
|
|
required: false,
|
|
|
|
default: () => []
|
|
|
|
default: () => []
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
onComplete: {
|
|
|
|
|
|
|
|
type: Function,
|
|
|
|
|
|
|
|
required: false,
|
|
|
|
|
|
|
|
default () {
|
|
|
|
|
|
|
|
return () => {}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
withConfetti: {
|
|
|
|
withConfetti: {
|
|
|
|
type: Boolean,
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
required: false,
|
|
|
|
@ -696,6 +703,12 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.isCompleted = true
|
|
|
|
this.isCompleted = true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const respData = await response.text()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (respData) {
|
|
|
|
|
|
|
|
this.onComplete(JSON.parse(respData))
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch(error => {
|
|
|
|
}).catch(error => {
|
|
|
|
console.error('Error submitting form:', error)
|
|
|
|
console.error('Error submitting form:', error)
|
|
|
|
|