From bf5e598de479869a9455bb9e233767b4fa184878 Mon Sep 17 00:00:00 2001 From: nuintun Date: Mon, 23 Nov 2015 22:34:25 +0800 Subject: [PATCH] update files --- static/js/components/app-configure/index.js | 8 ++++---- static/js/components/dynamic-item/index.js | 4 +--- static/js/components/project-base/index.js | 4 +--- static/js/components/project-configure/index.js | 10 ++++++---- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/static/js/components/app-configure/index.js b/static/js/components/app-configure/index.js index 63ba9db..f6eadb7 100644 --- a/static/js/components/app-configure/index.js +++ b/static/js/components/app-configure/index.js @@ -48,8 +48,8 @@ module.exports = Vue.component('app-configure', { if (!this.showPopup) { this.submitError = ''; - // clean imput - this.$broadcast('reset-form'); + // clean error + this.$broadcast('reset-error'); } }, add: function (){ @@ -64,8 +64,8 @@ module.exports = Vue.component('app-configure', { this.submitError = ''; - // clean imput - this.$broadcast('reset-form'); + // clean error + this.$broadcast('reset-error'); // send message this.$dispatch('change-active', this.configure.projects.length - 1, true); diff --git a/static/js/components/dynamic-item/index.js b/static/js/components/dynamic-item/index.js index 8729f16..ecb7e4d 100644 --- a/static/js/components/dynamic-item/index.js +++ b/static/js/components/dynamic-item/index.js @@ -91,9 +91,7 @@ module.exports = Vue.component('dynamic-item', { } }, events: { - 'reset-form': function (){ - this.name = ''; - this.value = ''; + 'reset-error': function (){ this.nameError = ''; this.valueError = ''; } diff --git a/static/js/components/project-base/index.js b/static/js/components/project-base/index.js index 900af2c..bae54b0 100644 --- a/static/js/components/project-base/index.js +++ b/static/js/components/project-base/index.js @@ -38,9 +38,7 @@ module.exports = Vue.component('project-base', { } }, events: { - 'reset-form': function (){ - this.name = ''; - this.path = ''; + 'reset-error': function (){ this.nameError = ''; this.pathError = ''; }, diff --git a/static/js/components/project-configure/index.js b/static/js/components/project-configure/index.js index 323ca6d..fca7686 100644 --- a/static/js/components/project-configure/index.js +++ b/static/js/components/project-configure/index.js @@ -70,16 +70,18 @@ module.exports = Vue.component('project-configure', { cancel: function (){ this.show = false; this.submitError = ''; - - this.$broadcast('reset-form'); - this.projectClone = util.clone(this.project); + + // clean error + this.$broadcast('reset-error'); } }, events: { 'configure-refresh': function (){ this.submitError = ''; - this.$broadcast('reset-form'); + + // clean error + this.$broadcast('reset-error'); } }, created: function (){