forked from github/dataease
fix: 限制標題長度
This commit is contained in:
parent
1fb3f2ee3b
commit
6b5d27aa72
@ -668,7 +668,8 @@ export default {
|
||||
only_one_quota: 'Only support 1 quota',
|
||||
only_one_result: 'Only show first result',
|
||||
dimension_show: 'Dimension Show',
|
||||
quota_show: 'Quota Show'
|
||||
quota_show: 'Quota Show',
|
||||
title_limit: 'Title cannot be greater than 50 characters'
|
||||
},
|
||||
dataset: {
|
||||
datalist: 'Data Set',
|
||||
|
@ -668,7 +668,8 @@ export default {
|
||||
only_one_quota: '僅支持1個指標',
|
||||
only_one_result: '僅顯示第1個計算結果',
|
||||
dimension_show: '維度顯示',
|
||||
quota_show: '指標顯示'
|
||||
quota_show: '指標顯示',
|
||||
title_limit: '標題不能大於50個字符'
|
||||
},
|
||||
dataset: {
|
||||
datalist: '數據集',
|
||||
|
@ -670,7 +670,8 @@ export default {
|
||||
only_one_quota: '仅支持1个指标',
|
||||
only_one_result: '仅显示第1个计算结果',
|
||||
dimension_show: '维度显示',
|
||||
quota_show: '指标显示'
|
||||
quota_show: '指标显示',
|
||||
title_limit: '标题不能大于50个字符'
|
||||
},
|
||||
dataset: {
|
||||
datalist: '数据集',
|
||||
|
@ -407,6 +407,10 @@ export default {
|
||||
view.id = this.view.id
|
||||
view.sceneId = this.view.sceneId
|
||||
view.name = this.view.name ? this.view.name : this.table.name
|
||||
if (view.title.length > 50) {
|
||||
this.$warning(this.$t('chart.title_limit'))
|
||||
return
|
||||
}
|
||||
view.tableId = this.view.tableId
|
||||
view.xaxis.forEach(function(ele) {
|
||||
// if (!ele.summary || ele.summary === '') {
|
||||
@ -459,6 +463,10 @@ export default {
|
||||
})
|
||||
},
|
||||
closeEdit() {
|
||||
if (this.view.title.length > 50) {
|
||||
this.$warning(this.$t('chart.title_limit'))
|
||||
return
|
||||
}
|
||||
html2canvas(this.$refs.imageWrapper).then(canvas => {
|
||||
const snapshot = canvas.toDataURL('image/jpeg', 0.1) // 0.1是图片质量
|
||||
if (snapshot !== '') {
|
||||
|
Loading…
Reference in New Issue
Block a user