-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
15 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,3 @@ | ||
<script lang="ts" setup> | ||
import { reactive } from 'vue' | ||
import { FMessage } from 'fighting-design' | ||
import type { FormSubmit } from 'fighting-design' | ||
<script lang="ts" setup></script> | ||
|
||
const ruleForm2 = reactive({ | ||
name: '', | ||
info: { | ||
password: '' | ||
} | ||
}) | ||
const handelSubmit2: FormSubmit = (ok, model, res, evt): void => { | ||
console.log(ok, model) | ||
if (!ok) return | ||
FMessage.primary(`ok: ${ok} model:${model} res: ${res} evt: ${evt} 开始提交表单`) | ||
} | ||
</script> | ||
|
||
<template> | ||
{{ ruleForm2 }} | ||
<f-form :model="ruleForm2" label-width="60px" :on-submit="handelSubmit2"> | ||
<f-form-item | ||
label="密码" | ||
name="name" | ||
:rules="[{ min: 6, message: '至少输入六位数密码' }]" | ||
> | ||
<f-input v-model="ruleForm2.name" type="password" placeholder="请输入密码" /> | ||
</f-form-item> | ||
|
||
<f-form-item | ||
label="密码" | ||
name="info.password" | ||
:rules="[{ min: 6, message: '至少输入六位数密码' }]" | ||
> | ||
<f-input | ||
v-model="ruleForm2.info.password" | ||
type="password" | ||
placeholder="请输入密码" | ||
/> | ||
</f-form-item> | ||
|
||
<f-form-item> | ||
<f-button type="primary" native-type="submit" block>提交表单</f-button> | ||
</f-form-item> | ||
</f-form> | ||
</template> | ||
<template></template> |