From 1e705835d0e62da6d2a53a76e413fb8dc6b279c1 Mon Sep 17 00:00:00 2001 From: nuintun Date: Mon, 23 Nov 2015 22:41:49 +0800 Subject: [PATCH] update files --- static/js/components/dynamic-item/index.js | 4 ++++ static/js/components/project-configure/index.js | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/static/js/components/dynamic-item/index.js b/static/js/components/dynamic-item/index.js index ecb7e4d..4d755a1 100644 --- a/static/js/components/dynamic-item/index.js +++ b/static/js/components/dynamic-item/index.js @@ -94,6 +94,10 @@ module.exports = Vue.component('dynamic-item', { 'reset-error': function (){ this.nameError = ''; this.valueError = ''; + }, + 'reset-input': function (){ + this.name = ''; + this.value = ''; } } }); diff --git a/static/js/components/project-configure/index.js b/static/js/components/project-configure/index.js index fca7686..3bed4de 100644 --- a/static/js/components/project-configure/index.js +++ b/static/js/components/project-configure/index.js @@ -64,6 +64,11 @@ module.exports = Vue.component('project-configure', { // send message this.$dispatch('edit', util.clone(this.projectClone)); + + // clean error + this.$broadcast('reset-error'); + // clean input + this.$broadcast('reset-input'); } } }, @@ -74,6 +79,8 @@ module.exports = Vue.component('project-configure', { // clean error this.$broadcast('reset-error'); + // clean input + this.$broadcast('reset-input'); } }, events: { @@ -82,6 +89,8 @@ module.exports = Vue.component('project-configure', { // clean error this.$broadcast('reset-error'); + // clean input + this.$broadcast('reset-input'); } }, created: function (){