mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-01-24 10:33:47 +08:00
fix(form): placeholder setting in componentProps (#634)
修复为RangePicker组件设置的placeholder属性无效的BUG
This commit is contained in:
parent
bb0d2e1c71
commit
2d3d04f547
@ -248,13 +248,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const isCreatePlaceholder = !propsData.disabled && autoSetPlaceHolder;
|
const isCreatePlaceholder = !propsData.disabled && autoSetPlaceHolder;
|
||||||
let placeholder;
|
|
||||||
// RangePicker place is an array
|
// RangePicker place is an array
|
||||||
if (isCreatePlaceholder && component !== 'RangePicker' && component) {
|
if (isCreatePlaceholder && component !== 'RangePicker' && component) {
|
||||||
placeholder =
|
propsData.placeholder =
|
||||||
unref(getComponentsProps)?.placeholder || createPlaceholderMessage(component);
|
unref(getComponentsProps)?.placeholder || createPlaceholderMessage(component);
|
||||||
}
|
}
|
||||||
propsData.placeholder = placeholder;
|
|
||||||
propsData.codeField = field;
|
propsData.codeField = field;
|
||||||
propsData.formValues = unref(getValues);
|
propsData.formValues = unref(getValues);
|
||||||
|
|
||||||
@ -289,7 +287,9 @@
|
|||||||
) : (
|
) : (
|
||||||
label
|
label
|
||||||
);
|
);
|
||||||
const getHelpMessage = isFunction(helpMessage) ? helpMessage(unref(getValues)) : helpMessage;
|
const getHelpMessage = isFunction(helpMessage)
|
||||||
|
? helpMessage(unref(getValues))
|
||||||
|
: helpMessage;
|
||||||
if (!getHelpMessage || (Array.isArray(getHelpMessage) && getHelpMessage.length === 0)) {
|
if (!getHelpMessage || (Array.isArray(getHelpMessage) && getHelpMessage.length === 0)) {
|
||||||
return renderLabel;
|
return renderLabel;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user