docs(form): fix custom-rule demo

This commit is contained in:
牧码山人 2021-06-16 21:58:09 +08:00 committed by GitHub
parent 9c83e7f1b4
commit 902773310e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,18 +4,18 @@ Sometimes builtin triggers don't meet you demand. You can custom you valiation b
```html ```html
<n-form :model="model" ref="formRef" :rules="rules"> <n-form :model="model" ref="formRef" :rules="rules">
<n-form-item-row path="age" label="Age"> <n-form-item path="age" label="Age">
<n-input v-model:value="model.age" @keydown.enter.prevent /> <n-input v-model:value="model.age" @keydown.enter.prevent />
</n-form-item-row> </n-form-item>
<n-form-item-row path="password" label="Password"> <n-form-item path="password" label="Password">
<n-input <n-input
v-model:value="model.password" v-model:value="model.password"
@input="handlePasswordInput" @input="handlePasswordInput"
type="password" type="password"
@keydown.enter.prevent @keydown.enter.prevent
/> />
</n-form-item-row> </n-form-item>
<n-form-item-row <n-form-item
first first
path="reenteredPassword" path="reenteredPassword"
label="Re-enter Password" label="Re-enter Password"
@ -27,7 +27,7 @@ Sometimes builtin triggers don't meet you demand. You can custom you valiation b
type="password" type="password"
@keydown.enter.prevent @keydown.enter.prevent
/> />
</n-form-item-row> </n-form-item>
<n-row :gutter="[0, 24]"> <n-row :gutter="[0, 24]">
<n-col :span="24"> <n-col :span="24">
<div style="display: flex; justify-content: flex-end;"> <div style="display: flex; justify-content: flex-end;">