Merge pull request #633 from dataease/pr@dev@fix_condition_component

fix: 文本列表组件快速检索无效
This commit is contained in:
fit2cloud-chenyw 2021-08-16 15:41:53 +08:00 committed by GitHub
commit eb51e7c245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 15 deletions

View File

@ -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()
}
//

View File

@ -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()
}
//

View File

@ -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()
}

View File

@ -8,10 +8,9 @@
<el-tree
v-if="options!== null && options.attrs!==null"
ref="deSelectGrid"
:data="options.attrs.multiple ? [allNode, ...options.attrs.datas] : options.attrs.datas"
:data="(options.attrs.multiple ? [allNode, ...options.attrs.datas] : options.attrs.datas).filter(node => node.text.includes(keyWord))"
:props="defaultProp"
:indent="0"
:filter-node-method="filterNode"
class="de-filter-tree"
default-expand-all
>
@ -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;
}
}

View File

@ -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 {

View File

@ -116,7 +116,7 @@
<el-dialog
v-if="filterVisible && panelInfo.id"
:title="$t('panel.module')"
:title="(currentWidget && currentWidget.getLeftPanel && currentWidget.getLeftPanel().label ? $t(currentWidget.getLeftPanel().label) : '') + $t('panel.module')"
:visible.sync="filterVisible"
custom-class="de-filter-dialog"
>