dev
This commit is contained in:
parent
3a8c371e9c
commit
227ea607cb
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<el-input v-model="keyword" style="width:100%;height: 100%" @input="changeInput" :disabled="disabled"
|
||||
<el-input v-model="keyword" style="width:100%;height: 100%" @input="changeInput" :disabled="disabled" @click="changeInput"
|
||||
placeholder="诊断选择" ref="inputRef"></el-input>
|
||||
|
||||
<el-popover placement="bottom-start" trigger="click" :width="props.width" ref="popoverRef" @before-enter="beforeShow" :virtual-ref="inputRef" @hide ="afterShow">
|
||||
|
||||
<div class="container" v-if="searchList.length > 0">
|
||||
<div class="container">
|
||||
<el-table :data="searchList" style="width: 100%" @row-click="clickRow" :show-header="props.showHeader" size="small"
|
||||
max-height="250px">
|
||||
<el-table-column v-for="item in showConfig" :prop="item.prop" :label="item.label"
|
||||
|
|
@ -58,8 +58,13 @@ const changeInput = (inputStr: string) => {
|
|||
if (!props.requestApi || props.requestApi === "") {
|
||||
return
|
||||
}
|
||||
let tempList = inputStr.split(",");
|
||||
let searchKeyword = tempList[tempList.length - 1];
|
||||
debugger
|
||||
let tempList = keyword.value.split(",");
|
||||
let searchKeyword ="";
|
||||
if (tempList.length != 0){
|
||||
searchKeyword = tempList[tempList.length - 1];
|
||||
}
|
||||
|
||||
nameList.value = []
|
||||
selectList.value = selectList.value ? selectList.value.slice(0, tempList.length) : []
|
||||
let updateKeyword = false
|
||||
|
|
@ -88,9 +93,9 @@ const clickRow = (row: any) => {
|
|||
popoverRef.value.hide()
|
||||
}
|
||||
const beforeShow = () => {
|
||||
if (searchList.value.length === 0) {
|
||||
popoverRef.value.hide()
|
||||
}
|
||||
// if (searchList.value.length === 0) {
|
||||
// popoverRef.value.hide()
|
||||
// }
|
||||
}
|
||||
const afterShow = () => {
|
||||
if (nameList.value.length === 0){
|
||||
|
|
|
|||
Loading…
Reference in New Issue