|
@@ -65,7 +65,9 @@ export default {
|
|
|
keepRatio: true,
|
|
keepRatio: true,
|
|
|
originalRatio: 1, // 原始宽高比
|
|
originalRatio: 1, // 原始宽高比
|
|
|
lastAdjusted: 'width' // 最后调整的维度 ('width' 或 'height')
|
|
lastAdjusted: 'width' // 最后调整的维度 ('width' 或 'height')
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ // 响应式的文字内容状态(用于解决markRaw后的响应式问题)
|
|
|
|
|
+ reactiveTextContent: ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
@@ -120,6 +122,9 @@ export default {
|
|
|
fill: this.editLayer?.fill ?? '#000000',
|
|
fill: this.editLayer?.fill ?? '#000000',
|
|
|
textAlign: this.editLayer?.textAlign ?? 'left',
|
|
textAlign: this.editLayer?.textAlign ?? 'left',
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 同步响应式文字内容状态
|
|
|
|
|
+ this.reactiveTextContent = this.editLayer?.text ?? '';
|
|
|
switch (this.editLayer.type){
|
|
switch (this.editLayer.type){
|
|
|
case "textbox":
|
|
case "textbox":
|
|
|
if(this.editLayer.shadow){
|
|
if(this.editLayer.shadow){
|
|
@@ -215,6 +220,9 @@ export default {
|
|
|
textAlign: this.editLayer?.textAlign ?? 'left',
|
|
textAlign: this.editLayer?.textAlign ?? 'left',
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 同步响应式文字内容状态
|
|
|
|
|
+ this.reactiveTextContent = this.editLayer?.text ?? '';
|
|
|
|
|
+
|
|
|
// 更新图片尺寸显示
|
|
// 更新图片尺寸显示
|
|
|
if (this.editLayer && this.editLayer.type === 'image') {
|
|
if (this.editLayer && this.editLayer.type === 'image') {
|
|
|
const originalWidth = this.editLayer.width || 100;
|
|
const originalWidth = this.editLayer.width || 100;
|