Skip to content

Class extends work a bit wrong #199

Closed
@fimars

Description

@fimars

Background

// base input component
@Component({
  template: require('any.html')
})
export class InputComponent extends Vue {
  // ...something doesn't important

  @Watch('value')
  private valueChange(newVal: string | number, oldVal: string | number) {
    this.setCurrentValue(newVal);
  }
}
// a mock component for test
@Component({
  template: require('any.html'),
})
class MockComponent extends InputComponent {
  constructor() {
    super();
  }
}

How

default

Work very well, but have a bit weird. The MockInputComponent have two duplicate content,
caused his watcher to be triggered twice.

Like this:
default

Am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions