Element: [Feature Request] Separate label and value in el-radio-group

Created on 17 Jun 2017  ·  2Comments  ·  Source: ElemeFE/element

Existing Component

Yes

Component Name

el-radio-group

Description

It would be beneficial if we could set custom texts for each radio item. Currently, there is no attribute available for custom texts which is why label == text. What if we want to show a different text in the GUI than the label? Something like this:

<el-radio-group v-model="city">
  <el-radio-button label="NY">New York</el-radio-button>
</el-radio-group>

Most helpful comment

All 2 comments

It's supported: https://jsfiddle.net/46ho8wj5/

How to use it without using {{ item.alias }} curly brace but binding value ?
for ex:

<el-radio-group v-model="radio1">
  <el-radio-button v-for="item in city"  :label="item.name">{{ item.alias }}</el-radio-button>
</el-radio-group>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

fscardua picture fscardua  ·  3Comments

chenzhe-pro picture chenzhe-pro  ·  3Comments

dbskccc picture dbskccc  ·  3Comments

chao-hua picture chao-hua  ·  3Comments

EdenSpark picture EdenSpark  ·  3Comments