feat(src/utils/a2use.vue): 添加 SafeNFormItem 组件用于电话号码验证
Some checks failed
CI/CD Pipeline / playwright (push) Successful in 3m28s
CI/CD Pipeline / build-and-deploy (push) Failing after 3m17s

This commit is contained in:
严浩
2025-10-31 13:16:22 +08:00
parent 66419d22d4
commit 96728d87fd

View File

@@ -72,6 +72,14 @@ function handleValidateClick() {
<n-input v-model:value="formValue.phone" placeholder="电话号码" /> <n-input v-model:value="formValue.phone" placeholder="电话号码" />
</n-form-item> </n-form-item>
<SafeNFormItem
label="电话号码"
path="phone"
:rule="{ required: true, message: '请输入电话号码', trigger: ['blur'] }"
>
<!-- 如果没有提供插槽会默认渲染一个`<NInput>` -->
</SafeNFormItem>
<n-form-item> <n-form-item>
<n-button attr-type="button" @click="handleValidateClick"> 验证 </n-button> <n-button attr-type="button" @click="handleValidateClick"> 验证 </n-button>
</n-form-item> </n-form-item>