fix bug: 例如api日志详情弹出框,第二次点击数据不会渲染。

排查发现这段代码有问题,不太明白这里为什么要判断pro环境做处理。
且loaded.value没有恢复为false,这个也不太明白
pull/41/head
Henry 2023-12-12 12:02:55 +08:00
parent ceb41832b9
commit c681b9d435
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
import { getCurrentInstance, ref, unref } from 'vue'
import type { DescInstance, DescriptionProps, UseDescReturnType } from './typing'
import { isProdMode } from '@/utils/env'
// import { isProdMode } from '@/utils/env'
export function useDescription(props?: Partial<DescriptionProps>): UseDescReturnType {
if (!getCurrentInstance())
@ -10,8 +10,8 @@ export function useDescription(props?: Partial<DescriptionProps>): UseDescReturn
const loaded = ref(false)
function register(instance: DescInstance) {
if (unref(loaded) && isProdMode())
return
// if (unref(loaded) && isProdMode())
// return
desc.value = instance
props && instance.setDescProps(props)