67 lines
2.9 KiB
Plaintext
67 lines
2.9 KiB
Plaintext
<view
|
|
class="{{classPrefix}} {{!!errorMessage ? classBasePrefix + '-is-error' : ''}} {{classPrefix}}--size-{{size}} {{classPrefix + (borderless ? '' : '--bordered')}} {{prefix}}-class"
|
|
>
|
|
<view wx:if="{{prefixIcon}}" class="{{classPrefix}}__icon-wrap">
|
|
<slot name="prefixIcon" wx:if="{{prefixIcon === 'slot'}}" />
|
|
<t-icon wx:else class="{{classPrefix}}__icon--prefix {{prefix}}-class-icon" name="{{prefixIcon}}" />
|
|
</view>
|
|
<view wx:if="{{label}}" class="{{classPrefix}}__label">
|
|
<slot name="label" wx:if="{{label === 'slot'}}" />
|
|
<text wx:else class="{{prefix}}-class-label">{{label}}</text>
|
|
</view>
|
|
|
|
<view class="{{classPrefix}}__wrap">
|
|
<view class="{{classPrefix}}__content">
|
|
<input
|
|
disabled="{{disabled}}"
|
|
placeholder="{{placeholder}}"
|
|
placeholderStyle="{{placeholderStyle}}"
|
|
placeholder-class="{{classPrefix}}__placeholder"
|
|
value="{{value}}"
|
|
bindinput="onInput"
|
|
bindfocus="onFocus"
|
|
bindblur="onBlur"
|
|
bindconfirm="onConfirm"
|
|
bind:keyboardheightchange="onKeyboardHeightChange"
|
|
password="{{type === 'password'}}"
|
|
type="{{type === 'password' ? 'text' : type}}"
|
|
focus="{{focus}}"
|
|
confirm-type="{{confirmType}}"
|
|
confirm-hold="{{confirmHold}}"
|
|
cursor="{{cursor}}"
|
|
cursor-spacing="{{cursorSpacing}}"
|
|
adjust-position="{{adjustPosition}}"
|
|
auto-focus="{{autoFocus}}"
|
|
always-embed="{{alwaysEmbed}}"
|
|
selection-start="{{selectionStart}}"
|
|
selection-end="{{selectionEnd}}"
|
|
hold-keyboard="{{holdKeyboard}}"
|
|
safe-password-cert-path="{{safePasswordCertPath}}"
|
|
safe-password-length="{{safePasswordLength}}"
|
|
safe-password-time-stamp="{{safePasswordTimeStamp}}"
|
|
safe-password-nonce="{{safePasswordNonce}}"
|
|
safe-password-salt="{{safePasswordSalt}}"
|
|
safe-password-custom-hash="{{safePasswordCustomHash}}"
|
|
class="{{classPrefix}}__control {{suffix || align ==='right' ? classPrefix + '__control--right':''}} {{align === 'center' ? classPrefix + '__control--center':''}} {{prefix}}-class-input"
|
|
/>
|
|
<view wx:if="{{ clearable && value.length > 0}}" class="{{classPrefix}}__wrap--icon" bind:tap="clearInput">
|
|
<t-icon name="close-circle-filled" size="48rpx" class="{{prefix}}-class-clearable" />
|
|
</view>
|
|
<view class="{{classPrefix}}__wrap--suffix">
|
|
<slot name="suffix" />
|
|
</view>
|
|
<view wx:if="{{suffix}}" class="{{classPrefix}}__wrap--suffix-text {{prefix}}-class-suffix">
|
|
<text>{{suffix}}</text>
|
|
</view>
|
|
<view wx:if="{{suffixIcon}}" class="{{classPrefix}}__wrap--icon">
|
|
<t-icon name="{{suffixIcon}}" size="48rpx" class="{{prefix}}-class-suffix-icon" />
|
|
</view>
|
|
</view>
|
|
<view
|
|
wx:if="{{errorMessage && errorMessage.length > 0}}"
|
|
class="{{classPrefix}}__error-msg {{prefix}}-class-error-msg"
|
|
>{{errorMessage}}
|
|
</view>
|
|
</view>
|
|
</view>
|