bug==select
This commit is contained in:
parent
8ec4b585b6
commit
e4d79e03b8
|
@ -318,12 +318,24 @@
|
|||
:list="props.videoList"
|
||||
tip="支持视频类型,大小不超过100M"
|
||||
></upload>
|
||||
<a-button
|
||||
<!-- <a-button
|
||||
v-else-if="item.type == 'AssociatedApplication'"
|
||||
@click="sourceClick"
|
||||
>
|
||||
请选择来源应用
|
||||
</a-button>
|
||||
</a-button> -->
|
||||
<a-select
|
||||
v-else-if="item.type == 'select' && item.name == '来源应用'"
|
||||
style="width: 2.4rem"
|
||||
v-model:value="item.note1"
|
||||
show-search
|
||||
placeholder="请输入关键字"
|
||||
:options="item.options"
|
||||
:filter-option="applicationsOption"
|
||||
@focus="applicationsFocus"
|
||||
@blur="applicationsBlur"
|
||||
@change="applicationsChange"
|
||||
></a-select>
|
||||
<a-button
|
||||
v-else-if="item.type == 'AssociatedComponents'"
|
||||
@click="componentsClick"
|
||||
|
@ -616,6 +628,19 @@
|
|||
item.note1 = res1.data.mobile || ''
|
||||
})
|
||||
}
|
||||
} else if (item.name === '来源应用') {
|
||||
queryApplicationRelByResourceId({
|
||||
referenceId: 0,
|
||||
}).then((res) => {
|
||||
const dataList = []
|
||||
res.data.data.notLinked.forEach((element) => {
|
||||
dataList.push({
|
||||
value: element.id,
|
||||
label: element.name,
|
||||
})
|
||||
})
|
||||
item.options = dataList
|
||||
})
|
||||
} else {
|
||||
data.value.list.push(item)
|
||||
}
|
||||
|
@ -744,7 +769,7 @@
|
|||
const targetKeysOther = ref([])
|
||||
// 上一步关联数据
|
||||
// const targetKeysBack = ref([])
|
||||
|
||||
// 来源应用-back
|
||||
const sourceClick = () => {
|
||||
mockData.value = []
|
||||
visibleAssociatedApplication.value = true
|
||||
|
@ -915,18 +940,35 @@
|
|||
const handleChange2 = (value) => {
|
||||
console.log(`selected ${value}`)
|
||||
}
|
||||
const applicationsChange = (value) => {
|
||||
data.value.list.map((item) => {
|
||||
if (item.name === '来源应用') {
|
||||
item.note1 = value
|
||||
data.value.list.push(item }
|
||||
})
|
||||
console.log(`selected ${value}`)
|
||||
}
|
||||
|
||||
const handleBlur = () => {
|
||||
console.log('blur')
|
||||
}
|
||||
const applicationsBlur = () => {
|
||||
console.log('blur')
|
||||
}
|
||||
|
||||
const handleFocus = () => {
|
||||
console.log('focus')
|
||||
}
|
||||
const applicationsFocus = () => {
|
||||
console.log('focus')
|
||||
}
|
||||
|
||||
const filterOption = (input, option) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
const applicationsOption = (input, option) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
</script>
|
||||
<style></style>
|
||||
<style lang="less" scoped>
|
||||
|
|
Loading…
Reference in New Issue