1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <template>
- <a-form :model="createForm" :label-col="{span: 4}" labelAlign="right">
- <a-row gutter="20">
- <a-col span="12">
- <a-row>
- <a-col span="24">
- <a-form-item required label="邮箱" name="email">
- <a-input v-model:value="createForm.email" placeholder="请输入邮箱" />
- </a-form-item>
- </a-col>
- <a-col span="24">
- <a-form-item label="保存">
- <a-button type="primary" block @click="saveForm">保存</a-button>
- </a-form-item>
- </a-col>
- </a-row>
- </a-col>
- </a-row>
- </a-form>
- </template>
-
- <script setup lang="ts">
- import { ref, onMounted, computed } from 'vue';
- import { PostCompanyEmailEdit } from '@/apis/models';
- import { warnToast, successToast } from '@/utils/toastHelper';
- let createForm : companyListType.addrFormType = ref({
- email: ''
- })
- const saveForm = () => {
- PostCompanyEmailEdit(createForm.value).then(res => {
- successToast('修改成功')
- resetForm()
- })
- }
-
- const resetForm = () => {
- createForm.value = {
- email: ''
- }
- }
-
-
- </script>
-
- <style scoped lang="less">
-
- </style>
|