Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
vue typescript child components
import { Component, Prop, Vue, Watch, Emit } from 'vue-property-decorator';
@Component
export class SearchForm extends Vue {
public search: string = 'vue';
@Prop() private color!: string;
@Watch('search')
@Emit('search:text')
private onSeachChanged(val: string, oldVal: string) {
return val;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.