765bug,上架关联组件时搜索功能

This commit is contained in:
gaoyuanwei 2022-08-01 15:57:09 +08:00
parent 52c1850cfb
commit 636318536b
1 changed files with 9 additions and 2 deletions

View File

@ -477,6 +477,8 @@
:render="(item) => item.title" :render="(item) => item.title"
@change="handleChangeOther" @change="handleChangeOther"
@selectChange="handleSelectChangeOther" @selectChange="handleSelectChangeOther"
show-search
:filter-option="filterOptionTransfer"
/> />
</div> </div>
</a-modal> </a-modal>
@ -927,7 +929,7 @@
mockDataOther.value.push({ mockDataOther.value.push({
key: val.id, key: val.id,
title: val.name, title: val.name,
description: val.id, description: val.name,
}) })
}) })
}) })
@ -948,7 +950,7 @@
mockDataOther.value.push({ mockDataOther.value.push({
key: val.id, key: val.id,
title: val.name, title: val.name,
description: val.id, description: val.name,
}) })
}) })
}) })
@ -978,6 +980,11 @@
console.log('targetSelectedKeys: ', targetSelectedKeys, sourceSelectedKeys) console.log('targetSelectedKeys: ', targetSelectedKeys, sourceSelectedKeys)
} }
const filterOptionTransfer = (inputValue, option) => {
console.log(option, 'option')
return option.description.indexOf(inputValue) > -1
}
const handleOk = (e) => { const handleOk = (e) => {
console.log(e) console.log(e)
visibleAssociatedApplicationOther.value = false visibleAssociatedApplicationOther.value = false