vuecssuiant-designantdreactantantd-vueenterprisefrontendui-designvue-antdvue-antd-uivue3vuecomponent
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
532 B
20 lines
532 B
import { filterEmpty } from '../_util/props-util'; |
|
const isValid = (value: any) => { |
|
return ( |
|
value !== undefined && |
|
value !== null && |
|
(Array.isArray(value) ? filterEmpty(value).length : true) |
|
); |
|
}; |
|
|
|
export function hasPrefixSuffix(propsAndSlots: any) { |
|
return ( |
|
isValid(propsAndSlots.prefix) || |
|
isValid(propsAndSlots.suffix) || |
|
isValid(propsAndSlots.allowClear) |
|
); |
|
} |
|
|
|
export function hasAddon(propsAndSlots: any) { |
|
return isValid(propsAndSlots.addonBefore) || isValid(propsAndSlots.addonAfter); |
|
}
|
|
|