dk-number-input.wxml 2.1 KB

12345678910111213141516171819
  1. <view>
  2. <view wx:if="{{!focus || disabled}}" style="padding-top: 20rpx; padding-bottom: 20rpx;">
  3. <dk-cell height="48rpx" left="{{left}}" signSize="{{signSize}}" fontWeight="{{titleFontWeight}}" fontSize="{{fontSize}}" tail="{{percentSignFlag ? '%' : ''}}" percentSignFlag="{{percentSignFlag}}" contentColor="{{inputColor}}" amount="{{sign?true:false }}" contentFontWeight="{{fontWeight}}" contentRight="{{contentRight}}" center="{{center=='right'?'flex-end':center}}" title="{{titleValue}}" content="{{(inputValue || inputValue == 0)?inputValue:null}}" titleWid="{{titleWidth}}" catchtap="handleInput" titleColor="{{titleColor}}" placeholder="{{placeholder}}" errorMessage="{{errorMessage}}">
  4. </dk-cell>
  5. </view>
  6. <!-- <view wx:else class="input-class" style="--center--:{{center}}">
  7. <view wx:if="{{titleValue}}" class="input-title-class" style="--color--:{{titleColor}};--fontSize--:{{fontSize + 'px'}};--left--:{{left}};--width--:{{titleWidth}};--fontWeight--:{{titleFontWeight}}">{{titleValue}}</view>
  8. <view class="input_content-class" style="--width--:{{titleWidth}}">
  9. <input disabled="{{readonly}}" style="text-align: {{center}};color:{{inputColor}};font-size:{{fontSize + 'px'}};font-weight: {{fontWeight}}; height: {{fontSize + 'px'}}" type="digit" value="{{inputValue}}" focus='{{focus}}' selection-start='0' selection-start='{{inputValue.length}}' bindinput="bindInput" bindblur='bindBlur'></input>
  10. <van-icon name="clear" color="#c8c9cc;" catchtap="clearChoose"></van-icon>
  11. </view>
  12. </view> -->
  13. <!--文本框-->
  14. <view wx:else style="padding-top: 2rpx; padding-bottom: 2rpx;">
  15. <van-field label-class="input-title-class" style="--color--:{{titleColor}};--fontSize--:{{fontSize + 'px'}};--width--:{{titleWidth}};--fontWeight--:{{titleFontWeight}}" value="{{inputValue?inputValue:undefined}}" input-align="left" label="{{titleValue}}" placeholder="{{placeholder}}" autosize auto-focus clearable border="{{ false }}" input-class="dk-cell-value-class" type="text" inputMode="decimal" bind:focus="bindFocus" bind:change="bindInput" bind:blur="bindBlur">
  16. </van-field>
  17. </view>
  18. </view>