diff --git a/core/core-frontend/src/utils/canvasUtils.ts b/core/core-frontend/src/utils/canvasUtils.ts
index 50cdc8060c..fba260aea4 100644
--- a/core/core-frontend/src/utils/canvasUtils.ts
+++ b/core/core-frontend/src/utils/canvasUtils.ts
@@ -985,11 +985,12 @@ export function mobileViewStyleSwitch(component) {
}
export function syncViewTitle(element) {
- if (
- element &&
- ['UserView', 'VQuery'].includes(element.component) &&
- canvasViewInfo.value[element.id]
- ) {
- canvasViewInfo.value[element.id].title = element.name
+ if (element && canvasViewInfo.value[element.id]) {
+ if (['UserView'].includes(element.component)) {
+ canvasViewInfo.value[element.id].title = element.name
+ } else if (['VQuery'].includes(element.component)) {
+ canvasViewInfo.value[element.id].title = element.name
+ canvasViewInfo.value[element.id].customStyle.component.title = element.name
+ }
}
}
diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/VQueryChartStyle.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/VQueryChartStyle.vue
index c44bd5dece..5e7d0a8eed 100644
--- a/core/core-frontend/src/views/chart/components/editor/editor-style/VQueryChartStyle.vue
+++ b/core/core-frontend/src/views/chart/components/editor/editor-style/VQueryChartStyle.vue
@@ -1,8 +1,7 @@
@@ -286,6 +270,7 @@ initParams()
:effect="themes"
:disabled="!chart.customStyle.component.titleShow"
v-model.lazy="chart.customStyle.component.title"
+ @change="onTitleChange"
/>
{
return
}
view.value.title = inputComponentName.value.name
+ if (view.value.type === 'VQuery') {
+ view.value.customStyle.component.title = inputComponentName.value.name
+ }
if (curComponent.value) {
curComponent.value.label = inputComponentName.value.name
curComponent.value.name = inputComponentName.value.name