1- Vue . config . debug = true ;
2- Vue . config . devtools = true ;
1+ // Vue.config.debug = true;
2+ // Vue.config.devtools = true;
33
44new Vue ( {
55 el : '#app' ,
@@ -11,24 +11,33 @@ new Vue({
1111 showFilter : true ,
1212 showPicker : true ,
1313 paginated : true ,
14+ ajax : {
15+ enabled : false ,
16+ url : "http://localhost:9430/data/test" ,
17+ method : "POST" ,
18+ delegate : true ,
19+ } ,
1420 columns : [
1521 {
1622 title :"id" ,
1723 visible : true ,
1824 editable : false ,
1925 } ,
2026 {
21- title :"name" ,
27+ title :"Name" ,
28+ name : "name" ,
2229 visible : true ,
2330 editable : true ,
2431 } ,
2532 {
26- title :"age" ,
33+ title :"Age" ,
34+ name : "age" ,
2735 visible : true ,
2836 editable : true ,
2937 } ,
3038 {
31- title :"country" ,
39+ title :"Country" ,
40+ name : "country" ,
3241 visible : true ,
3342 editable : true ,
3443 }
@@ -54,7 +63,26 @@ new Vue({
5463 }
5564 ]
5665 } ,
57- ready : function ( ) {
66+ created : function ( ) {
67+ var self = this ;
68+ this . $on ( 'cellDataModifiedEvent' ,
69+ function ( originalValue , newValue , columnTitle , entry ) {
70+ self . logging . push ( "cellDataModifiedEvent - Original Value : " + originalValue +
71+ " | New Value : " + newValue +
72+ " | Column : " + columnTitle +
73+ " | Complete Entry : " + entry ) ;
74+ }
75+ ) ;
76+ this . $on ( 'ajaxLoadedEvent' ,
77+ function ( data ) {
78+ this . logging . push ( "ajaxLoadedEvent - data : " + data ) ;
79+ }
80+ ) ;
81+ this . $on ( 'ajaxLoadingError' ,
82+ function ( error ) {
83+ this . logging . push ( "ajaxLoadingError - error : " + error ) ;
84+ }
85+ ) ;
5886 } ,
5987 methods : {
6088 addItem : function ( ) {
@@ -77,12 +105,4 @@ new Vue({
77105 this . paginated = ! this . paginated ;
78106 }
79107 } ,
80- events : {
81- cellDataModifiedEvent : function ( originalValue , newValue , columnTitle , entry ) {
82- this . logging . push ( "Original Value : " + originalValue +
83- " | New Value : " + newValue +
84- " | Column : " + columnTitle +
85- " | Complete Entry : " + entry ) ;
86- } ,
87- } ,
88108} ) ;
0 commit comments