<html lang='ja'>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<div id="app">
<div class="col-sm12">
<label>足し算:</label><input type="number" v-model.number="input1_1"> + <input type="number" v-model.number="input1_2"> = <span>{{ add1 }}</span>
</div>
<div class="col-sm12">
<label>引き算:</label><input type="number" v-model.number="input2_1"> - <input type="number" v-model.number="input2_2"> = <span>{{ min1 }}</span>
</div>
<div class="col-sm12">
<label>掛け算:</label><input type="number" v-model.number="input3_1"> × <input type="number" v-model.number="input3_2"> = <span>{{ multi1 }}</span>
</div>
<div class="col-sm12">
<label>割り算:</label><input type="number" v-model.number="input4_1"> × <input type="number" v-model.number="input4_2"> = <span>{{ divis1 }}</span>
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
input1_1:0,
input1_2:0,
input2_1:0,
input2_2:0,
input3_1:0,
input3_2:0,
input4_1:0,
input4_2:0,
},
computed:{
add1: function() {return this.input1_1 + this.input1_2},
min1: function() {return this.input2_1 - this.input2_2},
multi1: function() {return this.input3_1 * this.input3_2},
divis1: function() {return this.input4_1 / this.input4_2},
},
})
</script>
</body>
</html>