8000 Vue组件的Props中coerce函数中给属性添加的字段没有observer,能否添加下 · Issue #331 · vuejs/v2.vuejs.org · GitHub
[go: up one dir, main page]

Skip to content

Vue组件的Props中coerce函数中给属性添加的字段没有observer,能否添加下 #331

@hsuehic

Description

@hsuehic

如下,修改官方Tree组件的代码

coerce: function (val) {
          val.forEach(function (item) {
            item.isFolder = !!(item.children && item.children.length)
            item.open = item.open || false
          })
          return val
        }

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

      0