dev
Wayne 2 years ago
parent 57670bb7c7
commit 79bab840d7

@ -1,5 +1,4 @@
<script setup>
import { addContact } from '@/api/contact'
const formRef = ref(null)
@ -35,7 +34,9 @@ const submitForm = async (formEl) => {
await formEl.validate(async (valid, fields) => {
if (valid) {
let res = await addContact(form.value)
let res = await useRequest('/contact/addContact',"POST",form.value);
if (res.code === 200) {
form.value = {
company: '',
@ -63,10 +64,8 @@ const submitForm = async (formEl) => {
</div>
<div class="content">
<div>
<el-form ref="formRef" :model="form" :rules="rules"
label-width="150px" class="demo-ruleForm"
label-position="top"
status-icon>
<el-form ref="formRef" :model="form" :rules="rules" label-width="150px" class="demo-ruleForm"
label-position="top" status-icon>
<el-form-item :label="$t('Contact.company')" prop="company">
<el-input v-model="form.company" />
</el-form-item>

Loading…
Cancel
Save