From abf8d04569f22687ba69e1913b47ea4c37864fc1 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 31 Dec 2021 16:16:30 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/components/TextAttr.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue index 68b3822a67..511ee8c81d 100644 --- a/frontend/src/components/canvas/components/TextAttr.vue +++ b/frontend/src/components/canvas/components/TextAttr.vue @@ -150,6 +150,7 @@ import Hyperlinks from '@/components/canvas/components/Editor/Hyperlinks' import VideoLinks from '@/components/canvas/components/Editor/VideoLinks' import DateFormat from '@/components/canvas/components/Editor/DateFormat' import { COLOR_PANEL } from '@/views/chart/chart/chart' +import { chartTransStr2Object } from '@/views/panel/panel' export default { components: { Hyperlinks, DateFormat, VideoLinks }, @@ -332,6 +333,14 @@ export default { }, watch: { + styleInfo: { + handler(newVal, oldVla) { + if (newVal.fontSize) { + this.initFontSize = newVal.fontSize + } + }, + deep: true + }, innerOpacity: { handler(oldVal, newVal) { this.styleInfo['opacity'] = this.innerOpacity / 100 @@ -405,12 +414,7 @@ export default { getPositionY(y) { return y * this.curCanvasScale.scalePointHeight }, - fontSizeChange(val) { - this.styleInfo.fontSize = val - this.styleChange() - }, styleChange() { - console.log('styleChange') this.$store.commit('recordStyleChange') } }