perf: 优化获取id 的旧代码

This commit is contained in:
奔跑的面条
2022-11-12 16:16:03 +08:00
parent fce514c490
commit f6bad1513b
2 changed files with 4 additions and 7 deletions
@@ -30,7 +30,7 @@
<script setup lang="ts">
import { ref, nextTick, computed } from 'vue'
import { fetchRouteParams } from '@/utils'
import { fetchRouteParamsLocation } from '@/utils'
import { icon } from '@/plugins'
const { FishIcon } = icon.ionicons5
@@ -39,9 +39,7 @@ const inputInstRef = ref(null)
// 根据路由 id 参数获取项目信息
const fetchProhectInfoById = () => {
const routeParamsRes = fetchRouteParams()
if (!routeParamsRes) return
const { id } = routeParamsRes
const id = fetchRouteParamsLocation()
if (id.length) {
return id[0]
}