1 Star 0 Fork 0

郑萨沙/计算器

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.html 2.02 KB
一键复制 编辑 原始数据 按行查看 历史
郑萨沙 提交于 2021-11-01 12:34 . fisrt commit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Calculator</title>
<link rel="stylesheet" href="./css/style.css">
</head>
<body>
<div id="app">
<div class="calculator">
<!-- 显示计算结果 -->
<div class="result" style="grid-area:result">{{ equation }}</div>
<!-- 按钮 -->
<button style="grid-area: ac;" @click="clear">AC</button>
<button style="grid-area: plus_minus;" @click="calculateToggle">±</button>
<button style="grid-area: percent;" @click="calculatePercent">%</button>
<button style="grid-area: add;" @click="append('+')">+</button>
<button style="grid-area: subtract;" @click="append('-')">-</button>
<button style="grid-area: multiply;" @click="append('x')">x</button>
<button style="grid-area: divide;" @click="append('÷')">÷</button>
<button style="grid-area: equal;" @click="calculate">=</button>
<button style="grid-area: number_1;" @click="append('1')">1</button>
<button style="grid-area: number_2;" @click="append('2')">2</button>
<button style="grid-area: number_3;" @click="append('3')">3</button>
<button style="grid-area: number_4;" @click="append('4')">4</button>
<button style="grid-area: number_5;" @click="append('5')">5</button>
<button style="grid-area: number_6;" @click="append('6')">6</button>
<button style="grid-area: number_7;" @click="append('7')">7</button>
<button style="grid-area: number_8;" @click="append('8')">8</button>
<button style="grid-area: number_9;" @click="append('9')">9</button>
<button style="grid-area: number_0;" @click="append('0')">0</button>
<button style="grid-area: dot;" @click="append('.')">.</button>
</div>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.11/vue.common.dev.js"></script>
<script src="./js/index.js"></script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Saschazheng/calculator.git
git@gitee.com:Saschazheng/calculator.git
Saschazheng
calculator
计算器
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385