Skip to content

Allow computed properties of subobjects. #1964

@sjoerdvisscher

Description

@sjoerdvisscher

I want something like this:

{
  data() {
    return {
      song: {
        tracks: [...]
      }
    }
  },
  computed: {
    'song.duration'() {
      return max(this.song.tracks.map(track => track.duration))
    }
  }
}

in such a way that duration is an actual (computed) property on the song object.

I have a feeling this may be quite easy to add. With some pointers where to start, I'd be happy to try to add this myself.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions