From 19c4962979f63164e3afa0889836bd2cea71457e Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 21 Oct 2021 17:46:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E6=9D=BF=E6=97=B6=E9=97=B4=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/canvas/components/TextAttr.vue | 22 +++++- .../canvas/custom-component/component-list.js | 4 +- frontend/src/components/canvas/utils/style.js | 3 +- .../components/widget/DeWidget/DeShowDate.vue | 10 +++ .../widget/DeWidget/TimeDefault.vue | 14 +++- .../components/widget/DeWidget/TimeElec.vue | 6 ++ .../components/widget/DeWidget/TimeSimple.vue | 68 ++++++++++++------ frontend/src/lang/zh.js | 2 + frontend/src/styles/deicon/iconfont.css | 14 +++- frontend/src/styles/deicon/iconfont.js | 2 +- frontend/src/styles/deicon/iconfont.json | 14 ++++ frontend/src/styles/deicon/iconfont.ttf | Bin 17784 -> 18284 bytes frontend/src/styles/deicon/iconfont.woff | Bin 10952 -> 11108 bytes frontend/src/styles/deicon/iconfont.woff2 | Bin 9204 -> 9352 bytes 14 files changed, 130 insertions(+), 29 deletions(-) diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue index 0d90b84d2a..ac270ee15d 100644 --- a/frontend/src/components/canvas/components/TextAttr.vue +++ b/frontend/src/components/canvas/components/TextAttr.vue @@ -70,6 +70,22 @@ + + + + +
+ +
+ + + + + +
+ +
+ @@ -121,7 +137,7 @@ -
+
@@ -242,7 +258,9 @@ export default { 'borderRadius', 'color', 'backgroundColor', - 'date-format' + 'date-format', + 'time_margin' + /* 'margin' */ ], // 文本组件显示的属性 'v-text': [ diff --git a/frontend/src/components/canvas/custom-component/component-list.js b/frontend/src/components/canvas/custom-component/component-list.js index 54fcc49725..c6a5e0589c 100644 --- a/frontend/src/components/canvas/custom-component/component-list.js +++ b/frontend/src/components/canvas/custom-component/component-list.js @@ -243,7 +243,9 @@ const list = [ borderStyle: 'solid', borderWidth: 1, borderColor: '#000000', - borderRadius: 0 + borderRadius: 0, + /* margin: 10, */ + time_margin: 10 }, formatInfo: { openMode: '0', diff --git a/frontend/src/components/canvas/utils/style.js b/frontend/src/components/canvas/utils/style.js index 5d557f0316..a9a498fed1 100644 --- a/frontend/src/components/canvas/utils/style.js +++ b/frontend/src/components/canvas/utils/style.js @@ -9,7 +9,8 @@ export function getStyle(style, filter = []) { 'left', 'borderWidth', 'letterSpacing', - 'borderRadius' + 'borderRadius', + 'margin' ] const result = {} diff --git a/frontend/src/components/widget/DeWidget/DeShowDate.vue b/frontend/src/components/widget/DeWidget/DeShowDate.vue index 5165be1390..6b95c13419 100644 --- a/frontend/src/components/widget/DeWidget/DeShowDate.vue +++ b/frontend/src/components/widget/DeWidget/DeShowDate.vue @@ -24,6 +24,16 @@ export default { default: null } }, + data() { + return { + // time_margin: 0 + } + }, + computed: { + timeMargin() { + return this.element.style.time_margin + } + }, methods: { chartResize() { diff --git a/frontend/src/components/widget/DeWidget/TimeDefault.vue b/frontend/src/components/widget/DeWidget/TimeDefault.vue index bd8249ae74..c33066b290 100644 --- a/frontend/src/components/widget/DeWidget/TimeDefault.vue +++ b/frontend/src/components/widget/DeWidget/TimeDefault.vue @@ -1,5 +1,9 @@