This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
computed: { | |
empname: function() { | |
switch (this.empid) { | |
case '1': | |
this.name = 'takahashi'; | |
break; | |
case '2': | |
this.name = 'higashiguchi'; | |
break; | |
case '3': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<div id="app"> | |
従業員番号:<input type="text" v-model="empid" placeholder="1,2,3のどれか"><br> | |
{{empname}}<br> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="app" v-show="age >= 20"> | |
{{name}}:{{age}}<br> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<div id="app" v-show="age >= 20"> | |
{{name}}:{{age}}<br> | |
</div> | |
<script src="https://jp.vuejs.org/js/vue.js"></script> |
OlderNewer