Skip to content

🐛 [Bug]: radio-button的v-model不管用 #3609

@defghy

Description

@defghy

Version

2.25.0

Vue Version

2.7.16

Link to minimal reproduction

  <tiny-radio-group size="mini" v-model="modelValue">
    <tiny-radio-button :label="InLevelActPlat.app">app</tiny-radio-button>
    <tiny-radio-button :label="InLevelActPlat.miniGame">小游戏</tiny-radio-button>
  </tiny-radio-group>

Step to reproduce

原因:
问题代码

Image

这里的state.radioGroup?.$emit方法不对,实际运行环境中

Image

可以看到这个$emit是一个空参数方法,应该是多封装了一层

What is expected

state.radioGroup.$emit.get = instance.$emit.bind(instance);

What is actually happening

state.radioGroup.$emit.get = function() {
  return instance.$emit.bind(instance);
}

What is your project name

ps: tiny-raido是没有问题的,tiny-radio-button有问题

Any additional comments (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions