|
@@ -159,7 +159,6 @@
|
|
|
isShow = isShow && itemIsAdvanced;
|
|
|
return { isShow, isIfShow };
|
|
|
}
|
|
|
-
|
|
|
function handleRules(): ValidationRule[] {
|
|
|
const {
|
|
|
rules: defRules = [],
|
|
@@ -179,7 +178,7 @@
|
|
|
const joinLabel = Reflect.has(props.schema, 'rulesMessageJoinLabel')
|
|
|
? rulesMessageJoinLabel
|
|
|
: globalRulesMessageJoinLabel;
|
|
|
- const assertLabel = joinLabel ? label : '';
|
|
|
+ const assertLabel = joinLabel ? (isFunction(label) ? '' : label) : '';
|
|
|
const defaultMsg = component
|
|
|
? createPlaceholderMessage(component) + assertLabel
|
|
|
: assertLabel;
|
|
@@ -337,12 +336,13 @@
|
|
|
|
|
|
function renderLabelHelpMessage() {
|
|
|
const { label, helpMessage, helpComponentProps, subLabel } = props.schema;
|
|
|
+ const getLabel = isFunction(label) ? label(unref(getValues)) : label;
|
|
|
const renderLabel = subLabel ? (
|
|
|
<span>
|
|
|
- {label} <span class="text-secondary">{subLabel}</span>
|
|
|
+ {getLabel} <span class="text-secondary">{subLabel}</span>
|
|
|
</span>
|
|
|
) : (
|
|
|
- label
|
|
|
+ getLabel
|
|
|
);
|
|
|
const getHelpMessage = isFunction(helpMessage)
|
|
|
? helpMessage(unref(getValues))
|
|
@@ -385,8 +385,8 @@
|
|
|
return slot
|
|
|
? getSlot(slots, slot, unref(getValues), opts)
|
|
|
: render
|
|
|
- ? render(unref(getValues), opts)
|
|
|
- : renderComponent();
|
|
|
+ ? render(unref(getValues), opts)
|
|
|
+ : renderComponent();
|
|
|
};
|
|
|
|
|
|
const showSuffix = !!suffix;
|
|
@@ -437,8 +437,8 @@
|
|
|
return colSlot
|
|
|
? getSlot(slots, colSlot, values, opts)
|
|
|
: renderColContent
|
|
|
- ? renderColContent(values, opts)
|
|
|
- : renderItem();
|
|
|
+ ? renderColContent(values, opts)
|
|
|
+ : renderItem();
|
|
|
};
|
|
|
|
|
|
return (
|