input.vue 1.1 KB

123456789101112131415
  1. <template>
  2. <uni-shadow-root class="vant-field-input"><input :id="name" :class="(utils.bem('field__control', [inputAlign, { disabled, error }]))+' input-class'" :type="type" :focus="focus" :cursor="cursor" :value="innerValue" :auto-focus="autoFocus" :disabled="disabled || readonly" :maxlength="maxlength" :placeholder="placeholder" :placeholder-style="placeholderStyle" :placeholder-class="utils.bem('field__placeholder', { error })" :confirm-type="confirmType" :confirm-hold="confirmHold" :hold-keyboard="holdKeyboard" :cursor-spacing="cursorSpacing" :adjust-position="adjustPosition" :selection-end="selectionEnd" :selection-start="selectionStart" :always-embed="alwaysEmbed" :password="password || type === 'password'" @input="onInput" @click="onClickInput" @blur="onBlur" @focus="onFocus" @confirm="onConfirm" @keyboardheightchange="onKeyboardHeightChange" @nicknamereview="onBindNicknameReview"></input></uni-shadow-root>
  3. </template>
  4. <wxs src="../wxs/utils.wxs" module="utils"></wxs>
  5. <script>
  6. global['__wxRoute'] = 'vant/field/input'
  7. Component({})
  8. export default global['__wxComponents']['vant/field/input']
  9. </script>
  10. <style platform="mp-weixin">
  11. </style>