From 4d5b35b03882e6bd6efebb8e4851d0d88d8f3a3e Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 16 Aug 2021 15:40:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E6=9C=AC=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=BF=AB=E9=80=9F=E6=A3=80=E7=B4=A2=E6=97=A0?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/DeDrag/index.vue | 2 +- .../components/Editor/ComponentWrapper.vue | 2 +- .../canvas/components/Editor/Shape.vue | 2 +- .../widget/DeWidget/DeSelectGrid.vue | 22 +++++++++---------- frontend/src/styles/index.scss | 9 ++++++++ frontend/src/views/panel/edit/index.vue | 2 +- 6 files changed, 24 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/DeDrag/index.vue b/frontend/src/components/DeDrag/index.vue index b47cb117ca..300e8c53c3 100644 --- a/frontend/src/components/DeDrag/index.vue +++ b/frontend/src/components/DeDrag/index.vue @@ -629,7 +629,7 @@ export default { elementMouseDown(e) { // private 设置当前组件数据及状态 this.$store.commit('setClickComponentStatus', true) - if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-number-range') { + if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-select-grid' && this.element.component !== 'de-number-range') { e.preventDefault() } // 阻止冒泡事件 diff --git a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue index 88216e9e1a..b789d127d8 100644 --- a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue +++ b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue @@ -104,7 +104,7 @@ export default { elementMouseDown(e) { // private 设置当前组件数据及状态 this.$store.commit('setClickComponentStatus', true) - if (this.config.component !== 'v-text' && this.config.component !== 'rect-shape' && this.config.component !== 'de-input-search' && this.config.component !== 'de-number-range') { + if (this.config.component !== 'v-text' && this.config.component !== 'rect-shape' && this.config.component !== 'de-input-search' && this.config.component !== 'de-select-grid' && this.config.component !== 'de-number-range') { e.preventDefault() } // 阻止冒泡事件 diff --git a/frontend/src/components/canvas/components/Editor/Shape.vue b/frontend/src/components/canvas/components/Editor/Shape.vue index b0475bd00d..b4c0e74bbf 100644 --- a/frontend/src/components/canvas/components/Editor/Shape.vue +++ b/frontend/src/components/canvas/components/Editor/Shape.vue @@ -226,7 +226,7 @@ export default { handleMouseDownOnShape(e) { this.$store.commit('setClickComponentStatus', true) - if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-number-range') { + if (this.element.component !== 'v-text' && this.element.component !== 'rect-shape' && this.element.component !== 'de-input-search' && this.element.component !== 'de-select-grid' && this.element.component !== 'de-number-range') { e.preventDefault() } diff --git a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue index 35b590e281..ccf8d14349 100644 --- a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue +++ b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue @@ -8,10 +8,9 @@ @@ -71,7 +70,7 @@ export default { label: 'text', children: 'children' }, - keyWord: null, + keyWord: '', allNode: { id: (-2 << 16) + '', text: this.$t('commons.all'), @@ -107,10 +106,11 @@ export default { sourceValid && Array.isArray(sourceValue) && (this.options.value = sourceValue[0]) !this.inDraw && (this.options.value = null) } - }, - keyWord(val) { - this.$refs.deSelectGrid.filter(val) } + // keyWord(val) { + // console.log(val) + // this.$refs.deSelectGrid.filter(val) + // } }, created() { this.options = this.element.options @@ -206,10 +206,10 @@ export default { this.options.value = null this.changeRadioBox() }, - filterNode(value, data) { - if (!value) return true - return data[this.defaultProp.label].indexOf(value) !== -1 - }, + // filterNode(value, data) { + // if (!value) return true + // return data[this.defaultProp.label].indexOf(value) !== -1 + // }, styleChange() { this.$store.state.styleChangeTimes++ } @@ -251,7 +251,7 @@ export default { overflow-y: auto; width: 100%; position: absolute; - top: 0; + top: 30px; bottom: 0; } } diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 424329d78f..c9ac0ad0dd 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -235,6 +235,15 @@ div:focus { div.el-input-group__append { width: 10% !important; } + .de-select-grid-class { + .list { + position: relative !important; + height: 200px !important; + overflow-y: scroll !important; + top: 0px !important; + } + } + } %field-icon { diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 5149e7ab18..729d4f6f62 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -116,7 +116,7 @@