From 8aa589e1f26bf43bef04bfb1ff43dd0f752c7122 Mon Sep 17 00:00:00 2001 From: lin-xin <2981207131@qq.com> Date: Sat, 4 Mar 2017 10:22:34 +0800 Subject: [PATCH] add submit message --- src/components/page/BaseForm.vue | 2 +- src/components/page/VueEditor.vue | 8 +++++++- src/components/page/VueTable.vue | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/page/BaseForm.vue b/src/components/page/BaseForm.vue index b0850fc..86bc755 100644 --- a/src/components/page/BaseForm.vue +++ b/src/components/page/BaseForm.vue @@ -75,7 +75,7 @@ }, methods: { onSubmit() { - console.log('submit!'); + this.$message.success('提交成功!'); } } } diff --git a/src/components/page/VueEditor.vue b/src/components/page/VueEditor.vue index 2b7e147..a7bc340 100644 --- a/src/components/page/VueEditor.vue +++ b/src/components/page/VueEditor.vue @@ -35,6 +35,7 @@ }, submit(){ console.log(this.content); + this.$message.success('提交成功!'); } }, computed: { @@ -43,4 +44,9 @@ } } } - \ No newline at end of file + + \ No newline at end of file diff --git a/src/components/page/VueTable.vue b/src/components/page/VueTable.vue index c61528b..e53b3a6 100644 --- a/src/components/page/VueTable.vue +++ b/src/components/page/VueTable.vue @@ -22,6 +22,7 @@ import Datasource from 'vue-datasource'; export default { data: function(){ + const self = this; return { information: { pagination:{}, @@ -50,7 +51,7 @@ text: 'Click', class: 'btn-primary', event(e, row) { - alert('Click row: ' + row.row.id); + self.$message('选中的行数: ' + row.row.id); } } ], @@ -80,7 +81,7 @@ } }, beforeMount(){ - axios.get('../../../static/data.json').then( (res) => { + axios.get('/static/data.json').then( (res) => { this.information = res.data; }) }