This commit is contained in:
LiJianZhao 2025-05-07 15:31:23 +08:00
parent ad67e3a2aa
commit 304d8d2cf3
3 changed files with 15 additions and 6 deletions

View File

@ -1,7 +1,7 @@
<template>
<el-popover placement="bottom-start" trigger="click" :width="props.width" ref="popoverRef">
<el-popover placement="bottom-start" :visible="isVisible" :width="props.width" ref="popoverRef">
<template #reference>
<el-input v-model="input" style="width:100%;height: 100%" clearable :disabled="disabled" ref="inputRef" @click="showPopo" @focus="focus"></el-input>
<el-input v-model="input" style="width:100%;height: 100%" clearable :disabled="disabled" ref="inputRef" @click="showPopo" @focus="focus" @blur="handlerBlur"></el-input>
</template>
<div class="code-popo" v-if="props.list.length > 0">
<div class="code-item" v-for="item in props.list">
@ -17,6 +17,8 @@
</template>
<script setup lang="ts">
import {ref, unref} from "vue";
const isVisible = ref(false)
interface ListItem {
header?: string;
value: string[];
@ -54,8 +56,12 @@ const inputStr = (str: string,item:ListItem) => {
const inputRef = ref();
const emit=defineEmits(["focus"])
const focus = () => {
isVisible.value = true
emit("focus", false)
}
const handlerBlur = () => {
isVisible.value = false
}
</script>
<style scoped lang="scss">
.code-popo {

View File

@ -75,7 +75,6 @@ const completeSettlement = ()=>{
insutype: orderInfo.value.insutype,
changeOrderCode:orderInfo.value.changeOrderCode,
}
debugger
post("charge/socialRealPay",{...params}).then((res:any)=>{
show.value = false;

View File

@ -1,10 +1,10 @@
<template>
<el-popover placement="bottom-start" trigger="click" :width="props.width" ref="popoverRef" @before-enter="beforeShow" @hide ="afterShow">
<el-popover placement="bottom-start" :visible="isVisible" :width="props.width" ref="popoverRef" @before-enter="beforeShow" @hide ="afterShow">
<template #reference>
<el-input v-model="keyword" :style="{width:props.width+'px',height: 100+'%'}" @input="changeInput" :disabled="disabled" @click="changeInput"
placeholder="诊断选择" ref="inputRef" @focus="focus"></el-input>
placeholder="诊断选择" ref="inputRef" @focus="focus" @blur="handleBlur"></el-input>
</template>
<div class="container">
<el-table :data="searchList" style="width: 100%" @row-click="clickRow" :show-header="props.showHeader" size="small"
@ -114,10 +114,14 @@ const init = (list: any, nList: any) => {
nameList.value = nList;
keyword.value = nameList.value.join(",") + ","
}
const isVisible = ref(false);
const focus = ()=>{
isVisible.value=true
emit("focus",false)
}
const handleBlur =()=> {
isVisible.value=false
}
defineExpose({init})
</script>
<style scoped lang="scss">