hookehuyr

fix

/*
* @Date: 2022-05-26 13:57:28
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-21 17:17:16
* @LastEditTime: 2024-11-21 17:32:30
* @FilePath: /data-table/src/router.js
* @Description: 文件描述
*/
......@@ -51,7 +51,7 @@ router.beforeEach((to, from, next) => {
next({ ...to.redirectedFrom, replace: true });
}, 1000);
} else {
if (to.query.page_type === 'add') { // 表单为新增状态, 检查是否有未完成的表单信息
if (to.query.page_type === 'add' || to.query.page_type === undefined) { // 表单为新增状态, 检查是否有未完成的表单信息
const existingCookie = Cookies.get(to.query.code);
if (existingCookie) {
showConfirmDialog({
......
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-21 13:02:15
* @LastEditTime: 2024-11-21 17:33:00
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
......@@ -512,7 +512,7 @@ onMounted(async () => {
}
// TAG:不同类型提交表单处理
if (page_type === 'add') { // 表单为新增状态, 检查是否有未完成的表单信息
if (page_type === 'add' || page_type === undefined) { // 表单为新增状态, 检查是否有未完成的表单信息
const existingCookie = Cookies.get($route.query.code);
if (existingCookie) {
// 如果Cookie存在,更新它
......