|
@@ -1,6 +1,5 @@
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
const { t } = useI18n()
|
|
const { t } = useI18n()
|
|
-console.log(t)
|
|
|
|
|
|
|
|
interface PlaceholderMoel {
|
|
interface PlaceholderMoel {
|
|
placeholder?: string
|
|
placeholder?: string
|
|
@@ -15,11 +14,9 @@ interface PlaceholderMoel {
|
|
* @description 用于自动设置placeholder
|
|
* @description 用于自动设置placeholder
|
|
*/
|
|
*/
|
|
export function setTextPlaceholder(schema: VFormSchema): PlaceholderMoel {
|
|
export function setTextPlaceholder(schema: VFormSchema): PlaceholderMoel {
|
|
- console.log(schema)
|
|
|
|
const textMap = ['Input', 'Autocomplete', 'InputNumber']
|
|
const textMap = ['Input', 'Autocomplete', 'InputNumber']
|
|
const selectMap = ['Select', 'TimePicker', 'DatePicker', 'TimeSelect', 'TimeSelect']
|
|
const selectMap = ['Select', 'TimePicker', 'DatePicker', 'TimeSelect', 'TimeSelect']
|
|
if (textMap.includes(schema?.component as string)) {
|
|
if (textMap.includes(schema?.component as string)) {
|
|
- console.log(t('common.inputText'))
|
|
|
|
return {
|
|
return {
|
|
placeholder: t('common.inputText')
|
|
placeholder: t('common.inputText')
|
|
}
|
|
}
|