소스 검색

add submit message

lin-xin 8 년 전
부모
커밋
8aa589e1f2
3개의 변경된 파일11개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      src/components/page/BaseForm.vue
  2. 7 1
      src/components/page/VueEditor.vue
  3. 3 2
      src/components/page/VueTable.vue

+ 1 - 1
src/components/page/BaseForm.vue

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

+ 7 - 1
src/components/page/VueEditor.vue

@@ -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>

+ 3 - 2
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;
             })
         }