mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-25 02:58:43 +08:00
feat: 解决Form组件slot必须传递component字段才显示的问题 (#3049)
feat: 解决Form组件slot必须传递component字段才显示的问题
This commit is contained in:
parent
556575f501
commit
a6b65b58a1
@ -159,7 +159,10 @@
|
|||||||
const joinLabel = Reflect.has(props.schema, 'rulesMessageJoinLabel')
|
const joinLabel = Reflect.has(props.schema, 'rulesMessageJoinLabel')
|
||||||
? rulesMessageJoinLabel
|
? rulesMessageJoinLabel
|
||||||
: globalRulesMessageJoinLabel;
|
: globalRulesMessageJoinLabel;
|
||||||
const defaultMsg = createPlaceholderMessage(component) + `${joinLabel ? label : ''}`;
|
const assertLabel = joinLabel ? label : '';
|
||||||
|
const defaultMsg = component
|
||||||
|
? createPlaceholderMessage(component) + assertLabel
|
||||||
|
: assertLabel;
|
||||||
|
|
||||||
function validator(rule: any, value: any) {
|
function validator(rule: any, value: any) {
|
||||||
const msg = rule.message || defaultMsg;
|
const msg = rule.message || defaultMsg;
|
||||||
@ -382,8 +385,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
const { colProps = {}, colSlot, renderColContent, component } = props.schema;
|
const { colProps = {}, colSlot, renderColContent, component, slot } = props.schema;
|
||||||
if (!componentMap.has(component)) {
|
if (!componentMap.has(component) && !slot) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user