hookehuyr

✨ feat: 删除存在cookie, 未完成的表单功能

<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-21 12:15:57
* @LastEditTime: 2024-11-21 13:02:15
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
......@@ -512,7 +512,7 @@ onMounted(async () => {
}
// TAG:不同类型提交表单处理
if (page_type === 'add' && model === 'edit') { // 表单为新增状态, 检查是否有未完成的表单信息
if (page_type === 'add') { // 表单为新增状态, 检查是否有未完成的表单信息
const existingCookie = Cookies.get($route.query.code);
if (existingCookie) {
// 如果Cookie存在,更新它
......@@ -973,6 +973,8 @@ const successHandle = () => { // 表单成功提交后续操作
},
});
}
// 删除存在cookie, 未完成的表单功能
Cookies.remove($route.query.code);
}
const onSubmit = async (values) => { // 表单提交回调
......