Browse Source

radio-label值获取方法修改

pull/105/head
zq 3 weeks ago
parent
commit
82f3f22ac4
  1. 14
      src/components/GuipRadio.vue

14
src/components/GuipRadio.vue

@ -138,10 +138,16 @@ export default {
//
const isSelected = this.getValue(option) === this.selectedValue;
// selectedLabellabelKey
return isSelected && option[this.selectedLabelKey]
? option[this.selectedLabelKey]
: option[this.labelKey] || option;
// selectedLabel
if (isSelected && option[this.selectedLabelKey]) {
return option[this.selectedLabelKey];
}
// labelKey
if (typeof option === 'object' && this.labelKey in option) {
return option[this.labelKey];
}
return option;
},
getValue(option) {
//

Loading…
Cancel
Save