@@ -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 @@
- {{ nowDate }}
+