From ec69e7b5f30d9b16cc8ab1a341c1e9d34cacd52c Mon Sep 17 00:00:00 2001 From: Cristi Jora Date: Wed, 26 Apr 2017 22:07:14 +0300 Subject: [PATCH] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bea4c6f..d3c0208 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ Other demos: * [Custom title slot](https://jsfiddle.net/bt5dhqtf/102/) * [Customized buttons with slots](https://jsfiddle.net/bt5dhqtf/103/) Replace stuff you don't like * [Call a function before tab switch](https://jsfiddle.net/bt5dhqtf/105/) -* [Complete form example](https://jsfiddle.net/bt5dhqtf/150/) integrated with [vue-form-generator](https://github.com/icebob/vue-form-generator) +* [Complete form example](https://jsfiddle.net/CristiJ/bt5dhqtf/286/) integrated with [vue-form-generator](https://github.com/icebob/vue-form-generator) * [Vue router integration](https://jsfiddle.net/bt5dhqtf/267/) You can place a `router-view` inside the wizard and have a separate page per tab. A `route` prop must be passed to the tabs you want to handle certain tabs -* [Async validation](https://jsfiddle.net/bt5dhqtf/272/) `before-change` prop can accept a promise that is resolved with `true` which will execute the promise before switching to another step/tab (NOTE: This feature is not present in the npm package yet) +* [Async validation with error message](https://jsfiddle.net/CristiJ/bt5dhqtf/298//) `before-change` prop can accept a promise that is resolved with `true` which will execute the promise before switching to another step/tab (NOTE: This feature is not present in the npm package yet) # Usage @@ -153,7 +153,7 @@ Vue-form-wizard emits certain events when certain actions happen inside the comp * **on-complete** Called when the finish button is clicked and the `before-change` for the last step (if present) was executed. No params are sent together with this event. `this.$emit('on-complete')` * **on-loading** Called whenever an async `before-change` is executed. This event is emitted before executing `before-change` and after finishing execution of `before-change` method. `on-loading` is emitted together with a Boolean value. `this.$emit('on-loading', value)` * **on-validate** Called whenever the execution of a `before-change` method is completed. The event sends along a Boolean which represents the validation result as well as an int with te tab index. `this.$emit('on-validate', validationResult, this.activeTabIndex)` - +* **on-error** Called when `before-change` is a promised and is rejected with a message. The message is passed along `this.$emit('on-error', error)` See async validation fiddle ## Slots * **Default** - Used for tab-contents * **title** - Upper title section including sub-title