add submit message

This commit is contained in:
lin-xin 2017-03-04 10:22:34 +08:00
parent 0812b4b1a9
commit 8aa589e1f2
3 changed files with 11 additions and 4 deletions

View File

@ -75,7 +75,7 @@
},
methods: {
onSubmit() {
console.log('submit!');
this.$message.success('提交成功!');
}
}
}

View File

@ -35,6 +35,7 @@
},
submit(){
console.log(this.content);
this.$message.success('提交成功!');
}
},
computed: {
@ -43,4 +44,9 @@
}
}
}
</script>
</script>
<style scoped>
.editor-btn{
margin-top: 20px;
}
</style>

View File

@ -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;
})
}