From 5acbbc31e56c5ae9069a30247bf1c58635b37641 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Mon, 18 Oct 2021 13:46:43 +0800
Subject: [PATCH] =?UTF-8?q?refactor:=E4=BB=AA=E8=A1=A8=E6=9D=BF=E8=A7=86?=
=?UTF-8?q?=E5=9B=BE=E8=AF=A6=E6=83=85=E8=83=8C=E6=99=AF=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=EF=BC=8C=E8=B7=9F=E9=9A=8F=E4=BB=AA=E8=A1=A8=E6=9D=BF=E8=83=8C?=
=?UTF-8?q?=E6=99=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/canvas/components/TextAttr.vue | 15 +++++++++-
.../custom-component/UserViewDialog.vue | 29 ++++++++++++++++++-
2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue
index db382e2368..818accf1cc 100644
--- a/frontend/src/components/canvas/components/TextAttr.vue
+++ b/frontend/src/components/canvas/components/TextAttr.vue
@@ -17,7 +17,6 @@
-
@@ -123,6 +122,17 @@ export default {
tooltip: this.$t('panel.text_align_right'),
label: 'right'
}
+ ],
+ 'v-text': [
+ 'textAlign',
+ 'fontSize',
+ 'fontWeight',
+ 'letterSpacing',
+ 'opacity',
+ 'borderRadius',
+ 'color',
+ 'backgroundColor',
+ 'hyperlinks'
] }
},
watch: {
@@ -140,6 +150,9 @@ export default {
// console.log('mainWidthOffset:' + this.mainWidthOffset)
},
computed: {
+ attrShow(attr) {
+ return style
+ },
letterDivColor() {
const style = {
height: '2px',
diff --git a/frontend/src/components/canvas/custom-component/UserViewDialog.vue b/frontend/src/components/canvas/custom-component/UserViewDialog.vue
index 53425cf324..141010bd88 100644
--- a/frontend/src/components/canvas/custom-component/UserViewDialog.vue
+++ b/frontend/src/components/canvas/custom-component/UserViewDialog.vue
@@ -1,6 +1,6 @@
-
+
@@ -19,6 +19,7 @@ import DeMainContainer from '@/components/dataease/DeMainContainer'
import DeContainer from '@/components/dataease/DeContainer'
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
import { export_json_to_excel } from '@/plugins/Export2Excel'
+import { mapState } from 'vuex'
export default {
name: 'UserView',
@@ -38,6 +39,32 @@ export default {
refId: null
}
},
+ computed: {
+ customStyle() {
+ let style = {
+ }
+ if (this.canvasStyleData.openCommonStyle) {
+ if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) {
+ style = {
+ background: `url(${this.canvasStyleData.panel.imageUrl}) no-repeat`,
+ ...style
+ }
+ } else if (this.canvasStyleData.panel.backgroundType === 'color') {
+ style = {
+ background: this.canvasStyleData.panel.color,
+ ...style
+ }
+ }
+ }
+ return style
+ },
+ ...mapState([
+ 'isClickComponent',
+ 'curComponent',
+ 'componentData',
+ 'canvasStyleData'
+ ])
+ },
methods: {
exportExcel() {
const excelHeader = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.name)