forked from github/dataease
Merge pull request #633 from dataease/pr@dev@fix_condition_component
fix: 文本列表组件快速检索无效
This commit is contained in:
commit
eb51e7c245
@ -629,7 +629,7 @@ export default {
|
|||||||
elementMouseDown(e) {
|
elementMouseDown(e) {
|
||||||
// private 设置当前组件数据及状态
|
// private 设置当前组件数据及状态
|
||||||
this.$store.commit('setClickComponentStatus', true)
|
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()
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
// 阻止冒泡事件
|
// 阻止冒泡事件
|
||||||
|
@ -104,7 +104,7 @@ export default {
|
|||||||
elementMouseDown(e) {
|
elementMouseDown(e) {
|
||||||
// private 设置当前组件数据及状态
|
// private 设置当前组件数据及状态
|
||||||
this.$store.commit('setClickComponentStatus', true)
|
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()
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
// 阻止冒泡事件
|
// 阻止冒泡事件
|
||||||
|
@ -226,7 +226,7 @@ export default {
|
|||||||
|
|
||||||
handleMouseDownOnShape(e) {
|
handleMouseDownOnShape(e) {
|
||||||
this.$store.commit('setClickComponentStatus', true)
|
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()
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,10 +8,9 @@
|
|||||||
<el-tree
|
<el-tree
|
||||||
v-if="options!== null && options.attrs!==null"
|
v-if="options!== null && options.attrs!==null"
|
||||||
ref="deSelectGrid"
|
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"
|
:props="defaultProp"
|
||||||
:indent="0"
|
:indent="0"
|
||||||
:filter-node-method="filterNode"
|
|
||||||
class="de-filter-tree"
|
class="de-filter-tree"
|
||||||
default-expand-all
|
default-expand-all
|
||||||
>
|
>
|
||||||
@ -71,7 +70,7 @@ export default {
|
|||||||
label: 'text',
|
label: 'text',
|
||||||
children: 'children'
|
children: 'children'
|
||||||
},
|
},
|
||||||
keyWord: null,
|
keyWord: '',
|
||||||
allNode: {
|
allNode: {
|
||||||
id: (-2 << 16) + '',
|
id: (-2 << 16) + '',
|
||||||
text: this.$t('commons.all'),
|
text: this.$t('commons.all'),
|
||||||
@ -107,10 +106,11 @@ export default {
|
|||||||
sourceValid && Array.isArray(sourceValue) && (this.options.value = sourceValue[0])
|
sourceValid && Array.isArray(sourceValue) && (this.options.value = sourceValue[0])
|
||||||
!this.inDraw && (this.options.value = null)
|
!this.inDraw && (this.options.value = null)
|
||||||
}
|
}
|
||||||
},
|
|
||||||
keyWord(val) {
|
|
||||||
this.$refs.deSelectGrid.filter(val)
|
|
||||||
}
|
}
|
||||||
|
// keyWord(val) {
|
||||||
|
// console.log(val)
|
||||||
|
// this.$refs.deSelectGrid.filter(val)
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.options = this.element.options
|
this.options = this.element.options
|
||||||
@ -206,10 +206,10 @@ export default {
|
|||||||
this.options.value = null
|
this.options.value = null
|
||||||
this.changeRadioBox()
|
this.changeRadioBox()
|
||||||
},
|
},
|
||||||
filterNode(value, data) {
|
// filterNode(value, data) {
|
||||||
if (!value) return true
|
// if (!value) return true
|
||||||
return data[this.defaultProp.label].indexOf(value) !== -1
|
// return data[this.defaultProp.label].indexOf(value) !== -1
|
||||||
},
|
// },
|
||||||
styleChange() {
|
styleChange() {
|
||||||
this.$store.state.styleChangeTimes++
|
this.$store.state.styleChangeTimes++
|
||||||
}
|
}
|
||||||
@ -251,7 +251,7 @@ export default {
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 30px;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -235,6 +235,15 @@ div:focus {
|
|||||||
div.el-input-group__append {
|
div.el-input-group__append {
|
||||||
width: 10% !important;
|
width: 10% !important;
|
||||||
}
|
}
|
||||||
|
.de-select-grid-class {
|
||||||
|
.list {
|
||||||
|
position: relative !important;
|
||||||
|
height: 200px !important;
|
||||||
|
overflow-y: scroll !important;
|
||||||
|
top: 0px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
%field-icon {
|
%field-icon {
|
||||||
|
@ -116,7 +116,7 @@
|
|||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-if="filterVisible && panelInfo.id"
|
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"
|
:visible.sync="filterVisible"
|
||||||
custom-class="de-filter-dialog"
|
custom-class="de-filter-dialog"
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user