feat:text chart 增加长度校验

This commit is contained in:
wangwenrui
2020-10-21 12:00:30 +08:00
parent 4c5d9aa11c
commit 0840040fbd
6 changed files with 70 additions and 11 deletions

View File

@@ -562,7 +562,7 @@
});
}
} else {
console.log('error submit!!');
console.error('error submit!!');
return false;
}
});
@@ -892,13 +892,17 @@
});
}else{
this.$refs.chartForm.validate((valid) => {
let text=this.$refs.richTextEditor.getContent();
if(!text){
valid=false;
}
const params = {
title: this.editChart.title,//this.editChart
span: this.editChart.span,
height: this.editChart.height,
type: this.editChart.type,
param:{
text:this.$refs.richTextEditor.getHtml()
text:text
},
sync: this.editChart.sync
};
@@ -1283,6 +1287,10 @@
});
}else{
this.$refs.chartForm.validate((valid) => {
let text=this.$refs.richTextEditor.getContent();
if(!text){
valid=false;
}
const params = {
title: this.editChart.title,//this.editChart
span: this.editChart.span,
@@ -1290,7 +1298,7 @@
type: this.editChart.type,
unit:this.editChart.unit,
param:{
text:this.$refs.richTextEditor.getHtml()
text:text
}
};