From 1a9e86c9c12edd85e6eca48f4f9e60250c69520f Mon Sep 17 00:00:00 2001 From: cristi Date: Sun, 23 Apr 2017 17:02:01 +0300 Subject: [PATCH] #1 Handle promise based before-change functions. --- src/App.vue | 23 +++------- src/components/FormWizard.vue | 85 ++++++++++++++++++++++------------- 2 files changed, 59 insertions(+), 49 deletions(-) diff --git a/src/App.vue b/src/App.vue index 0ef3688..d99951c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,32 +5,18 @@ color="#e74c3c" class="card"> My first tab content - - - - - My second tab content - - - - - Yuhuuu! This seems pretty damn simple - - - - - @@ -45,12 +31,15 @@ onComplete () { alert('Yay!') }, - validate () { + validateAsync () { return new Promise((resolve, reject) => { setTimeout(() => { resolve(true) }, 1000) }) + }, + validate () { + return true } } } diff --git a/src/components/FormWizard.vue b/src/components/FormWizard.vue index d80dec8..89dd90a 100644 --- a/src/components/FormWizard.vue +++ b/src/components/FormWizard.vue @@ -43,7 +43,7 @@