riku
2024-07-26 c827d70bd16535e103f4bcdd9f3ed53a5fd324e8
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
<wxs src="../common/utils.wxs" module="_" />
 
<view style="{{_._style([style, customStyle])}}" class="class {{classPrefix}} {{prefix}}-class">
  <view
    class="{{classPrefix}}__input-box {{prefix}}-{{localValue.focus ? 'is-focused' : 'not-focused'}} {{classPrefix}}__input-box--{{center ? 'center' : ''}} {{classPrefix}}__input-box--{{shape}} {{prefix}}-class-input-container"
  >
    <!-- <view wx:if="{{label}}" class="{{classPrefix}}__label {{prefix}}-class-label">{{label}}</view>
    <slot name="label" /> -->
    <t-icon
      wx:if="{{leftIcon}}"
      name="{{leftIcon}}"
      size="24"
      class="{{prefix}}-icon {{prefix}}-class-left"
      aria-hidden="{{true}}"
    />
    <slot name="left-icon" />
    <input
      type="{{type}}"
      name="input"
      disabled="{{disabled}}"
      class="{{prefix}}-input__keyword {{prefix}}-class-input"
      focus="{{localValue.focus}}"
      value="{{value}}"
      confirm-type="search"
      placeholder="{{placeholder}}"
      placeholder-class="{{classPrefix}}__placeholder {{classPrefix}}__placeholder--{{center ? 'center': 'normal'}}"
      bind:input="onInput"
      bind:focus="onFocus"
      bind:blur="onBlur"
      bind:confirm="onConfirm"
    />
    <view
      wx:if="{{value !=='' && clearable}}"
      class="{{classPrefix}}__clear {{prefix}}-class-clear"
      bind:tap="handleClear"
      aria-role="button"
      aria-label="清除"
    >
      <t-icon name="close-circle-filled" size="24" />
    </view>
  </view>
  <view
    wx:if="{{action}}"
    class="{{classPrefix}}__search-action {{prefix}}-class-action"
    bindtap="onActionClick"
    aria-role="button"
  >
    {{action}}
  </view>
  <slot name="action" />
</view>