<template>
	<a-card title="修改密码">
		<a-form :model="createForm" layout="vertical">
			<a-row gutter="20">
				<a-col span="12">
					<a-row>
						<a-col span="24">
							<a-form-item  label="邮箱" name="email">
								<a-input v-model:value="createForm.email" placeholder="请输入邮箱" size="large"/>
							</a-form-item>
						</a-col>
						<a-col span="24">
							<a-form-item label="保存">
								<a-button type="primary" block @click="saveForm" size="large">保存</a-button>
							</a-form-item>
						</a-col>
					</a-row>
				</a-col>
			</a-row>
		</a-form>
	</a-card>


</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>