layui/example/dist/assets/form.a8a3c800.js
dingyongya 5b64cad09c 🐛(component): table
修复table 布局问题
column 新增minWidth和ellipsisTooltip属性

ISSUES CLOSED: https://gitee.com/layui/layui-vue/issues/I58DWF
2022-05-21 17:11:28 +08:00

402 lines
129 KiB
JavaScript

import{J as V,b as $,r as m,o as A,h as B,e as t,d as o,z as s,f as n,g as a,a0 as y}from"./vendor.e7911ee1.js";const P={class:"markdown-body"},T=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form")]),a(),n("span",{class:"token attr-name"},":model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("model"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u8D26\u6237"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("username"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("model.username"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u5BC6\u7801"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("password"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("model.password"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"type"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("password"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u7231\u597D"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("hobby"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-select")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("model.hobby"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-select-option")]),a(),n("span",{class:"token attr-name"},"value"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("1"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u5B66\u4E60"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-select-option")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-select-option")]),a(),n("span",{class:"token attr-name"},"value"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("2"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u7F16\u7801"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-select-option")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-select-option")]),a(),n("span",{class:"token attr-name"},"value"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("3"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u8FD0\u52A8"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-select-option")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-select")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u7279\u957F"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("specialty"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-radio")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("model.specialty"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"name"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("specialty"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("1"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u5199\u4F5C"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-radio")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-radio")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("model.specialty"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"name"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("specialty"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("2"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u753B\u753B"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-radio")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-radio")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("model.specialty"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"name"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("specialty"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("3"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u7F16\u7801"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-radio")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u63CF\u8FF0"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("desc"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-textarea")]),a(),n("span",{class:"token attr-name"},"placeholder"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u8BF7\u8F93\u5165\u63CF\u8FF0"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("model.desc"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-textarea")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("submitClick"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u63D0\u4EA4"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" ref"),n("span",{class:"token punctuation"},","),a(" reactive "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'vue'"),a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a("layer"),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'@layui/layer-vue'"),a(`
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"const"),a(" model "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"reactive"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),a(`
username`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'"admin"'),n("span",{class:"token punctuation"},","),a(`
password`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'"123456"'),n("span",{class:"token punctuation"},","),a(`
specialty`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'"1"'),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),a(`
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"submitClick"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"{"),a(`
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"open"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),a(`
type`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"1"),n("span",{class:"token punctuation"},","),a(`
title`),n("span",{class:"token operator"},":"),n("span",{class:"token string"},'"\u8868\u5355\u7ED3\u679C"'),n("span",{class:"token punctuation"},","),a(`
content`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},'<div style="padding: 10px">'),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token constant"},"JSON"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"stringify"),n("span",{class:"token punctuation"},"("),a("model"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"},"</div>"),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},","),a(`
shade`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},","),a(`
isHtmlFragment`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},","),a(`
btn `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"{"),a(" text"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'\u786E\u8BA4'"),n("span",{class:"token punctuation"},","),a(),n("span",{class:"token function"},"callback"),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},"index"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(" layer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"close"),n("span",{class:"token punctuation"},"("),a("index"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),a(`
area `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'500px'"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
model`),n("span",{class:"token punctuation"},","),a(`
submitClick
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
`)])],-1),G=a("\u5199\u4F5C"),K=a("\u753B\u753B"),L=a("\u7F16\u7801"),Q=a("\u63D0\u4EA4"),W=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form")]),a(),n("span",{class:"token attr-name"},":model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("validateModel"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"ref"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("layFormRef"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"required"),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u8D26\u6237"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("username"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("validateModel.username"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u5BC6\u7801"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("password"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("validateModel.password"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"type"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("password"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(">"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u7231\u597D"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("hobby"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-select")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("validateModel.hobby"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"multiple"),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-select-option")]),a(),n("span",{class:"token attr-name"},"value"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("1"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u5B66\u4E60"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-select-option")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-select-option")]),a(),n("span",{class:"token attr-name"},"value"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("2"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u7F16\u7801"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-select-option")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-select-option")]),a(),n("span",{class:"token attr-name"},"value"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("3"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u8FD0\u52A8"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-select-option")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-select")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u7279\u957F"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("specialty"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-radio")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("validateModel.specialty"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"name"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("specialty"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("1"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u5199\u4F5C"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-radio")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-radio")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("validateModel.specialty"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"name"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("specialty"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("2"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u753B\u753B"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-radio")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-radio")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("validateModel.specialty"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"name"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("specialty"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("3"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u7F16\u7801"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-radio")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u63CF\u8FF0"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("desc"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-textarea")]),a(),n("span",{class:"token attr-name"},"placeholder"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u8BF7\u8F93\u5165\u63CF\u8FF0"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("validateModel.desc"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-textarea")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("validate"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u63D0\u4EA4"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("clearValidate"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u6E05\u9664\u6821\u9A8C"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("reset"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u91CD\u7F6E\u8868\u5355"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" ref"),n("span",{class:"token punctuation"},","),a(" reactive "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'vue'"),a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a("layer"),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'@layui/layer-vue'"),a(`
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"const"),a(" validateModel "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"reactive"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),a(`
username`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},","),a(`
password`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},","),a(`
specialty`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'"1"'),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),a(`
`),n("span",{class:"token keyword"},"const"),a(" layFormRef "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"null"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token comment"},"// \u6821\u9A8C"),a(`
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"validate"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
layFormRef`),n("span",{class:"token punctuation"},"."),a("value"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"validate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},[a("isValidate"),n("span",{class:"token punctuation"},","),a(" model"),n("span",{class:"token punctuation"},","),a(" errors")]),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token operator"},"=>"),a(),n("span",{class:"token punctuation"},"{"),a(`
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"open"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),a(`
type`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"1"),n("span",{class:"token punctuation"},","),a(`
title`),n("span",{class:"token operator"},":"),n("span",{class:"token string"},'"\u8868\u5355\u63D0\u4EA4\u7ED3\u679C"'),n("span",{class:"token punctuation"},","),a(`
content`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},'<div style="padding: 10px"><p>\u662F\u5426\u901A\u8FC7 : '),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),a("isValidate"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"},"</p> <p>\u8868\u5355\u6570\u636E : "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token constant"},"JSON"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"stringify"),n("span",{class:"token punctuation"},"("),a("model"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," </p> <p>\u9519\u8BEF\u4FE1\u606F : "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token constant"},"JSON"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"stringify"),n("span",{class:"token punctuation"},"("),a("errors"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"},"</p></div>"),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},","),a(`
shade`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},","),a(`
isHtmlFragment`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},","),a(`
btn `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"{"),a(" text"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'\u786E\u8BA4'"),n("span",{class:"token punctuation"},","),a(),n("span",{class:"token function"},"callback"),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},"index"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(" layer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"close"),n("span",{class:"token punctuation"},"("),a("index"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),a(`
area `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'500px'"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token comment"},"// \u6E05\u9664\u6821\u9A8C"),a(`
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"clearValidate"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
layFormRef`),n("span",{class:"token punctuation"},"."),a("value"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"clearValidate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token comment"},"// \u91CD\u7F6E\u8868\u5355"),a(`
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"reset"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
layFormRef`),n("span",{class:"token punctuation"},"."),a("value"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"reset"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
validateModel`),n("span",{class:"token punctuation"},"."),a("specialty "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token string"},'"1"'),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
validateModel`),n("span",{class:"token punctuation"},","),a(`
layFormRef`),n("span",{class:"token punctuation"},","),a(`
validate`),n("span",{class:"token punctuation"},","),a(`
clearValidate`),n("span",{class:"token punctuation"},","),a(`
reset
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
`)])],-1),X=a(">"),Y=a("\u5199\u4F5C"),Z=a("\u753B\u753B"),nn=a("\u7F16\u7801"),an=a("\u63D0\u4EA4"),tn=a("\u6E05\u9664\u6821\u9A8C"),sn=a("\u91CD\u7F6E\u8868\u5355"),on=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form")]),a(),n("span",{class:"token attr-name"},":model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo1"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"ref"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("layFormRef1"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},":rules"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("rules"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"required"),a(),n("span",{class:"token attr-name"},"initValidate"),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u90AE\u7BB1"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("email"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo1.email"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("url\u8DEF\u5F84"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("url"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo1.url"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u65E5\u671F"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("date"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo1.date"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u7528\u6237\u540D"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("username"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo1.username"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u5E74\u9F84"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("age"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo1.age"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("validate1"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u63D0\u4EA4"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" ref"),n("span",{class:"token punctuation"},","),a(" reactive "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'vue'"),a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a("layer"),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'@layui/layer-vue'"),a(`
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"const"),a(" ruleDemo1 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"reactive"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),a(`
email`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},","),a(`
url`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},","),a(`
date`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},","),a(`
username`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},","),a(`
age`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token keyword"},"null"),n("span",{class:"token punctuation"},","),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),a(`
`),n("span",{class:"token keyword"},"const"),a(" rules "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),a(`
email `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"{"),a(`
type `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'email'"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),a(`
url `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"{"),a(`
type `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'url'"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),a(`
date `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"{"),a(`
type `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'date'"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),a(`
username `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"{"),a(`
type `),n("span",{class:"token operator"},":"),a(" "),n("span",{class:"token string"},"'string'"),n("span",{class:"token punctuation"},","),a(`
min `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},","),a(`
max `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"16"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),a(`
age `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"validator"),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},[a("rule"),n("span",{class:"token punctuation"},","),a(" value"),n("span",{class:"token punctuation"},","),a(" callback"),n("span",{class:"token punctuation"},","),a(" source"),n("span",{class:"token punctuation"},","),a(" options")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"if"),a(),n("span",{class:"token punctuation"},"("),a("value "),n("span",{class:"token operator"},"<"),a(),n("span",{class:"token number"},"18"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"callback"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"new"),a(),n("span",{class:"token class-name"},"Error"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),a("rule"),n("span",{class:"token punctuation"},"."),a("field"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"},"\u592A\u8FC7\u4E8E\u5E74\u8F7B"),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"else"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),a(`
`),n("span",{class:"token keyword"},"const"),a(" layFormRef1 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"null"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token comment"},"// \u6821\u9A8C"),a(`
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"validate1"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
layFormRef1`),n("span",{class:"token punctuation"},"."),a("value"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"validate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},[a("isValidate"),n("span",{class:"token punctuation"},","),a(" model"),n("span",{class:"token punctuation"},","),a(" errors")]),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token operator"},"=>"),a(),n("span",{class:"token punctuation"},"{"),a(`
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"open"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),a(`
type`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"1"),n("span",{class:"token punctuation"},","),a(`
title`),n("span",{class:"token operator"},":"),n("span",{class:"token string"},'"\u8868\u5355\u63D0\u4EA4\u7ED3\u679C"'),n("span",{class:"token punctuation"},","),a(`
content`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},'<div style="padding: 10px"><p>\u662F\u5426\u901A\u8FC7 : '),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),a("isValidate"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"},"</p> <p>\u8868\u5355\u6570\u636E : "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token constant"},"JSON"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"stringify"),n("span",{class:"token punctuation"},"("),a("model"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," </p> <p>\u9519\u8BEF\u4FE1\u606F : "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token constant"},"JSON"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"stringify"),n("span",{class:"token punctuation"},"("),a("errors"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"},"</p></div>"),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},","),a(`
shade`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},","),a(`
isHtmlFragment`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},","),a(`
btn `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"{"),a(" text"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'\u786E\u8BA4'"),n("span",{class:"token punctuation"},","),a(),n("span",{class:"token function"},"callback"),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},"index"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(" layer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"close"),n("span",{class:"token punctuation"},"("),a("index"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),a(`
area `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'500px'"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
ruleDemo1`),n("span",{class:"token punctuation"},","),a(`
layFormRef1`),n("span",{class:"token punctuation"},","),a(`
validate1`),n("span",{class:"token punctuation"},","),a(`
rules
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
`)])],-1),en=a("\u63D0\u4EA4"),ln=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form")]),a(),n("span",{class:"token attr-name"},":model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo2"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"ref"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("layFormRef2"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"required"),a(),n("span",{class:"token attr-name"},"initValidate"),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u90AE\u7BB1"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("email"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},":rules"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("{type : "),n("span",{class:"token punctuation"},"'"),a("email"),n("span",{class:"token punctuation"},"'"),a("}"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo2.email"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("url\u8DEF\u5F84"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("url"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},":rules"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("{type : "),n("span",{class:"token punctuation"},"'"),a("url"),n("span",{class:"token punctuation"},"'"),a("}"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo2.url"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u65E5\u671F"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("date"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},":rules"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("{type : "),n("span",{class:"token punctuation"},"'"),a("date"),n("span",{class:"token punctuation"},"'"),a("}"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo2.date"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u7528\u6237\u540D"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("username"),n("span",{class:"token punctuation"},'"')]),a(`
`),n("span",{class:"token attr-name"},":rules"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a(`{
type : `),n("span",{class:"token punctuation"},"'"),a("string"),n("span",{class:"token punctuation"},"'"),a(`,
min : 8,
max : 16
}`),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo2.username"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u5E74\u9F84"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("age"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},":rules"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ageRules"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo2.age"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u81EA\u5B9A\u4E49\u63D0\u793A"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("myEmail"),n("span",{class:"token punctuation"},'"')]),a(`
`),n("span",{class:"token attr-name"},":rules"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a(`{
type : `),n("span",{class:"token punctuation"},"'"),a("email"),n("span",{class:"token punctuation"},"'"),a(`,
message : `),n("span",{class:"token punctuation"},"'"),a("\u5FC5\u987B\u4E3A\u90AE\u7BB1"),n("span",{class:"token punctuation"},"'"),a(`
}`),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("ruleDemo2.myEmail"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("validate2"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u63D0\u4EA4"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" ref"),n("span",{class:"token punctuation"},","),a(" reactive "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'vue'"),a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a("layer"),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'@layui/layer-vue'"),a(`
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"const"),a(" ruleDemo2 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"reactive"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),a(`
email`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},","),a(`
url`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},","),a(`
date`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},","),a(`
username`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},","),a(`
age`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token keyword"},"null"),n("span",{class:"token punctuation"},","),a(`
myEmail`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},","),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token keyword"},"const"),a(" ageRules "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"validator"),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},[a("rule"),n("span",{class:"token punctuation"},","),a(" value"),n("span",{class:"token punctuation"},","),a(" callback"),n("span",{class:"token punctuation"},","),a(" source"),n("span",{class:"token punctuation"},","),a(" options")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"if"),a(),n("span",{class:"token punctuation"},"("),a("value "),n("span",{class:"token operator"},"<"),a(),n("span",{class:"token number"},"18"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"callback"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"new"),a(),n("span",{class:"token class-name"},"Error"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),a("rule"),n("span",{class:"token punctuation"},"."),a("field"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"},"\u592A\u8FC7\u4E8E\u5E74\u8F7B"),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token keyword"},"const"),a(" layFormRef2 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"null"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token comment"},"// \u6821\u9A8C"),a(`
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"validate2"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
layFormRef2`),n("span",{class:"token punctuation"},"."),a("value"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"validate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},[a("isValidate"),n("span",{class:"token punctuation"},","),a(" model"),n("span",{class:"token punctuation"},","),a(" errors")]),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token operator"},"=>"),a(),n("span",{class:"token punctuation"},"{"),a(`
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"open"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),a(`
type`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"1"),n("span",{class:"token punctuation"},","),a(`
title`),n("span",{class:"token operator"},":"),n("span",{class:"token string"},'"\u8868\u5355\u63D0\u4EA4\u7ED3\u679C"'),n("span",{class:"token punctuation"},","),a(`
content`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},'<div style="padding: 10px"><p>\u662F\u5426\u901A\u8FC7 : '),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),a("isValidate"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"},"</p> <p>\u8868\u5355\u6570\u636E : "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token constant"},"JSON"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"stringify"),n("span",{class:"token punctuation"},"("),a("model"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," </p> <p>\u9519\u8BEF\u4FE1\u606F : "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token constant"},"JSON"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"stringify"),n("span",{class:"token punctuation"},"("),a("errors"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"},"</p></div>"),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},","),a(`
shade`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},","),a(`
isHtmlFragment`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},","),a(`
btn `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"{"),a(" text"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'\u786E\u8BA4'"),n("span",{class:"token punctuation"},","),a(),n("span",{class:"token function"},"callback"),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},"index"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(" layer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"close"),n("span",{class:"token punctuation"},"("),a("index"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),a(`
area `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'500px'"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
ruleDemo2`),n("span",{class:"token punctuation"},","),a(`
layFormRef2`),n("span",{class:"token punctuation"},","),a(`
validate2`),n("span",{class:"token punctuation"},","),a(`
ageRules
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
`)])],-1),pn=a("\u63D0\u4EA4"),cn=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form")]),a(),n("span",{class:"token attr-name"},"@submit"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("submit"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},":model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("submitModel"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"requiredIcons"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("layui-icon-heart-fill"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},":use-CN"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("false"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"required"),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u8D26\u6237"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("username"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),a(),n("span",{class:"token attr-name"},"#label"),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("i")]),a(),n("span",{class:"token attr-name"},"class"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("layui-icon layui-icon-username"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("i")]),n("span",{class:"token punctuation"},">")]),a(`
\u8D26\u6237
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("submitModel.username"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),a(),n("span",{class:"token attr-name"},"label"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u5BC6\u7801"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"prop"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("password"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-input")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("submitModel.password"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-input")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"native-type"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("submit"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u63D0\u4EA4"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form-item")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-form")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" ref"),n("span",{class:"token punctuation"},","),a(" reactive "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'vue'"),a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a("layer"),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'@layui/layer-vue'"),a(`
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"const"),a(" submitModel "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"reactive"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),a(`
username`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},","),a(`
password`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},'""'),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),a(`
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"submit"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},[a("isValidate"),n("span",{class:"token punctuation"},","),a(" model"),n("span",{class:"token punctuation"},","),a(" errors")]),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"open"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),a(`
type`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"1"),n("span",{class:"token punctuation"},","),a(`
title`),n("span",{class:"token operator"},":"),n("span",{class:"token string"},'"\u8868\u5355\u63D0\u4EA4\u7ED3\u679C"'),n("span",{class:"token punctuation"},","),a(`
content`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},'<div style="padding: 10px"><p>\u662F\u5426\u901A\u8FC7 : '),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),a("isValidate"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"},"</p> <p>\u8868\u5355\u6570\u636E : "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token constant"},"JSON"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"stringify"),n("span",{class:"token punctuation"},"("),a("model"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," </p> <p>\u9519\u8BEF\u4FE1\u606F : </br>"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token constant"},"JSON"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"stringify"),n("span",{class:"token punctuation"},"("),a("errors"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"},"</p></div>"),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},","),a(`
shade`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},","),a(`
isHtmlFragment`),n("span",{class:"token operator"},":"),a(),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},","),a(`
btn `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"{"),a(" text"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'\u786E\u8BA4'"),n("span",{class:"token punctuation"},","),a(),n("span",{class:"token function"},"callback"),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},"index"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(" layer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"close"),n("span",{class:"token punctuation"},"("),a("index"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),a(`
area `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token string"},"'500px'"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
submitModel
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
`)])],-1),un=n("i",{class:"layui-icon layui-icon-username"},null,-1),kn=a(" \u8D26\u6237 "),rn=a("\u63D0\u4EA4"),dn=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u5C5E\u6027"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u7C7B\u578B"),n("th",null,"\u53EF\u9009\u503C"),n("th",null,"\u9ED8\u8BA4\u503C")])]),n("tbody",null,[n("tr",null,[n("td",null,"v-model"),n("td",null,"\u8868\u5355\u7ED1\u5B9A\u503C"),n("td",null,[n("code",null,"object")]),n("td",null,"-"),n("td",null,"{}")]),n("tr",null,[n("td",null,"required"),n("td",null,"\u662F\u5426\u5FC5\u586B"),n("td",null,[n("code",null,"boolean")]),n("td",null,[n("code",null,"true"),a(),n("code",null,"false")]),n("td",null,[n("code",null,"false")])]),n("tr",null,[n("td",null,"rules"),n("td",null,[a("\u8868\u5355\u6821\u9A8C\u89C4\u5219; "),n("br"),a("\u53EF\u67E5\u770B"),n("a",{href:"https://github.com/yiminghe/async-validator"},"async-validator")]),n("td",null,[n("code",null,"object")]),n("td",null,"-"),n("td",null,"-")]),n("tr",null,[n("td",null,"initValidate"),n("td",null,"\u662F\u5426\u4E00\u5F00\u59CB\u5C31\u6821\u9A8C\u8868\u5355"),n("td",null,[n("code",null,"boolean")]),n("td",null,[n("code",null,"true"),a(),n("code",null,"false")]),n("td",null,[n("code",null,"false")])]),n("tr",null,[n("td",null,"useCN"),n("td",null,"\u662F\u5426\u4F7F\u7528\u4E2D\u6587\u9519\u8BEF\u63D0\u793A"),n("td",null,[n("code",null,"boolean")]),n("td",null,[n("code",null,"true"),a(),n("code",null,"false")]),n("td",null,[n("code",null,"false")])]),n("tr",null,[n("td",null,"requiredIcons"),n("td",null,[a("\u5FC5\u586B\u524D\u7F00\u56FE\u6807"),n("code",null,"class")]),n("td",null,[n("code",null,"string")]),n("td",null,"-"),n("td",null,[n("code",null,"*")])]),n("tr",null,[n("td",null,"required-erroer-message"),n("td",null,"\u5FC5\u586B\u9519\u8BEF\u63D0\u793A\u4FE1\u606F"),n("td",null,[n("code",null,"string")]),n("td",null,"-"),n("td",null,[n("code",null,"%s\u4E0D\u80FD\u4E3A\u7A7A")])]),n("tr",null,[n("td",null,"validate-message"),n("td",null,[a("\u81EA\u5B9A\u4E49\u6821\u9A8C\u9519\u8BEF\u63D0\u793A\u4FE1\u606F; "),n("br"),a("\u7531\u4E8E\u5185\u7F6E\u4E86\u4E2D\u6587\u9519\u8BEF\u63D0\u793A\uFF0C\u53EF\u6309\u9700\u6C42\u589E\u91CF\u589E\u52A0"),n("br"),a("\u53EF\u67E5\u770B "),n("a",{href:"https://github.com/yiminghe/async-validator/blob/master/src/messages.ts"},"async-validator \u5185\u7F6E\u9519\u8BEF\u63D0\u793A"),n("br"),a("\u4E5F\u53EF\u53C2\u8003 "),n("a",{href:"https://gitee.com/layui-vue/layui-vue/tree/develop/src/module/formItem/cnValidateMessage.ts"},"layui-vue \u5185\u7F6E\u4E2D\u6587\u9519\u8BEF\u63D0\u793A")]),n("td",null,[n("code",null,"string")]),n("td",null,"-"),n("td",null,[n("code",null,"%s\u4E0D\u80FD\u4E3A\u7A7A")])])])],-1),mn=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u5C5E\u6027"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u56DE\u8C03\u53C2\u6570")])]),n("tbody",null,[n("tr",null,[n("td",null,"submit"),n("td",null,[a("\u63D0\u4EA4\u4E8B\u4EF6"),n("code",null,"(\u4E0D\u63A8\u8350\u4F7F\u7528)")]),n("td",null,[a("("),n("code",null,"isValidate"),a(", "),n("code",null,"model"),a(", "),n("code",null,"errors"),a(")"),n("br"),n("br"),a(),n("code",null,"isValidate"),a(": ("),n("code",null,"boolean"),a(")\u662F\u5426\u6821\u9A8C\u901A\u8FC7"),n("br"),n("br"),a(),n("code",null,"model"),a(": ("),n("code",null,"object"),a(")\u8868\u5355\u7ED1\u5B9A\u7684\u503C"),n("br"),n("br"),a(),n("code",null,"errors"),a(": ("),n("code",null,"Array"),a(")\u6821\u9A8C\u7ED3\u679C\u7684\u9519\u8BEF\u4FE1\u606F")])])])],-1),gn=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u5C5E\u6027"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u5165\u53C2")])]),n("tbody",null,[n("tr",null,[n("td",null,"validate"),n("td",null,[a("\u8868\u5355\u6821\u9A8C; "),n("br"),a("\u5982\u679C\u6CA1\u6709"),n("code",null,"callback"),a("\u56DE\u8C03\uFF0C\u4F1A\u8FD4\u56DE"),n("code",null,"Promise"),a(", "),n("br"),a(),n("code",null,"Promise"),a("\u53C2\u6570\u4E3A{"),n("code",null,"isValidate"),a(", "),n("code",null,"model"),a(", "),n("code",null,"errors"),a("}"),n("br"),a(" \u53C2\u6570\u5177\u4F53\u63CF\u8FF0\u8BF7\u770B\u4E0A\u9762\u8868\u5355"),n("code",null,"submit"),a("\u63D0\u4EA4\u4E8B\u4EF6")]),n("td",null,[a("("),n("code",null,"fields"),a(),n("code",null,"[\u53EF\u9009]"),a(", "),n("code",null,"callback"),a(),n("code",null,"[\u53EF\u9009]"),a(")"),n("br"),n("br"),a(),n("code",null,"fields"),a(": ("),n("code",null,"string"),a(" / "),n("code",null,"string[]"),a(" / "),n("code",null,"function"),a(")"),n("br"),a("\u5355\u72EC\u6821\u9A8C\u7684\u5B57\u6BB5\uFF0C"),n("br"),a("\u8BE5\u5B57\u6BB5\u5982\u679C\u4E3A"),n("code",null,"function"),a(", "),n("br"),a("\u5219\u8BA4\u4E3A"),n("code",null,"callback"),a("\u5165\u53C2\uFF0C\u6821\u9A8C\u5168\u90E8\u5B57\u6BB5;"),n("br"),n("br"),a(),n("code",null,"callback"),a(": ("),n("code",null,"function"),a(")\u6821\u9A8C\u4E4B\u540E\u7684\u56DE\u8C03\uFF0C"),n("br"),a("\u56DE\u8C03\u53C2\u6570\u4E3A("),n("code",null,"isValidate"),a(", "),n("code",null,"model"),a(", "),n("code",null,"errors"),a(")\uFF1B"),n("br"),a("\u53C2\u6570\u5177\u4F53\u63CF\u8FF0\u8BF7\u770B\u4E0A\u9762\u8868\u5355"),n("code",null,"submit"),a("\u63D0\u4EA4\u4E8B\u4EF6")])]),n("tr",null,[n("td",null,"clearValidate"),n("td",null,"\u6E05\u9664\u8868\u5355\u6821\u9A8C"),n("td",null,[a("("),n("code",null,"fields"),a("[\u53EF\u9009])"),n("br"),n("br"),a(),n("code",null,"fields"),a(": ("),n("code",null,"string"),a(" / "),n("code",null,"string[]"),a(")"),n("br"),a("\u9700\u8981\u8FDB\u884C\u6E05\u9664\u6821\u9A8C\u7684\u8868\u5355\u5B57\u6BB5, \u5982\u679C\u8BE5\u5B57\u6BB5\u4E3A\u7A7A\u5219\u6E05\u9664\u5168\u90E8\u6821\u9A8C")])]),n("tr",null,[n("td",null,"reset"),n("td",null,"\u91CD\u7F6E\u8868\u5355\u6240\u6709\u503C"),n("td",null,"-")])])],-1),yn=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u5C5E\u6027"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u7C7B\u578B"),n("th",null,"\u53EF\u9009\u503C"),n("th",null,"\u9ED8\u8BA4\u503C")])]),n("tbody",null,[n("tr",null,[n("td",null,"prop"),n("td",null,[a("\u5728\u8868\u5355\u7ED1\u5B9A\u503C("),n("code",null,"model"),a(")\u4E2D\u5B57\u6BB5"),n("code",null,"key")]),n("td",null,[n("code",null,"string")]),n("td",null,"-"),n("td",null,"-")]),n("tr",null,[n("td",null,"label"),n("td",null,[a("\u5B50\u9879\u524D\u8FB9\u63CF\u8FF0\u503C\uFF0C"),n("strong",null,"\u5C3D\u91CF\u586B\u5199"),a("\uFF0C\u4E2D\u6587\u6821\u9A8C\u9519\u8BEF\u9700\u8981\u7528\u5230")]),n("td",null,[n("code",null,"string")]),n("td",null,"-"),n("td",null,"-")]),n("tr",null,[n("td",null,"required"),n("td",null,"\u662F\u5426\u5FC5\u586B"),n("td",null,[n("code",null,"boolean")]),n("td",null,[n("code",null,"true"),a(),n("code",null,"false")]),n("td",null,[n("code",null,"false")])]),n("tr",null,[n("td",null,"rules"),n("td",null,[a("\u8868\u5355\u6821\u9A8C\u89C4\u5219; "),n("br"),a("\u53EF\u67E5\u770B"),n("a",{href:"https://github.com/yiminghe/async-validator"},"async-validator")]),n("td",null,[n("code",null,"object")]),n("td",null,"-"),n("td",null,"-")]),n("tr",null,[n("td",null,"error-message"),n("td",null,"\u8868\u5355\u6821\u9A8C\u5931\u8D25\u56FA\u5B9A\u63D0\u793A\u8BED"),n("td",null,[n("code",null,"string")]),n("td",null,[n("code",null,"block"),a(),n("code",null,"inline")]),n("td",null,[n("code",null,"block")])]),n("tr",null,[n("td",null,"mode"),n("td",null,[a("\u8868\u5355\u9879\u663E\u793A\u7684\u6A21\u5F0F\uFF0C"),n("code",null,"\u5757\u5143\u7D20"),a(" / "),n("code",null,"\u884C\u5143\u7D20")]),n("td",null,[n("code",null,"string")]),n("td",null,[n("code",null,"block"),a(),n("code",null,"inline")]),n("td",null,[n("code",null,"block")])])])],-1),fn=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u5C5E\u6027"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u5165\u53C2")])]),n("tbody",null,[n("tr",null,[n("td",null,"validate"),n("td",null,"\u8868\u5355\u6821\u9A8C;"),n("td",null,[a("("),n("code",null,"callback"),a(),n("code",null,"[\u53EF\u9009]"),a(")"),n("br"),n("br"),a(),n("code",null,"callback"),a(": ("),n("code",null,"function"),a(")\u6821\u9A8C\u4E4B\u540E\u7684\u56DE\u8C03\uFF0C"),n("br"),a("\u56DE\u8C03\u53C2\u6570\u4E3A("),n("code",null,"errors"),a(", "),n("code",null,"fields"),a(")\uFF1B"),n("br"),n("br"),a(),n("code",null,"errors"),a(": ("),n("code",null,"Array"),a(")\u6821\u9A8C\u7ED3\u679C\u7684\u9519\u8BEF\u4FE1\u606F\uFF1B"),n("br"),n("br"),a(),n("code",null,"fields"),a(": ("),n("code",null,"Array"),a(")\u5F53\u524D\u6821\u9A8C\u7684\u5B57\u6BB5\u4FE1\u606F")])]),n("tr",null,[n("td",null,"clearValidate"),n("td",null,"\u6E05\u9664\u8868\u5355\u6821\u9A8C"),n("td",null,"-")])])],-1),vn=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u5C5E\u6027"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u53EF\u4F7F\u7528\u53C2\u6570")])]),n("tbody",null,[n("tr",null,[n("td",null,"-"),n("td",null,"\u9ED8\u8BA4\u63D2\u69FD"),n("td",null,[a("\u4F20\u9012\u8FDB\u6765\u7684"),n("code",null,"props"),a("\u548C\u8868\u5355\u7ED1\u5B9A\u7684\u503C("),n("code",null,"model"),a(")")])]),n("tr",null,[n("td",null,"label"),n("td",null,[a("\u5B50\u9879\u524D\u8FB9\u63CF\u8FF0\u63D2\u69FD"),n("br"),a("\u5982\u679C\u4F7F\u7528\u6B64\u63D2\u69FD\uFF0C"),n("code",null,"props"),n("strong",null,"\u5C3D\u91CF"),a("\u4E5F\u4F20\u9012"),n("code",null,"label"),a("\u53C2\u6570")]),n("td",null,[a("\u4F20\u9012\u8FDB\u6765\u7684"),n("code",null,"props"),a("\u548C\u8868\u5355\u7ED1\u5B9A\u7684\u503C("),n("code",null,"model"),a(")")])]),n("tr",null,[n("td",null,"required"),n("td",null,"\u5FC5\u586B\u524D\u7F00\u63D2\u69FD"),n("td",null,[n("code",null,"*"),a(" / "),n("code",null,"\u8868\u5355props"),a(" \u4E2D\u7684 "),n("code",null,"requiredIcons")])])])],-1),bn=n("p",null,[a("\u67E5\u770B\uFF1A "),n("a",{href:"https://github.com/yiminghe/async-validator"},"https://github.com/yiminghe/async-validator"),n("br"),a(" \u4E2D\u6587\u7FFB\u8BD1\uFF1A "),n("a",{href:"https://www.cnblogs.com/wozho/p/10955525.html"},"https://www.cnblogs.com/wozho/p/10955525.html")],-1),qn=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u5C5E\u6027"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u4F7F\u7528\u65B9\u5F0F")])]),n("tbody",null,[n("tr",null,[n("td",null,"number"),n("td",null,"\u6570\u5B57"),n("td",null,[n("code",null,"{type : 'number'}")])]),n("tr",null,[n("td",null,"boolean"),n("td",null,"\u5E03\u5C14\u7C7B\u578B"),n("td",null,[n("code",null,"{type : 'boolean'}")])]),n("tr",null,[n("td",null,"method"),n("td",null,"\u65B9\u6CD5"),n("td",null,[n("code",null,"{type : 'method'}")])]),n("tr",null,[n("td",null,"regexp"),n("td",null,"\u6B63\u5219\u8868\u8FBE\u5F0F"),n("td",null,[n("code",null,"{type : 'regexp'}")])]),n("tr",null,[n("td",null,"integer"),n("td",null,"\u6574\u578B\u6570\u5B57"),n("td",null,[n("code",null,"{type : 'integer'}")])]),n("tr",null,[n("td",null,"float"),n("td",null,"\u6D6E\u70B9\u5C0F\u6570"),n("td",null,[n("code",null,"{type : 'float'}")])]),n("tr",null,[n("td",null,"array"),n("td",null,"\u6570\u7EC4"),n("td",null,[n("code",null,"{type : 'array'}")])]),n("tr",null,[n("td",null,"object"),n("td",null,"\u5BF9\u8C61"),n("td",null,[n("code",null,"{type : 'object'}")])]),n("tr",null,[n("td",null,"enum"),n("td",null,"\u679A\u4E3E"),n("td",null,[n("code",null,"{type : 'enum'}")])]),n("tr",null,[n("td",null,"date"),n("td",null,"\u65E5\u671F"),n("td",null,[n("code",null,"{type : 'date'}")])]),n("tr",null,[n("td",null,"url"),n("td",null,"url"),n("td",null,[n("code",null,"{type : 'url'}")])]),n("tr",null,[n("td",null,"hex"),n("td",null,"\u5341\u516D\u8FDB\u5236"),n("td",null,[n("code",null,"{type : 'hex'}")])]),n("tr",null,[n("td",null,"email"),n("td",null,"\u90AE\u7BB1"),n("td",null,[n("code",null,"{type : 'email'}")])])])],-1),_n=n("div",{class:"language-javascript"},[n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function-variable function"},"validator"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},[a("rule"),n("span",{class:"token punctuation"},","),a(" value")]),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token operator"},"=>"),a(" value "),n("span",{class:"token operator"},"==="),a(),n("span",{class:"token string"},"'root'"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`)])])],-1),wn=n("div",{class:"language-javascript"},[n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function-variable function"},"asyncValidator"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},[a("rule"),n("span",{class:"token punctuation"},","),a(" value")]),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token operator"},"=>"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token keyword"},"new"),a(),n("span",{class:"token class-name"},"Promise"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},[a("resolve"),n("span",{class:"token punctuation"},","),a(" reject")]),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token operator"},"=>"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"if"),a(),n("span",{class:"token punctuation"},"("),a("value "),n("span",{class:"token operator"},"<"),a(),n("span",{class:"token number"},"18"),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"reject"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'too young'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(" "),n("span",{class:"token comment"},"// reject with error message"),a(`
`),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"else"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"resolve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`)])])],-1),xn=n("div",{class:"language-javascript"},[n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token punctuation"},"{"),a(`
key `),n("span",{class:"token operator"},":"),a(" rule "),n("span",{class:"token comment"},"// key\u4E3A\u8868\u5355\u5B50\u9879\u9700\u8981\u6821\u9A8C\u7684\u5BF9\u5E94key\u540D\u79F0\uFF0C rule\u4E3A\u6821\u9A8C\u89C4\u5219\uFF0C\u683C\u5F0F\u4E3A{}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token comment"},"// \u4F8B\u5982 \u8868\u5355\u7ED1\u5B9A\u503C\u4E3A {email : 'xxx', username: 'xxxxx'}"),a(`
`),n("span",{class:"token comment"},"// \u9700\u8981\u6821\u9A8C\u90AE\u7BB1,\u800C\u90AE\u7BB1\u8F93\u5165\u6846\u5728\u8868\u5355\u7ED1\u5B9A\u7684\u503C\u4E2Dkey\u4E3Aemail\uFF0C"),a(`
`),n("span",{class:"token comment"},"// \u9700\u8981\u6821\u9A8C\u7528\u6237\u540D\u957F\u5EA6\u4E3A8\u523016\u4E4B\u95F4,\u800C\u7528\u6237\u540D\u8F93\u5165\u6846\u5728\u8868\u5355\u7ED1\u5B9A\u7684\u503C\u4E2Dkey\u4E3Ausername\uFF0C"),a(`
`),n("span",{class:"token punctuation"},"{"),a(`
email `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"{"),a(`
type `),n("span",{class:"token operator"},":"),a(" "),n("span",{class:"token string"},"'email'"),a(`
`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),a(`
username `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token punctuation"},"{"),a(`
type `),n("span",{class:"token operator"},":"),a(" "),n("span",{class:"token string"},"'string'"),n("span",{class:"token punctuation"},","),a(`
min `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},","),a(`
max `),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"16"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`)])])],-1),Vn=n("div",{class:"language-javascript"},[n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token comment"},"// \u4F8B\u5982 \u8868\u5355\u7ED1\u5B9A\u503C\u4E3A {email : 'xxx', phone: 'xxxxx'}"),a(`
`),n("span",{class:"token comment"},"// \u9700\u8981\u6821\u9A8C\u90AE\u7BB1,\u800C\u90AE\u7BB1\u8F93\u5165\u6846\u5728\u8868\u5355\u7ED1\u5B9A\u7684\u503C\u4E2Dkey\u4E3Aemail"),a(`
`),n("span",{class:"token punctuation"},"{"),a(`
type `),n("span",{class:"token operator"},":"),a(" "),n("span",{class:"token string"},"'email'"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`)])])],-1),Un={setup(hn,{expose:C}){C({frontmatter:{}});let k=V({username:"admin",password:"123456",specialty:"1"}),S=function(){y.open({type:1,title:"\u8868\u5355\u7ED3\u679C",content:`<div style="padding: 10px">${JSON.stringify(k)}</div>`,shade:!1,isHtmlFragment:!0,btn:[{text:"\u786E\u8BA4",callback(r){y.close(r)}}],area:"500px"})},i=V({username:"",password:"",specialty:"1"}),h=$(null),j=function(){h.value.validate((r,e,c)=>{y.open({type:1,title:"\u8868\u5355\u63D0\u4EA4\u7ED3\u679C",content:`<div style="padding: 10px"><p>\u662F\u5426\u901A\u8FC7 : ${r}</p> <p>\u8868\u5355\u6570\u636E : ${JSON.stringify(e)} </p> <p>\u9519\u8BEF\u4FE1\u606F : ${JSON.stringify(c)}</p></div>`,shade:!1,isHtmlFragment:!0,btn:[{text:"\u786E\u8BA4",callback(u){y.close(u)}}],area:"500px"})})},D=function(){h.value.clearValidate()},J=function(){h.value.reset(),i.specialty="1"},g=V({email:"",url:"",date:"",username:"",age:null}),M=$({email:{type:"email"},url:{type:"url"},date:{type:"date"},username:{type:"string",min:8,max:16},age:{validator(r,e,c,u,p){if(e<18)c(new Error(`${r.field}\u592A\u8FC7\u4E8E\u5E74\u8F7B`));else return!0}}}),F=$(null),O=function(){F.value.validate((r,e,c)=>{y.open({type:1,title:"\u8868\u5355\u63D0\u4EA4\u7ED3\u679C",content:`<div style="padding: 10px"><p>\u662F\u5426\u901A\u8FC7 : ${r}</p> <p>\u8868\u5355\u6570\u636E : ${JSON.stringify(e)} </p> <p>\u9519\u8BEF\u4FE1\u606F : ${JSON.stringify(c)}</p></div>`,shade:!1,isHtmlFragment:!0,btn:[{text:"\u786E\u8BA4",callback(u){y.close(u)}}],area:"500px"})})},d=V({email:"",url:"",date:"",username:"",age:null,myEmail:""}),E={validator(r,e,c,u,p){return e<18?(c(new Error(`${r.field}\u592A\u8FC7\u4E8E\u5E74\u8F7B`)),!1):!0}},U=$(null),H=function(){U.value.validate((r,e,c)=>{y.open({type:1,title:"\u8868\u5355\u63D0\u4EA4\u7ED3\u679C",content:`<div style="padding: 10px"><p>\u662F\u5426\u901A\u8FC7 : ${r}</p> <p>\u8868\u5355\u6570\u636E : ${JSON.stringify(e)} </p> <p>\u9519\u8BEF\u4FE1\u606F : ${JSON.stringify(c)}</p></div>`,shade:!1,isHtmlFragment:!0,btn:[{text:"\u786E\u8BA4",callback(u){y.close(u)}}],area:"500px"})})},_=V({username:"",password:""}),I=function(r,e,c){y.open({type:1,title:"\u8868\u5355\u63D0\u4EA4\u7ED3\u679C",content:`<div style="padding: 10px"><p>\u662F\u5426\u901A\u8FC7 : ${r}</p> <p>\u8868\u5355\u6570\u636E : ${JSON.stringify(e)} </p> <p>\u9519\u8BEF\u4FE1\u606F : </br>${JSON.stringify(c)}</p></div>`,shade:!1,isHtmlFragment:!0,btn:[{text:"\u786E\u8BA4",callback(u){y.close(u)}}],area:"500px"})};return(r,e)=>{const c=m("lay-field"),u=m("lay-input"),p=m("lay-form-item"),b=m("lay-select-option"),N=m("lay-select"),q=m("lay-radio"),R=m("lay-textarea"),f=m("lay-button"),w=m("lay-form"),x=m("lay-code"),v=m("lay-table-box"),z=m("lay-comment");return A(),B("div",P,[t(c,{title:"\u57FA\u7840\u4F7F\u7528",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(x,null,{code:o(()=>[T]),default:o(()=>[t(w,{model:s(k)},{default:o(()=>[t(p,{label:"\u8D26\u6237",prop:"username"},{default:o(()=>[t(u,{modelValue:s(k).username,"onUpdate:modelValue":e[0]||(e[0]=l=>s(k).username=l)},null,8,["modelValue"])]),_:1}),t(p,{label:"\u5BC6\u7801",prop:"password"},{default:o(()=>[t(u,{modelValue:s(k).password,"onUpdate:modelValue":e[1]||(e[1]=l=>s(k).password=l),type:"password"},null,8,["modelValue"])]),_:1}),t(p,{label:"\u7231\u597D",prop:"hobby"},{default:o(()=>[t(N,{modelValue:s(k).hobby,"onUpdate:modelValue":e[2]||(e[2]=l=>s(k).hobby=l)},{default:o(()=>[t(b,{value:"1",label:"\u5B66\u4E60"}),t(b,{value:"2",label:"\u7F16\u7801"}),t(b,{value:"3",label:"\u8FD0\u52A8"})]),_:1},8,["modelValue"])]),_:1}),t(p,{label:"\u7279\u957F",prop:"specialty"},{default:o(()=>[t(q,{modelValue:s(k).specialty,"onUpdate:modelValue":e[3]||(e[3]=l=>s(k).specialty=l),name:"specialty",label:"1"},{default:o(()=>[G]),_:1},8,["modelValue"]),t(q,{modelValue:s(k).specialty,"onUpdate:modelValue":e[4]||(e[4]=l=>s(k).specialty=l),name:"specialty",label:"2"},{default:o(()=>[K]),_:1},8,["modelValue"]),t(q,{modelValue:s(k).specialty,"onUpdate:modelValue":e[5]||(e[5]=l=>s(k).specialty=l),name:"specialty",label:"3"},{default:o(()=>[L]),_:1},8,["modelValue"])]),_:1}),t(p,{label:"\u63CF\u8FF0",prop:"desc"},{default:o(()=>[t(R,{placeholder:"\u8BF7\u8F93\u5165\u63CF\u8FF0",modelValue:s(k).desc,"onUpdate:modelValue":e[6]||(e[6]=l=>s(k).desc=l)},null,8,["modelValue"])]),_:1}),t(p,null,{default:o(()=>[t(f,{onClick:s(S)},{default:o(()=>[Q]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),t(c,{title:"\u8868\u5355\u57FA\u672C\u6821\u9A8C\u529F\u80FD",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(x,null,{code:o(()=>[W]),default:o(()=>[t(w,{model:s(i),ref_key:"layFormRef",ref:h,required:""},{default:o(()=>[t(p,{label:"\u8D26\u6237",prop:"username"},{default:o(()=>[t(u,{modelValue:s(i).username,"onUpdate:modelValue":e[7]||(e[7]=l=>s(i).username=l)},null,8,["modelValue"])]),_:1}),t(p,{label:"\u5BC6\u7801",prop:"password"},{default:o(()=>[t(u,{modelValue:s(i).password,"onUpdate:modelValue":e[8]||(e[8]=l=>s(i).password=l),type:"password"},{default:o(()=>[X]),_:1},8,["modelValue"])]),_:1}),t(p,{label:"\u7231\u597D",prop:"hobby"},{default:o(()=>[t(N,{modelValue:s(i).hobby,"onUpdate:modelValue":e[9]||(e[9]=l=>s(i).hobby=l),multiple:""},{default:o(()=>[t(b,{value:"1",label:"\u5B66\u4E60"}),t(b,{value:"2",label:"\u7F16\u7801"}),t(b,{value:"3",label:"\u8FD0\u52A8"})]),_:1},8,["modelValue"])]),_:1}),t(p,{label:"\u7279\u957F",prop:"specialty"},{default:o(()=>[t(q,{modelValue:s(i).specialty,"onUpdate:modelValue":e[10]||(e[10]=l=>s(i).specialty=l),name:"specialty",label:"1"},{default:o(()=>[Y]),_:1},8,["modelValue"]),t(q,{modelValue:s(i).specialty,"onUpdate:modelValue":e[11]||(e[11]=l=>s(i).specialty=l),name:"specialty",label:"2"},{default:o(()=>[Z]),_:1},8,["modelValue"]),t(q,{modelValue:s(i).specialty,"onUpdate:modelValue":e[12]||(e[12]=l=>s(i).specialty=l),name:"specialty",label:"3"},{default:o(()=>[nn]),_:1},8,["modelValue"])]),_:1}),t(p,{label:"\u63CF\u8FF0",prop:"desc"},{default:o(()=>[t(R,{placeholder:"\u8BF7\u8F93\u5165\u63CF\u8FF0",modelValue:s(i).desc,"onUpdate:modelValue":e[13]||(e[13]=l=>s(i).desc=l)},null,8,["modelValue"])]),_:1}),t(p,null,{default:o(()=>[t(f,{onClick:s(j)},{default:o(()=>[an]),_:1},8,["onClick"]),t(f,{onClick:s(D)},{default:o(()=>[tn]),_:1},8,["onClick"]),t(f,{onClick:s(J)},{default:o(()=>[sn]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),t(c,{title:"\u6821\u9A8C\u89C4\u5219 - \u901A\u8FC7\u8868\u5355\u914D\u7F6E",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(x,null,{code:o(()=>[on]),default:o(()=>[t(w,{model:s(g),ref_key:"layFormRef1",ref:F,rules:s(M),required:"",initValidate:""},{default:o(()=>[t(p,{label:"\u90AE\u7BB1",prop:"email"},{default:o(()=>[t(u,{modelValue:s(g).email,"onUpdate:modelValue":e[14]||(e[14]=l=>s(g).email=l)},null,8,["modelValue"])]),_:1}),t(p,{label:"url\u8DEF\u5F84",prop:"url"},{default:o(()=>[t(u,{modelValue:s(g).url,"onUpdate:modelValue":e[15]||(e[15]=l=>s(g).url=l)},null,8,["modelValue"])]),_:1}),t(p,{label:"\u65E5\u671F",prop:"date"},{default:o(()=>[t(u,{modelValue:s(g).date,"onUpdate:modelValue":e[16]||(e[16]=l=>s(g).date=l)},null,8,["modelValue"])]),_:1}),t(p,{label:"\u7528\u6237\u540D",prop:"username"},{default:o(()=>[t(u,{modelValue:s(g).username,"onUpdate:modelValue":e[17]||(e[17]=l=>s(g).username=l)},null,8,["modelValue"])]),_:1}),t(p,{label:"\u5E74\u9F84",prop:"age"},{default:o(()=>[t(u,{modelValue:s(g).age,"onUpdate:modelValue":e[18]||(e[18]=l=>s(g).age=l)},null,8,["modelValue"])]),_:1}),t(p,null,{default:o(()=>[t(f,{onClick:s(O)},{default:o(()=>[en]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model","rules"])]),_:1}),t(c,{title:"\u6821\u9A8C\u89C4\u5219 - \u901A\u8FC7\u8868\u5355\u5B50\u9879\u914D\u7F6E",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(x,null,{code:o(()=>[ln]),default:o(()=>[t(w,{model:s(d),ref_key:"layFormRef2",ref:U,required:"",initValidate:""},{default:o(()=>[t(p,{label:"\u90AE\u7BB1",prop:"email",rules:{type:"email"}},{default:o(()=>[t(u,{modelValue:s(d).email,"onUpdate:modelValue":e[19]||(e[19]=l=>s(d).email=l)},null,8,["modelValue"])]),_:1}),t(p,{label:"url\u8DEF\u5F84",prop:"url",rules:{type:"url"}},{default:o(()=>[t(u,{modelValue:s(d).url,"onUpdate:modelValue":e[20]||(e[20]=l=>s(d).url=l)},null,8,["modelValue"])]),_:1}),t(p,{label:"\u65E5\u671F",prop:"date",rules:{type:"date"}},{default:o(()=>[t(u,{modelValue:s(d).date,"onUpdate:modelValue":e[21]||(e[21]=l=>s(d).date=l)},null,8,["modelValue"])]),_:1}),t(p,{label:"\u7528\u6237\u540D",prop:"username",rules:{type:"string",min:8,max:16}},{default:o(()=>[t(u,{modelValue:s(d).username,"onUpdate:modelValue":e[22]||(e[22]=l=>s(d).username=l)},null,8,["modelValue"])]),_:1}),t(p,{label:"\u5E74\u9F84",prop:"age",rules:s(E)},{default:o(()=>[t(u,{modelValue:s(d).age,"onUpdate:modelValue":e[23]||(e[23]=l=>s(d).age=l)},null,8,["modelValue"])]),_:1},8,["rules"]),t(p,{label:"\u81EA\u5B9A\u4E49\u63D0\u793A",prop:"myEmail",rules:{type:"email",message:"\u5FC5\u987B\u4E3A\u90AE\u7BB1"}},{default:o(()=>[t(u,{modelValue:s(d).myEmail,"onUpdate:modelValue":e[24]||(e[24]=l=>s(d).myEmail=l)},null,8,["modelValue"])]),_:1}),t(p,null,{default:o(()=>[t(f,{onClick:s(H)},{default:o(()=>[pn]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),t(c,{title:"\u539F\u751Fsubmit\u65B9\u5F0F\u6821\u9A8C -- \u6821\u9A8C\u901A\u8FC7\u5C06\u63D0\u4EA4\u8868\u5355 -- \u4E0D\u63A8\u8350\u4F7F\u7528",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(x,null,{code:o(()=>[cn]),default:o(()=>[t(w,{onSubmit:s(I),model:s(_),requiredIcons:"layui-icon-heart-fill","use-CN":!1,required:""},{default:o(()=>[t(p,{label:"\u8D26\u6237",prop:"username"},{label:o(()=>[un,kn]),default:o(()=>[t(u,{modelValue:s(_).username,"onUpdate:modelValue":e[25]||(e[25]=l=>s(_).username=l)},null,8,["modelValue"])]),_:1}),t(p,{label:"\u5BC6\u7801",prop:"password"},{default:o(()=>[t(u,{modelValue:s(_).password,"onUpdate:modelValue":e[26]||(e[26]=l=>s(_).password=l)},null,8,["modelValue"])]),_:1}),t(p,null,{default:o(()=>[t(f,{"native-type":"submit"},{default:o(()=>[rn]),_:1})]),_:1})]),_:1},8,["onSubmit","model"])]),_:1}),t(c,{title:"\u8868\u5355(form)\u5C5E\u6027",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(v,null,{default:o(()=>[dn]),_:1}),t(c,{title:"\u8868\u5355(form)\u4E8B\u4EF6",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(v,null,{default:o(()=>[mn]),_:1}),t(c,{title:"\u8868\u5355(form)\u65B9\u6CD5",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(v,null,{default:o(()=>[gn]),_:1}),t(c,{title:"\u8868\u5355\u9879(form-item)\u5C5E\u6027",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(v,null,{default:o(()=>[yn]),_:1}),t(c,{title:"\u8868\u5355\u9879(form-item)\u65B9\u6CD5",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(v,null,{default:o(()=>[fn]),_:1}),t(c,{title:"\u8868\u5355\u9879(form-item)\u63D2\u69FD",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(v,null,{default:o(()=>[vn]),_:1}),t(c,{title:"\u5173\u4E8E async-validator \u7684\u4F7F\u7528",style:{"margin-top":"20px","margin-bottom":"20px"}}),bn,t(c,{title:"async-validator \u57FA\u672C\u6821\u9A8C\u7C7B\u578B",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(v,null,{default:o(()=>[qn]),_:1}),t(c,{title:"async-validator \u4E2D validator\u53C2\u6570\u4F7F\u7528",style:{"margin-top":"20px","margin-bottom":"20px"}}),_n,t(c,{title:"async-validator \u4E2D asyncValidator\u53C2\u6570\u4F7F\u7528",style:{"margin-top":"20px","margin-bottom":"20px"}}),wn,t(c,{title:"form \u914D\u7F6E async-validator \u7684\u4F7F\u7528",style:{"margin-top":"20px","margin-bottom":"20px"}}),xn,t(c,{title:"form-item \u914D\u7F6E async-validator \u7684\u4F7F\u7528",style:{"margin-top":"20px","margin-bottom":"20px"}}),Vn,t(z)])}}};export{Un as default};