Skip to content

数据类型发生改变 #3091

@niefufeng

Description

@niefufeng

Version

3.0.5

Reproduction link

https://github.com/niefufeng/vue3-datatype-bug-demo

Steps to reproduce

  • yarn build
  • 访问 dist/index.html
  • 点击页面上的 toggle 使表单隐藏(在此之前可以尝试点击下拉框切换值,但是类型始终是 number
  • 再次点击页面伤的 toggle 使表单展示
  • 点击下拉框切换值,此时数据类型会从 number 变为 string

What is expected?

值的类型应该永远是 number

What is actually happening?

值的类型从 number 变为了 string


  • 该 bug 只会在对子组建使用 v-if 时会出现
  • 该 bug 只会在 build 过后出现,dev 模式下不会出现
  • refreactive 均会出现该 bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions