Skip to content

Instantly share code, notes, and snippets.

@tsukiyama-a5
Last active November 19, 2019 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsukiyama-a5/05215ec938ae927c9b0ad8bfe53957d9 to your computer and use it in GitHub Desktop.
Save tsukiyama-a5/05215ec938ae927c9b0ad8bfe53957d9 to your computer and use it in GitHub Desktop.
computed: {
empname: function() {
switch (this.empid) {
case '1':
this.name = 'takahashi';
break;
case '2':
this.name = 'higashiguchi';
break;
case '3':
this.name = 'taniguchi';
break;
default:
this.name = '';
break;
}
return this.name + ':' + this.empid;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment