Skip to content

Commit

Permalink
update: 将提示信息添加到标题中
Browse files Browse the repository at this point in the history
  • Loading branch information
LSX-s-Software committed Aug 24, 2023
1 parent 46ab1f9 commit ec0714f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions components/z-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
:maxlength="maxlength"
:minlength="minlength"
:pattern="pattern"
:title="title"
:title="requirement"
@input="onChange"
/>
<div class="icon">
Expand Down Expand Up @@ -62,7 +62,7 @@ const props = defineProps({
type: String,
required: false,
},
title: {
requirement: {
type: String,
required: false,
},
Expand Down
14 changes: 7 additions & 7 deletions pages/register.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<form @submit="submit">
<z-input
v-model="username"
label="用户名"
label="用户名(只能包含英文大小写、数字、_和-)"
required
maxlength="16"
minlength="4"
pattern="[a-zA-Z0-9_\-]+"
title="只能包含英文大小写、数字、_和-"
requirement="只能包含英文大小写、数字、_和-"
placeholder="请输入用户名"
:custom-rule="usernameRule"
>
Expand All @@ -26,7 +26,7 @@
maxlength="11"
type="tel"
pattern="1[3-9]\d+"
title="请输入正确的11位手机号"
requirement="请输入正确的11位手机号"
placeholder="请输入手机号"
>
<template #prefix>
Expand All @@ -41,7 +41,7 @@
type="number"
required
pattern="[0-9]+"
title="请输入正确的6位数字验证码"
requirement="请输入正确的6位数字验证码"
placeholder="请输入验证码"
>
<template #prefix>
Expand All @@ -55,13 +55,13 @@
</z-input>
<z-input
v-model="password"
label="密码"
label="密码(只能包含英文大小写、数字、_和-)"
required
type="password"
maxlength="18"
minlength="6"
pattern="[a-zA-Z0-9_\-]+"
title="只能包含英文大小写、数字、_和-"
requirement="只能包含英文大小写、数字、_和-"
placeholder="请输入密码"
>
<template #prefix>
Expand All @@ -76,7 +76,7 @@
maxlength="18"
minlength="6"
pattern="[a-zA-Z0-9_\-]+"
title="只能包含英文大小写、数字、_和-"
requirement="只能包含英文大小写、数字、_和-"
placeholder="请再次输入密码"
:custom-rule="confirmedPasswordRule"
>
Expand Down

0 comments on commit ec0714f

Please sign in to comment.