From f8298e896df78a9a3dffab3ce51b36d9c07092ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com>
Date: Tue, 29 Oct 2024 15:26:31 +0800
Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=96=87=E6=9C=AC?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A1=8C=E9=97=B4=E8=B7=9D=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../common/custom-module/model-text/index.vue | 2 +-
.../custom-module/model-text/model-text-style.vue | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/components/common/custom-module/model-text/index.vue b/src/components/common/custom-module/model-text/index.vue
index 8c419bfc..d56d8b78 100644
--- a/src/components/common/custom-module/model-text/index.vue
+++ b/src/components/common/custom-module/model-text/index.vue
@@ -51,7 +51,7 @@ const text_title = computed(() => {
});
const text_style = computed(() => {
- let style = `font-size: ${ form.text_size * props.scale }px;line-height: ${ form.text_size * props.scale}px;color: ${ form.text_color }; text-align: ${ form.text_location }; transform: rotate(${form.text_rotate}deg);text-decoration: ${ form.text_option };${ padding_computer(form.text_padding, props.scale) };`;
+ let style = `font-size: ${ form.text_size * props.scale }px;line-height: ${ (typeof form.line_text_size === "number" ? form.line_text_size : form.text_size) * props.scale}px;color: ${ form.text_color }; text-align: ${ form.text_location }; transform: rotate(${form.text_rotate}deg);text-decoration: ${ form.text_option };${ padding_computer(form.text_padding, props.scale) };`;
if (form.text_weight == 'italic') {
style += `font-style: italic`;
} else if (form.text_weight == '500') {
diff --git a/src/components/common/custom-module/model-text/model-text-style.vue b/src/components/common/custom-module/model-text/model-text-style.vue
index e8c379a2..9c547459 100644
--- a/src/components/common/custom-module/model-text/model-text-style.vue
+++ b/src/components/common/custom-module/model-text/model-text-style.vue
@@ -29,9 +29,12 @@
正常
倾斜
-
+
+
+
+
@@ -146,15 +149,19 @@ const mult_color_picker_event = (arry: color_list[], type: number) => {
form.value.direction = type.toString();
};
+watchEffect(() => {
+ form.value.line_text_size = form.value.text_size;
+});
+
watch(
diy_data,
(val) => {
+
diy_data.value.location.x = location_compute(form.value.com_width, val.location.x, 390);
diy_data.value.location.y = location_compute(form.value.com_height, val.location.y, center_height.value);
diy_data.value.location.record_x = location_compute(form.value.com_width, val.location.record_x, 390);
diy_data.value.location.record_y = location_compute(form.value.com_height, val.location.record_y, center_height.value);
diy_data.value.location.staging_y = location_compute(form.value.com_height, val.location.staging_y, center_height.value);
-
form.value.staging_height = form.value.com_height;
},
{ immediate: true, deep: true }