-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
62 lines (54 loc) · 2.33 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Online Calculator</title>
<!-- import google fonts: Roboto -->
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
<!-- import custom css -->
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container" id="app">
<header>
<section class="formula">
<!-- 塞入空格避免起始時 section 元素消失 -->
{{equationDisplay}}
</section>
<div class="result" ref="result">
{{mainDisplay}}
</div>
</header>
<div class="box-wrap d-flex space-around flex-wrap">
<div class="box" @click="enterSeven">7</div>
<div class="box" @click="enterEight">8</div>
<div class="box" @click="enterNine">9</div>
<div class="box math-symbol" @click="clickDivide">÷</div>
<div class="box" @click="enterFour">4</div>
<div class="box" @click="enterFive">5</div>
<div class="box" @click="enterSix">6</div>
<div class="box math-symbol" @click="clickMultiply">×</div>
<div class="box" @click="enterOne">1</div>
<div class="box" @click="enterTwo">2</div>
<div class="box" @click="enterThree">3</div>
<div class="box math-symbol" @click="clickPlus">+</div>
<div class="box" @click="enterZero">0</div>
<div class="box" @click="enterHundred">00</div>
<div class="box" @click="clickPoint">.</div>
<div class="box math-symbol" @click="clickMinus">−</div>
<div class="box clean" @click="clickClean">AC</div>
<div class="box clean" @click="clickBack">⌫</div>
<div class="total" @click="clickEqual">
<span class="equal">=</span>
</div>
</div>
</div>
<!-- import vue.js - development -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<!-- import vue.js - production
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> -->
<!-- import custom js -->
<script src="js/all.js"></script>
</body>
</html>