[Improvement] Radio: add label-disabled prop (#1445)

This commit is contained in:
neverland
2018-07-09 21:15:01 +08:00
committed by GitHub
parent 7c3d3db630
commit b5b25ac923
3 changed files with 6 additions and 3 deletions

View File

@@ -28,7 +28,8 @@ export default create({
props: {
name: null,
value: null,
disabled: Boolean
disabled: Boolean,
labelDisabled: Boolean
},
computed: {
@@ -55,7 +56,7 @@ export default create({
methods: {
onClickLabel() {
if (!this.isDisabled) {
if (!this.isDisabled && !this.labelDisabled) {
this.currentValue = this.name;
}
}