微信小程序开发简易计算器
浏览量:4418
时间:
来源:weixin_30699465
!--pages/num/num.wxml--!-- text计算器功能需求/text --view class='content'view class='screen'{{result}}/viewview class="btnGroup"button class='item orange' hover-class='other-button-hover' id='{{id1}}' bindtap='clickButton'历史/buttonbutton class='item orange' hover-class='other-button-hover' id='{{id2}}' bindtap='clickButton'C/buttonbutton class='item orange' hover-class='other-button-hover' id='{{id3}}' bindtap='clickButton'删除/buttonbutton class='item orange' hover-class='other-button-hover' id='{{id4}}' bindtap='clickButton'除法/button/viewview class="btnGroup"button class='item blue' hover-class='button-hover-num' id='{{id5}}' bindtap='clickButton'7/buttonbutton class='item blue' hover-class='button-hover-num' id='{{id6}}' bindtap='clickButton'8/buttonbutton class='item blue' hover-class='button-hover-num' id='{{id7}}' bindtap='clickButton'9/buttonbutton class='item orange' hover-class='other-button-hover' id='{{id8}}' bindtap='clickButton'乘法/button/viewview class="btnGroup"button class='item blue' hover-class='button-hover-num' id='{{id9}}' bindtap='clickButton'4/buttonbutton class='item blue' hover-class='button-hover-num' id='{{id10}}' bindtap='clickButton'5/buttonbutton class='item blue' hover-class='button-hover-num' id='{{id11}}' bindtap='clickButton'6/buttonbutton class='item orange' hover-class='other-button-hover' id='{{id12}}' bindtap='clickButton'减法/button/viewview class="btnGroup"button class='item blue' hover-class='button-hover-num' id='{{id13}}' bindtap='clickButton'1/buttonbutton class='item blue' hover-class='button-hover-num' id='{{id14}}' bindtap='clickButton'2/buttonbutton class='item blue' hover-class='button-hover-num' id='{{id15}}' bindtap='clickButton'3/buttonbutton class='item orange' hover-class='other-button-hover' id='{{id16}}' bindtap='clickButton'加法/button/viewview class="btnGroup"button class='item orange' hover-class='other-button-hover' id='{{id17}}' bindtap='clickButton'加/减/buttonbutton class='item blue' hover-class='button-hover-num' id='{{id18}}' bindtap='clickButton'0/buttonbutton class='item blue' hover-class='button-hover-num' id='{{id19}}' bindtap='clickButton'./buttonbutton class='item orange' hover-class='other-button-hover' id='{{id20}}' bindtap='clickButton'=/button/view/view data: {result:"0",id1:"history",id2:"clear",id3:"back",id4:"div",id5:"num_7",id6: "num_8",id7: "num_9",id8: "mu1",id9: "num_4",id10: "num_5",id11: "num_6",id12: "sub",id13: "num_1",id14: "num_2",id15: "num_3",id16: "add",id17: "negative",id18: "num_0",id19:"dot",id20:"equ"},clickButton:function(e){var data = this.data.result;if(e.target.id = 'num_0' && e.target.id = 'num_9'){data += e.target.id.split("_")[1];if(this.data.result == '0'){data = e.target.id.split("_")[1];}}else{console.log(e.target.id);}this.setData({result:data})}, /* pages/num/num.wxss */.btnGroup{display: flex;flex-direction:row;}.item{width:160rpx;min-height:150rpx;margin:10rpx;text-shadow: 0 1px 1px rgba(0,0,0, 0.3);border-radius:5px;text-align:center;line-height:150rpx;}.content{height: 100%;display:flex;flex-direction:column;align-items:center;box-sizing:border-box;padding-top:10rpx;}.screen{";text-align:right;width:650rpx;height:150rpx;line-height:150rpx;padding:0 20rpx;margin:30rpx;border:1px solid #ddd;border-radius:3px;}.orange{";color:#fef4e9;border:solid 1px #da7c0c;}.blue{";color:#d9eef7;border:solid 1px #0076a3;}.button-hover-num{";opacity: 0.7;}.other-buttonn-hover{"red;}
版权声明
即速应用倡导尊重与保护知识产权。如发现本站文章存在版权问题,烦请提供版权疑问、身份证明、版权证明、联系方式等发邮件至197452366@qq.com ,我们将及时处理。本站文章仅作分享交流用途,作者观点不等同于即速应用观点。用户与作者的任何交易与本站无关,请知悉。
最新资讯
-

小程序制作平台选型踩坑记录:2026年五大主流方案横向对比
2026 年微信小程序月活达 10.7 亿、覆盖 108 个行业,本次横向对比即速应用、乔拓云、凡科、有赞、微盟五大主流平台,分三阶段给出选型结论,核心聚焦成本、扩展性、运营能力三大维度。 -

即速应用,赋能企业玩转微信小程序智慧经营
作为国内领军的智慧商业经营服务商,即速应用始终秉承“让每个企业都拥有自己的智慧店铺”的愿景,持续赋能更多企业玩转智慧经营。即速应用旗下拥有“小程序搭建工具-即速应用”、“私域流量专家-即客云”等产品,帮助商家打通互联网全生态营销闭环。 -

即客云2.0重磅更新,让微信小程序运营更简单!
即客云作为一款基于企业微信的第三方工具,现从多维度提供超过30种功能,自上线以来,已服务多家企业,受到一致好评。近期,我们根据客户反馈和市场调研正式推出升级版 即客云2.0!更新了私域运营SOP,群日历功能,批量拓客,客户雷达,消息推送,个人欢迎语,帮助企业更好运用企业微信;同时提升了社群运营工作标准化,提升运营效率,帮助企业实现客户增长,玩转私域流量。










