|
@@ -5,12 +5,12 @@
|
|
|
}" :rules="[
|
|
}" :rules="[
|
|
|
{
|
|
{
|
|
|
required: true,
|
|
required: true,
|
|
|
- message: '用户名不能为空'
|
|
|
|
|
|
|
+ message: '手机号不能为空'
|
|
|
}
|
|
}
|
|
|
] as ClFormRule[]
|
|
] as ClFormRule[]
|
|
|
">
|
|
">
|
|
|
<cl-input clearable class="" :pt="{ className: '!h-[40px] !rounded-xxl !px-4 !w-[80vw]' }" v-model="form.username"
|
|
<cl-input clearable class="" :pt="{ className: '!h-[40px] !rounded-xxl !px-4 !w-[80vw]' }" v-model="form.username"
|
|
|
- placeholder="请输入用户名(必填)"></cl-input>
|
|
|
|
|
|
|
+ placeholder="请输入手机号(必填)"></cl-input>
|
|
|
</cl-form-item>
|
|
</cl-form-item>
|
|
|
<cl-form-item prop="password" required :pt="{
|
|
<cl-form-item prop="password" required :pt="{
|
|
|
className: '!mb-4'
|
|
className: '!mb-4'
|
|
@@ -45,18 +45,30 @@
|
|
|
password placeholder="请确认密码(必填)">
|
|
password placeholder="请确认密码(必填)">
|
|
|
</cl-input>
|
|
</cl-input>
|
|
|
</cl-form-item>
|
|
</cl-form-item>
|
|
|
- <cl-form-item :pt="{
|
|
|
|
|
|
|
+ <cl-form-item prop="code" required :pt="{
|
|
|
className: '!mb-4'
|
|
className: '!mb-4'
|
|
|
- }" prop="realName">
|
|
|
|
|
- <cl-input clearable :pt="{ className: '!h-[40px] !rounded-xxl !px-4 !w-[80vw]' }" v-model="form.realName"
|
|
|
|
|
- placeholder="请输入姓名"></cl-input>
|
|
|
|
|
|
|
+ }" :rules="[
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '验证码不能为空'
|
|
|
|
|
+ }
|
|
|
|
|
+ ] as ClFormRule[]
|
|
|
|
|
+ ">
|
|
|
|
|
+ <cl-input :pt="{ className: '!h-[40px] !rounded-xxl !px-4 !w-[80vw]' }" v-model="form.code" :clearable="false"
|
|
|
|
|
+ type="number" placeholder="请输入验证码(必填)">
|
|
|
|
|
+ </cl-input>
|
|
|
|
|
+ <view class="absolute right-0">
|
|
|
|
|
+ <sms-btn :ref="refs.set('smsBtn')" :phone="form.username"></sms-btn>
|
|
|
|
|
+ </view>
|
|
|
</cl-form-item>
|
|
</cl-form-item>
|
|
|
<cl-form-item :pt="{
|
|
<cl-form-item :pt="{
|
|
|
className: '!mb-4'
|
|
className: '!mb-4'
|
|
|
- }" prop="phone">
|
|
|
|
|
- <cl-input clearable :pt="{ className: '!h-[40px] !rounded-xxl !px-4 !w-[80vw]' }" v-model="form.phone"
|
|
|
|
|
- placeholder="请输入手机号"></cl-input>
|
|
|
|
|
|
|
+ }" prop="nickName">
|
|
|
|
|
+ <cl-input clearable :pt="{ className: '!h-[40px] !rounded-xxl !px-4 !w-[80vw]' }" v-model="form.nickName"
|
|
|
|
|
+ placeholder="请输入昵称(可选)"></cl-input>
|
|
|
</cl-form-item>
|
|
</cl-form-item>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -64,6 +76,7 @@
|
|
|
import { type PropType } from "vue";
|
|
import { type PropType } from "vue";
|
|
|
import type { LoginForm } from "./types";
|
|
import type { LoginForm } from "./types";
|
|
|
import { useRefs, } from "@/.cool";
|
|
import { useRefs, } from "@/.cool";
|
|
|
|
|
+import SmsBtn from "./sms-btn.uvue";
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
form: {
|
|
form: {
|