| | |
| | | import { ComponentType } from './componentType'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { useI18n } from '@/hooks/web/useI18n'; |
| | | import XEUtils from 'xe-utils'; |
| | | import { ignoreTrimInputComponents } from './const'; |
| | | |
| | | const { t } = useI18n(); |
| | | |
| | |
| | | return t('common.chooseText'); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @description: 对输入值进行首尾空格的清理 |
| | | */ |
| | | export function sanitizeInputWhitespace(component: ComponentType, value: string) { |
| | | if (ignoreTrimInputComponents.includes(component)) { |
| | | return XEUtils.trim(value); |
| | | } |
| | | return value; |
| | | } |