Skip to content

Instantly share code, notes, and snippets.

View tsukiyama-a5's full-sized avatar

tsukiyama-a5 tsukiyama-a5

View GitHub Profile
computed: {
empname: function() {
switch (this.empid) {
case '1':
this.name = 'takahashi';
break;
case '2':
this.name = 'higashiguchi';
break;
case '3':
<!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>
<div id="app" v-show="age >= 20">
{{name}}:{{age}}<br>
</div>
<!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>