refactor:仪表板名称限制在50字符内

This commit is contained in:
wangjiahao 2021-07-29 18:00:07 +08:00
parent d641d71753
commit 22ff43afc9

View File

@ -133,6 +133,13 @@ export default {
this.$warning(this.$t('chart.name_can_not_empty')) this.$warning(this.$t('chart.name_can_not_empty'))
return false return false
} }
debugger
if (this.editPanel.panelInfo.name.length > 50) {
this.$warning(this.$t('commons.char_can_not_more_50'))
return false
}
if (!this.editPanel.panelInfo.panelData && this.editPanel.optType === 'new' && this.inputType === 'copy') { if (!this.editPanel.panelInfo.panelData && this.editPanel.optType === 'new' && this.inputType === 'copy') {
this.$warning(this.$t('chart.template_can_not_empty')) this.$warning(this.$t('chart.template_can_not_empty'))
return false return false