Authored by dongjunjie

grid中ajax替换

import Vue from 'vue';
import app from './app';
Vue.use(require('vue-resource'));
new Vue({
el: 'body',
... ...
var Vue = require("vue");
Vue.use(require('vue-resource'));
new Vue({
el: 'body',
... ...
... ... @@ -3,6 +3,7 @@
*/
import Vue from 'vue';
import app from './app';
Vue.use(require('vue-resource'));
new Vue({
el: 'body',
... ...
... ... @@ -106,7 +106,19 @@
me.page=0;
}
};
$.ajax(ajaxOptions);
//$.ajax(ajaxOptions);
this.$http.post(me.url, data).then(function (response) {
var res = response.data;
me.$dispatch('complete', res.data);
me.data = res.data.list;
me.rowsTotal = res.data.totalPage;
me.page = res.data.page
},function (response) {
me.rowsTotal=0;
me.page=0;
});
},
bodyCell:function(row,col){
if (!row || !col) return "";
... ...