From c150631910487b8dcca917b91077074a71d2d684 Mon Sep 17 00:00:00 2001 From: cristijora Date: Tue, 5 Sep 2017 22:20:29 +0300 Subject: [PATCH] Update docs Add size jsfiddle example --- README.md | 1 + docs/README.md | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 0c7ace0..8fedff5 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Basic [demo](https://jsfiddle.net/bt5dhqtf/97/) Other demos: * [Squared steps](https://jsfiddle.net/bt5dhqtf/98/) * [Tabbed steps](https://jsfiddle.net/bt5dhqtf/99/) +* [Sizing](https://jsfiddle.net/CristiJ/bt5dhqtf/924/) * [Step index](https://jsfiddle.net/bt5dhqtf/100/) Start at any step. Note: start-index is zero-based and the count starts at 0 * [Custom button and title text](https://jsfiddle.net/bt5dhqtf/101/) * [Custom title slot](https://jsfiddle.net/bt5dhqtf/102/) diff --git a/docs/README.md b/docs/README.md index c0e2ac1..b094e5a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -70,6 +70,14 @@ props: { type: String, default: 'Finish' }, + stepSize: { + type: String, + default: 'md', + validator: (value) => { + let acceptedValues = ['xs', 'sm', 'md', 'lg'] + return acceptedValues.indexOf(value) !== -1 + } + }, /*** * Sets validation (on/off) for back button. By default back button ignores validation */ @@ -142,6 +150,8 @@ Vue-form-wizard emits certain events when certain actions happen inside the comp * **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 +* **on-change** Called upon step changes. Has prevIndex and nextIndes as params. `this.$emit('on-change', prevIndex, nextIndex)` + ## Slots * **Default** - Used for tab-contents * **title** - Upper title section including sub-title