forked from github/dataease
Merge pull request #2062 from dataease/pr@dev@refactor-anvt-title
refactor: 增加antv视图title重复校验
This commit is contained in:
commit
e9c2b36604
@ -43,6 +43,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { COLOR_PANEL, DEFAULT_TITLE_STYLE } from '../../chart/chart'
|
import { COLOR_PANEL, DEFAULT_TITLE_STYLE } from '../../chart/chart'
|
||||||
|
import { checkTitle } from '@/api/chart/chart'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TitleSelectorAntV',
|
name: 'TitleSelectorAntV',
|
||||||
@ -107,10 +108,18 @@ export default {
|
|||||||
this.titleForm.title = this.chart.title
|
this.titleForm.title = this.chart.title
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.titleForm.show) {
|
checkTitle({ id: this.chart.id, title: this.titleForm.title, sceneId: this.chart.sceneId }).then((rsp) => {
|
||||||
this.isSetting = false
|
if (rsp.data === 'success') {
|
||||||
}
|
if (!this.titleForm.show) {
|
||||||
this.$emit('onTextChange', this.titleForm)
|
this.isSetting = false
|
||||||
|
}
|
||||||
|
this.$emit('onTextChange', this.titleForm)
|
||||||
|
} else {
|
||||||
|
this.$error(this.$t('chart.title_repeat'))
|
||||||
|
this.titleForm.title = this.chart.title
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
inputOnInput: function(e) {
|
inputOnInput: function(e) {
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
|
Loading…
Reference in New Issue
Block a user