Element: [Feature Request] Issue with Radio display the'label'of prop

Created on 24 Jan 2018  ·  3Comments  ·  Source: ElemeFE/element

Existing Component

Component Name

Radio

Description

When not giving a default slot to the radio, the default value of the radio would instead be displaying the prop of the label. Could it be possible to simply leave the default as empty instead of displaying the prop of the label, and provide an option to use the prop of the label but not using it as the default.

当没有给Radio组件提供子元素(slot)时,Radio组件默认会在 class="el-radio__label"的标签中显示label的值,希望取消这一默认行为,或者提供接口让用户决定在没有slot时,是否开启上述默认行为

Most helpful comment

你好,这个特性是从初期就开始保留到现在的,我们目前还不打算提供接口去控制,希望你能理解。

虽然不知道你的使用场景是怎样的,但是目前可以这样达到目的:
<el-radio v-model="radio" label="1">&nbsp;</el-radio>

All 3 comments

Translation of this issue:

Existing Component

yes

Component Name

Radio

Description

When not giving a default slot to the radio, the default value of the radio would instead be displaying the prop of the label. Could it be possible to simply leave the default as empty instead of displaying the prop of the label, and provide an option to use the prop of the label but not using it as the default.

When no sub element (slot) is provided to the Radio component, the Radio component will display the value of label in the label of class= "el-radio__label" by default, hoping to cancel the default behavior, or provide the interface to let the user decide whether to open the default behavior when there is no slot.

你好,这个特性是从初期就开始保留到现在的,我们目前还不打算提供接口去控制,希望你能理解。

虽然不知道你的使用场景是怎样的,但是目前可以这样达到目的:
<el-radio v-model="radio" label="1">&nbsp;</el-radio>

@Hi-Linlin 版本2.14.1 添加 &nbsp;无效

Was this page helpful?
0 / 5 - 0 ratings

Related issues

no5no6 picture no5no6  ·  3Comments

chenzhe-pro picture chenzhe-pro  ·  3Comments

fscardua picture fscardua  ·  3Comments

Kingwl picture Kingwl  ·  3Comments

yorululu picture yorululu  ·  3Comments