From 0b654f84b5f9c9b1f3fa6236c48950d9ceaade8e Mon Sep 17 00:00:00 2001 From: fit2cloudrd Date: Tue, 28 Jun 2022 18:11:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E7=94=BB?= =?UTF-8?q?=E5=B8=83=E9=87=8D=E7=BD=AE=E5=8A=9F=E8=83=BD=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=AE=8C=E5=85=A8=E9=87=8D=E7=BD=AE=E6=95=B0=E6=8D=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: wangjiahao <1522128093@qq.com> --- .../components/canvas/components/Toolbar.vue | 3 +- .../src/views/panel/edit/ComponentWait.vue | 2 +- .../views/panel/edit/ComponentWaitItem.vue | 82 +++++++++++++------ frontend/src/views/panel/edit/index.vue | 3 +- 4 files changed, 63 insertions(+), 27 deletions(-) diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue index 0c670b939b..26b0361302 100644 --- a/frontend/src/components/canvas/components/Toolbar.vue +++ b/frontend/src/components/canvas/components/Toolbar.vue @@ -467,7 +467,8 @@ export default { } }, editReset() { - this.cancelMobileLayoutStatue(JSON.parse(this.componentDataCache)) + this.$store.commit('setComponentData', JSON.parse(this.componentDataCache)) + this.$store.commit('setMobileLayoutStatus', false) this.$store.commit('openMobileLayout') }, editCancel() { diff --git a/frontend/src/views/panel/edit/ComponentWait.vue b/frontend/src/views/panel/edit/ComponentWait.vue index 8a0b8b4fb0..c03ef8df86 100644 --- a/frontend/src/views/panel/edit/ComponentWait.vue +++ b/frontend/src/views/panel/edit/ComponentWait.vue @@ -6,7 +6,7 @@ -
- - - +
+
+ + + + +
+
@@ -30,6 +34,7 @@ import { mapState } from 'vuex' import MobileCheckBar from '@/components/canvas/components/Editor/MobileCheckBar' import { getStyle } from '@/components/canvas/utils/style' import DeOutWidget from '@/components/dataease/DeOutWidget' +import { hexColorToRGBA } from '@/views/chart/chart/util' export default { name: 'ComponentWaitItem', @@ -51,6 +56,37 @@ export default { } }, computed: { + commonStyle() { + const style = { + width: '100%', + height: '100%' + } + if (this.config.commonBackground) { + style['padding'] = (this.config.commonBackground.innerPadding || 0) + 'px' + style['border-radius'] = (this.config.commonBackground.borderRadius || 0) + 'px' + let colorRGBA = '' + if (this.config.commonBackground.backgroundColorSelect) { + colorRGBA = hexColorToRGBA(this.config.commonBackground.color, this.config.commonBackground.alpha) + } + if (this.config.commonBackground.enable) { + if (this.config.commonBackground.backgroundType === 'innerImage' && typeof this.config.commonBackground.innerImage === 'string') { + let innerImage = this.config.commonBackground.innerImage + if (this.screenShot) { + innerImage = innerImage.replace('svg', 'png') + } + style['background'] = `url(${innerImage}) no-repeat ${colorRGBA}` + } else if (this.config.commonBackground.backgroundType === 'outerImage' && typeof this.config.commonBackground.outerImage === 'string') { + style['background'] = `url(${this.config.commonBackground.outerImage}) no-repeat ${colorRGBA}` + } else { + style['background-color'] = colorRGBA + } + } else { + style['background-color'] = colorRGBA + } + style['overflow'] = 'hidden' + } + return style + }, outItemHeight() { return this.itemHeight - (4 * this.componentGap) }, diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 0d4ee83382..10d2672acd 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -333,7 +333,6 @@ import DeContainer from '@/components/dataease/DeContainer' import DeAsideContainer from '@/components/dataease/DeAsideContainer' import { addClass, removeClass } from '@/utils' import FilterGroup from '../filter' -import ViewSelect from '../ViewSelect' import SubjectSetting from '../SubjectSetting' import bus from '@/utils/bus' import Editor from '@/components/canvas/components/Editor/index' @@ -358,7 +357,7 @@ import '@/components/canvas/styles/animate.css' import { ApplicationContext } from '@/utils/ApplicationContext' import FilterDialog from '../filter/filterDialog' import toast from '@/components/canvas/utils/toast' -import { commonStyle, commonAttr } from '@/components/canvas/custom-component/component-list' +import { commonAttr } from '@/components/canvas/custom-component/component-list' import generateID from '@/components/canvas/utils/generateID' import TextAttr from '@/components/canvas/components/TextAttr' import ComponentWait from '@/views/panel/edit/ComponentWait' From d7143d1bc718e4a92742d65d9ea6dad503f4491b Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 29 Jun 2022 10:43:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E8=A7=86=E5=9B=BE=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/custom-component/UserViewDialog.vue | 2 +- .../views/chart/components/table/TableNormal.vue | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/canvas/custom-component/UserViewDialog.vue b/frontend/src/components/canvas/custom-component/UserViewDialog.vue index 1352335832..ec0c4557d6 100644 --- a/frontend/src/components/canvas/custom-component/UserViewDialog.vue +++ b/frontend/src/components/canvas/custom-component/UserViewDialog.vue @@ -19,7 +19,7 @@
- + diff --git a/frontend/src/views/chart/components/table/TableNormal.vue b/frontend/src/views/chart/components/table/TableNormal.vue index a675b1833d..149773d2b3 100644 --- a/frontend/src/views/chart/components/table/TableNormal.vue +++ b/frontend/src/views/chart/components/table/TableNormal.vue @@ -24,8 +24,7 @@ sortable :title="field.name" :width="columnWidth" - > - + /> @@ -74,6 +73,11 @@ export default { type: Boolean, required: false, default: true + }, + enableScroll: { + type: Boolean, + required: false, + default: true } }, data() { @@ -230,9 +234,11 @@ export default { this.height = 'auto' } - this.$nextTick(() => { - this.initScroll() - }) + if (this.enableScroll) { + this.$nextTick(() => { + this.initScroll() + }) + } } }) },