Commit 34366e98 by caoyanzhi

编辑分组时,拦截无标签

parent 3b4afb02
......@@ -362,10 +362,15 @@ export default {
this.$refs.ruleForm.validate(valid => {
if (valid) {
const flag = this.ruleForm.isActive === 0 && this.ruleForm.updateType !== 1 && this.ruleForm.updateDay === '';
const isEmpty = this.ruleForm.selectedTags.length === 0 || this.ruleForm.selectedTags.every(item => item.length === 0);
if (flag) {
this.$message.error({ message: '请选择更新频率!' });
return false;
}
if (isEmpty) {
this.$message.error({ message: '请至少保留一个标签!' });
return false;
}
this.postSave();
}
});
......
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