Showing
2 changed files
with
4 additions
and
4 deletions
| 1 | /* | 1 | /* |
| 2 | * @Date: 2022-05-26 13:57:28 | 2 | * @Date: 2022-05-26 13:57:28 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-11-21 17:17:16 | 4 | + * @LastEditTime: 2024-11-21 17:32:30 |
| 5 | * @FilePath: /data-table/src/router.js | 5 | * @FilePath: /data-table/src/router.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| ... | @@ -51,7 +51,7 @@ router.beforeEach((to, from, next) => { | ... | @@ -51,7 +51,7 @@ router.beforeEach((to, from, next) => { |
| 51 | next({ ...to.redirectedFrom, replace: true }); | 51 | next({ ...to.redirectedFrom, replace: true }); |
| 52 | }, 1000); | 52 | }, 1000); |
| 53 | } else { | 53 | } else { |
| 54 | - if (to.query.page_type === 'add') { // 表单为新增状态, 检查是否有未完成的表单信息 | 54 | + if (to.query.page_type === 'add' || to.query.page_type === undefined) { // 表单为新增状态, 检查是否有未完成的表单信息 |
| 55 | const existingCookie = Cookies.get(to.query.code); | 55 | const existingCookie = Cookies.get(to.query.code); |
| 56 | if (existingCookie) { | 56 | if (existingCookie) { |
| 57 | showConfirmDialog({ | 57 | showConfirmDialog({ | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-07-18 10:22:22 | 2 | * @Date: 2022-07-18 10:22:22 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-11-21 13:02:15 | 4 | + * @LastEditTime: 2024-11-21 17:33:00 |
| 5 | * @FilePath: /data-table/src/views/index.vue | 5 | * @FilePath: /data-table/src/views/index.vue |
| 6 | * @Description: 首页 | 6 | * @Description: 首页 |
| 7 | --> | 7 | --> |
| ... | @@ -512,7 +512,7 @@ onMounted(async () => { | ... | @@ -512,7 +512,7 @@ onMounted(async () => { |
| 512 | } | 512 | } |
| 513 | 513 | ||
| 514 | // TAG:不同类型提交表单处理 | 514 | // TAG:不同类型提交表单处理 |
| 515 | - if (page_type === 'add') { // 表单为新增状态, 检查是否有未完成的表单信息 | 515 | + if (page_type === 'add' || page_type === undefined) { // 表单为新增状态, 检查是否有未完成的表单信息 |
| 516 | const existingCookie = Cookies.get($route.query.code); | 516 | const existingCookie = Cookies.get($route.query.code); |
| 517 | if (existingCookie) { | 517 | if (existingCookie) { |
| 518 | // 如果Cookie存在,更新它 | 518 | // 如果Cookie存在,更新它 | ... | ... |
-
Please register or login to post a comment