computed watch 使用不了?
const moment = require("moment");
const {qxCloud } = require('../../../api/qxcloud');
const app = getApp();
const computedBehavior = require('miniprogram-computed');
Page({
behaviors: [computedBehavior],
/**
* 页面的初始数据
*/
data: {
currentTab: "statistic",
currnet:1,
remedy:{
rows:[],
page:1,
pageSize:10,
total:0,
loadEmpty:false,
isLoading:false
},
errand:{
rows:[],
page:1,
pageSize:10,
total:0,
loadEmpty:false,
isLoading:false
},
vacations:{
rows:[],
page:1,
pageSize:10,
total:0,
loadEmpty:false,
isLoading:false
},
},
watch: {
'remedy.**'(remedy){
console.log(remedy.rows);
let self = this;
if(self.data.currentTab == 'remedy' && self.data.batch_op.doing){
console.log(remedy.rows);
}
},
'vacations.**'(vacations){
console.log(remedy.rows);
let self = this;
if(self.data.currentTab == 'vacation' && self.data.batch_op.doing){
console.log(vacations.rows);
}
},
'errand.**'(errand){
console.log(remedy.rows);
let self = this;
if(self.data.currentTab == 'errand' && self.data.batch_op.doing){
console.log(errand.rows);
}
},
},
}