Commit b9186b87 by crushh

update: 更新频次响应式变化

parent fd065b63
......@@ -444,24 +444,26 @@ export default {
ruleForm: {
deep: true,
handler: function(n,o){
console.log(0)
let flag =
this.ruleForm.selectedTags.length === 0 ||
this.ruleForm.selectedTags.some(tagsGroup => {
return tagsGroup.length === 0 || tagsGroup.some(tag => parseInt(tag.isActive) === 0);
});
this.ruleForm.isActive = flag ? 0 : 1;
this.handlerIsActive(this.ruleForm.isActive);
}
},
'ruleForm.isActive'(newVal) {
const { fixedType } = this.ruleForm;
this.ruleForm.updateType = this.watchUpdateType(newVal, fixedType);
},
'ruleForm.fixedType'(newVal) {
const { isActive } = this.ruleForm;
this.ruleForm.updateType = this.watchUpdateType(isActive, newVal);
}
},
methods: {
handlerIsActive(newVal){
const { fixedType } = this.ruleForm;
this.ruleForm.updateType = this.watchUpdateType(newVal, fixedType);
},
validPeriodDateChange(v){
this.ruleForm.fixedTime=parseTime(fixBeginTime)
......@@ -768,6 +770,7 @@ export default {
}
},
watchUpdateType(isActive, fixedType) {
console.log(isActive, fixedType)
if (isActive && !fixedType) {
return 1;
} else if (!isActive && !fixedType) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment