perf(baInput):远程下拉信息提示框优化

This commit is contained in:
妙码生花 2023-02-03 16:52:09 +08:00
parent c0852ed583
commit 84e145dba0
2 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,7 @@
:value="item[state.primaryKey].toString()"
:key="item[state.primaryKey]"
>
<el-tooltip placement="right" effect="light" v-if="Object.keys(tooltipParams).length!==0">
<el-tooltip placement="right" effect="light" v-if="!isEmpty(tooltipParams)">
<template #content>
<p v-for="(tooltipParam, key) in tooltipParams" :key="key">{{ key }}: {{ item[tooltipParam] }}</p>
</template>
@ -47,6 +47,7 @@ import { reactive, watch, onMounted, ref, nextTick } from 'vue'
import { getSelectData } from '/@/api/common'
import { uuid } from '/@/utils/random'
import type { ElSelect } from 'element-plus'
import { isEmpty } from 'lodash-es'
const selectRef = ref<InstanceType<typeof ElSelect> | undefined>()
type valType = string | number | string[] | number[]

View File

@ -118,6 +118,7 @@ export interface InputAttr {
pk?: string
field?: string
'remote-url'?: string
'tooltip-params'?: anyObj
// 图标选择器属性
'show-icon-name'?: boolean
placement?: string