【中汽测试】树状结构加查询
This commit is contained in:
@@ -136,6 +136,8 @@
|
||||
treeCheckStrictly
|
||||
:label-in-value="false"
|
||||
@change="updateDom"
|
||||
show-search
|
||||
:filterTreeNode="filterTreeOption"
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" />
|
||||
<!-- 14, 年份选择 -->
|
||||
<j-date v-else-if="item.fieldShowType === FieldType.YEAR_PICKER.value"
|
||||
@@ -154,6 +156,8 @@
|
||||
:tree-data="optionsData[item.dbFieldName]"
|
||||
:label-in-value="false"
|
||||
@change="updateDom"
|
||||
show-search
|
||||
:filterTreeNode="filterTreeOption"
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -692,6 +696,10 @@ export default {
|
||||
},
|
||||
updateDom () {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
filterTreeOption (input, option) {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user