From f0e4121d1d25dff523a65863a1e8b67f4c10433d Mon Sep 17 00:00:00 2001 From: Aleksey Filippov Date: Wed, 29 May 2019 00:59:58 +0400 Subject: [PATCH] try-vue: add some examples of validataion via veevalidate --- src/main/resources/static/index.html | 3 + src/main/resources/static/js/app.js | 5 +- src/main/resources/static/other/other.vue | 27 +++++++- src/main/resources/static/other/var1.vue | 81 +++++++++++++++++++++++ src/main/resources/static/other/var2.vue | 78 ++++++++++++++++++++++ 5 files changed, 192 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/static/other/var1.vue create mode 100644 src/main/resources/static/other/var2.vue diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index 4da84b9..c0223d0 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -24,9 +24,12 @@ + + + diff --git a/src/main/resources/static/js/app.js b/src/main/resources/static/js/app.js index 0ac7342..c6f9c18 100644 --- a/src/main/resources/static/js/app.js +++ b/src/main/resources/static/js/app.js @@ -1,4 +1,4 @@ -/* global Vue, VueRouter, Vuex, httpVueLoaderEx */ +/* global Vue, VueRouter, Vuex, VeeValidate, httpVueLoaderEx */ var router = new VueRouter({ linkActiveClass: "active", @@ -64,6 +64,9 @@ var store = new Vuex.Store({ } }); +Vue.use(VeeValidate, { + validity: true +}); new Vue({ el: "#ng-tracker-app", router: router, diff --git a/src/main/resources/static/other/other.vue b/src/main/resources/static/other/other.vue index b9e8bcb..f77b921 100644 --- a/src/main/resources/static/other/other.vue +++ b/src/main/resources/static/other/other.vue @@ -1,5 +1,30 @@ \ No newline at end of file + + + \ No newline at end of file diff --git a/src/main/resources/static/other/var1.vue b/src/main/resources/static/other/var1.vue new file mode 100644 index 0000000..40ebbdc --- /dev/null +++ b/src/main/resources/static/other/var1.vue @@ -0,0 +1,81 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/static/other/var2.vue b/src/main/resources/static/other/var2.vue new file mode 100644 index 0000000..e55840c --- /dev/null +++ b/src/main/resources/static/other/var2.vue @@ -0,0 +1,78 @@ + + + + + \ No newline at end of file