Parcourir la source

fix: 当id为雪花id时无法传递id至路由

LesanOuO il y a 9 mois
Parent
commit
046e6ce5a7
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      src/views/bpm/form/index.vue

+ 2 - 1
src/views/bpm/form/index.vue

@@ -143,8 +143,9 @@ const openForm = (id?: number) => {
   const toRouter: { name: string; query?: { id: number } } = {
     name: 'BpmFormEditor'
   }
+  console.log(typeof id)
   // 表单新建的时候id传的是event需要排除
-  if (typeof id === 'number') {
+  if (typeof id === 'number' || typeof id === 'string') {
     toRouter.query = {
       id
     }