add submit message

pull/38/head
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: { methods: {
onSubmit() { onSubmit() {
console.log('submit!'); this.$message.success('提交成功!');
} }
} }
} }

View File

@ -35,6 +35,7 @@
}, },
submit(){ submit(){
console.log(this.content); console.log(this.content);
this.$message.success('提交成功!');
} }
}, },
computed: { 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'; import Datasource from 'vue-datasource';
export default { export default {
data: function(){ data: function(){
const self = this;
return { return {
information: { information: {
pagination:{}, pagination:{},
@ -50,7 +51,7 @@
text: 'Click', text: 'Click',
class: 'btn-primary', class: 'btn-primary',
event(e, row) { event(e, row) {
alert('Click row: ' + row.row.id); self.$message('选中的行数: ' + row.row.id);
} }
} }
], ],
@ -80,7 +81,7 @@
} }
}, },
beforeMount(){ beforeMount(){
axios.get('../../../static/data.json').then( (res) => { axios.get('/static/data.json').then( (res) => {
this.information = res.data; this.information = res.data;
}) })
} }