mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
refactor(baInput):远程下拉组件增加 attr 属性
This commit is contained in:
parent
0f45c73d09
commit
36f7b8605b
@ -28,6 +28,7 @@
|
||||
:key="state.selectKey"
|
||||
@clear="onClear"
|
||||
@visible-change="onVisibleChange"
|
||||
v-bind="props.attr"
|
||||
>
|
||||
<el-option
|
||||
class="remote-select-option"
|
||||
@ -67,6 +68,7 @@ import { isEmpty } from 'lodash-es'
|
||||
import { getArrayKey } from '/@/utils/common'
|
||||
|
||||
const selectRef = ref<InstanceType<typeof ElSelect> | undefined>()
|
||||
type ElSelectProps = Partial<InstanceType<typeof ElSelect>['$props']>
|
||||
type valType = string | number | string[] | number[]
|
||||
|
||||
interface Props {
|
||||
@ -78,6 +80,7 @@ interface Props {
|
||||
modelValue: valType
|
||||
labelFormatter?: (optionData: anyObj, optionKey: string) => string
|
||||
tooltipParams?: anyObj
|
||||
attr?: ElSelectProps
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
pk: 'id',
|
||||
@ -91,6 +94,9 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
tooltipParams: () => {
|
||||
return {}
|
||||
},
|
||||
attr: () => {
|
||||
return {}
|
||||
},
|
||||
})
|
||||
|
||||
const state: {
|
||||
|
Loading…
Reference in New Issue
Block a user