Form add hide-required-mark prop
This commit is contained in:
parent
738c852458
commit
66e8d1cb7b
2 changed files with 13 additions and 1 deletions
|
@ -37,6 +37,11 @@
|
||||||
return oneOf(value, ['on', 'off']);
|
return oneOf(value, ['on', 'off']);
|
||||||
},
|
},
|
||||||
default: 'off'
|
default: 'off'
|
||||||
|
},
|
||||||
|
// 4.0.0
|
||||||
|
hideRequiredMark: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
provide() {
|
provide() {
|
||||||
|
@ -53,7 +58,8 @@
|
||||||
`${prefixCls}`,
|
`${prefixCls}`,
|
||||||
`${prefixCls}-label-${this.labelPosition}`,
|
`${prefixCls}-label-${this.labelPosition}`,
|
||||||
{
|
{
|
||||||
[`${prefixCls}-inline`]: this.inline
|
[`${prefixCls}-inline`]: this.inline,
|
||||||
|
[`${prefixCls}-hide-required-mark`]: this.hideRequiredMark
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,3 +69,9 @@
|
||||||
// todo
|
// todo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.@{form-prefix-cls}-hide-required-mark .@{form-item-prefix-cls}-required{
|
||||||
|
.@{form-item-prefix-cls}-label:before {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue