phone.uvue 973 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <view class="flex flex-col w-[40vw]">
  3. <view class="mb-3 flex flex-row ">
  4. <cl-input class="" :pt="{ className: '!h-[40px] !rounded-xxl !px-4 !w-[40vw]' }" v-model="form.username"
  5. placeholder="请输入手机号"></cl-input>
  6. </view>
  7. <view class="relative flex flex-row items-center mb-5">
  8. <cl-input :pt="{ className: '!h-[40px] !rounded-xxl !px-4 !w-[40vw]' }" v-model="form.code" :clearable="false"
  9. type="number">
  10. </cl-input>
  11. <view class="absolute right-0">
  12. <sms-btn :ref="refs.set('smsBtn')" :phone="form.username"></sms-btn>
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script setup lang="ts">
  18. import { type PropType } from "vue";
  19. import type { LoginForm } from "./types";
  20. import SmsBtn from "./sms-btn.uvue";
  21. import { useRefs, } from "@/.cool";
  22. const props = defineProps({
  23. form: {
  24. type: Object as PropType<LoginForm>,
  25. default: () => ({})
  26. }
  27. });
  28. const emit = defineEmits(["success"]);
  29. const refs = useRefs();
  30. </script>