• 家庭记账本开发进度6


    用代码写出来的计算器源码:1 <!--pages/record-expend/record-expend.wxml-->
     2 <view class="ui-height-100" bindtap="hiddenCaculator">
     3 
     4 
     5   <!--用途-->
     6   <view class="select-consumption-patterns ui-pt20">
     7     <view class="consumption-patterns-item" wx:for="{{consumpPatternsList}}">
     8       <view class=" ui-flex-ver ui-flex-center ui-p10" data-index="{{index}}" bindtap="onConsumptionItemClick">
     9         <image class="consumption-patterns-item-icon" src="{{item.isSelect ? item.iconSel : item.icon}}"></image>
    10         <text>{{item.name}}</text>
    11       </view>
    12     </view>
    13   </view>
    14 
    15   <!--横线-->
    16   <view class="line ui-mt20">
    17   </view>
    18   <view class="pay-money">
    19     <image class="money-icon" src="../../pages/img/date.png"></image>
    20     <text class="ui-ml20">日期</text>
    21     <picker class="date-text" mode="date" value="{{date}}" end="{{todayDate}}" bindchange="onDateChange">
    22       <view>{{date}}
    23       </view>
    24     </picker>
    25   </view>
    26 
    27   <!--横线-->
    28   <view class="line">
    29   </view>
    30   <view class="pay-money" catchtap="showCaculator">
    31     <image class="money-icon" src="../../pages/img/money.png"></image>
    32     <text class="ui-ml20">花费</text>
    33     <text class="money-text">{{spendMoney}}</text>
    34   </view>
    35 
    36   <!--横线-->
    37   <view class="line">
    38   </view>
    39   <view class="pay-money">
    40     <image class="money-icon" src="../../pages/img/remarks.png"></image>
    41     <input class="ui-ml20 ui-flex-1" bindinput="onInputRemarks" value="{{remarksText}}" type="text" placeholder="备注:{{selectName}}" />
    42   </view>
    43 
    44   <!--横线-->
    45   <view class="line">
    46   </view>
    47  <!--按钮-->
    48   <view bindtap="goContinueTap">
    49     <button class="blue-button ui-mt20" hover-class="blue-button-p" bindtap="confirmData">完成</button>
    50   </view>
    51 
    52 
    53   <block wx:if="{{isShowCaculator}}">
    54     <view class="calculator">
    55       <view class="calculator-number">
    56         <view class="calculator-number-item">
    57           <view hover hover-class="number-hover" class="number" data-num="1" catchtap="touchNum">1</view>
    58           <view hover hover-class="number-hover" class="number" data-num="2" catchtap="touchNum">2</view>
    59           <view hover hover-class="number-hover" class="number" data-num="3" catchtap="touchNum">3</view>
    60         </view>
    61         <view class="calculator-number-item">
    62           <view hover hover-class="number-hover" class="number" data-num="4" catchtap="touchNum">4</view>
    63           <view hover hover-class="number-hover" class="number" data-num="5" catchtap="touchNum">5</view>
    64           <view hover hover-class="number-hover" class="number" data-num="6" catchtap="touchNum">6</view>
    65         </view>
    66         <view class="calculator-number-item">
    67           <view hover hover-class="number-hover" class="number" data-num="7" catchtap="touchNum">7</view>
    68           <view hover hover-class="number-hover" class="number" data-num="8" catchtap="touchNum">8</view>
    69           <view hover hover-class="number-hover" class="number" data-num="9" catchtap="touchNum">9</view>
    70         </view>
    71         <view class="calculator-number-item">
    72           <view hover hover-class="number-hover" class="number" data-num="." catchtap="touchNum">.</view>
    73           <view hover hover-class="number-hover" class="number" data-num="0" catchtap="touchNum">0</view>
    74           <view hover hover-class="number-hover" class="number" catchtap="touchClear">←</view>
    75         </view>
    76       </view>
    77       <view class="calculator-operator">
    78         <view hover hover-class="number-hover" class="operator" data-num="+" catchtap="touchNum">+</view>
    79         <view hover hover-class="number-hover" class="operator" catchtap="touchResult">=</view>
    80       </view>
    81     </view>
    82   </block>
    83 
    84 </view>

    通过不断寻找合适的计算器模板,不断测试,最后使程序成功运行,由于程序运行存在错误,所以运行失败,继续找。。。。。

  • 相关阅读:
    About Spring
    execle导入后 数据 无刷新 显示在 输入页面
    前端小神龟 -- 分页导航栏
    如何在mysql命令窗口获取到程序正在执行的sql语句
    div+css(ul li)实现图片上文字下列表布局
    C#异常之(已有打开的与此 Command 相关联,已有打开的与此命令相关联的 DataReader,必须首先将它关闭。)
    台灣VR內容產業聯盟_技術推廣中心
    2014新的一年到来,祝大家新年快乐
    matlab 提取文件路径名称,用于实现遍历读取文件(我的目的是遍历图像)
    无监督学习一些算法的简要概括(一)-稀疏自编码
  • 原文地址:https://www.cnblogs.com/zql98/p/10428088.html
Copyright © 2020-2023  润新知