add topic_result
This commit is contained in:
parent
444487baae
commit
d8e6870dfb
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Калькулятор путешествий</title>
|
||||
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="app">
|
||||
<input v-model="a"></br>
|
||||
<input v-model="b"></br>
|
||||
<p>Итого: {{ result }}</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
Vue.createApp({
|
||||
data() {
|
||||
return {
|
||||
a: 0,
|
||||
b: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
result() {
|
||||
return this.a * this.b
|
||||
}
|
||||
}
|
||||
}).mount('#app')
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue