更改画布标题

This commit is contained in:
李志鹏
2026-01-22 11:19:12 +08:00
parent ea4b27776a
commit 1b30a7a873
6 changed files with 32 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ const layerManager = inject("layerManager");
const isShowLayerPanel = inject("isShowLayerPanel", ref(false));
const props = defineProps({
title: String,
activeTool: String,
canvasWidth: Number,
canvasHeight: Number,
@@ -274,7 +275,7 @@ onMounted(() => {
<template>
<div class="canvas-header">
<div class="canvas-header-wrapper">
<span class="canvas-title">{{ $t('Canvas.Canvas') }}</span>
<span class="canvas-title">{{ props.title || $t("Canvas.Canvas") }}</span>
<!-- 默认设置 -->
<!-- v-if="
!activeTool ||

View File

@@ -67,6 +67,10 @@ const emit = defineEmits([
]);
const props = defineProps({
title: {
type: String,
default: "", // 默认空
},
canvasJSON: {
type: [Object, String],
default: "", // 默认空
@@ -1192,6 +1196,7 @@ isContainNormalLayer})
<!-- 头部菜单组件 -->
<div class="header-menu">
<HeaderMenu
:title="props.title"
v-if="canvasManagerLoaded"
:activeTool="activeTool"
:canvasWidth="canvasWidth"