fix bug: 例如api日志详情弹出框,第二次点击数据不会渲染。
排查发现这段代码有问题,不太明白这里为什么要判断pro环境做处理。 且loaded.value没有恢复为false,这个也不太明白pull/41/head
parent
ceb41832b9
commit
c681b9d435
|
@ -1,6 +1,6 @@
|
||||||
import { getCurrentInstance, ref, unref } from 'vue'
|
import { getCurrentInstance, ref, unref } from 'vue'
|
||||||
import type { DescInstance, DescriptionProps, UseDescReturnType } from './typing'
|
import type { DescInstance, DescriptionProps, UseDescReturnType } from './typing'
|
||||||
import { isProdMode } from '@/utils/env'
|
// import { isProdMode } from '@/utils/env'
|
||||||
|
|
||||||
export function useDescription(props?: Partial<DescriptionProps>): UseDescReturnType {
|
export function useDescription(props?: Partial<DescriptionProps>): UseDescReturnType {
|
||||||
if (!getCurrentInstance())
|
if (!getCurrentInstance())
|
||||||
|
@ -10,8 +10,8 @@ export function useDescription(props?: Partial<DescriptionProps>): UseDescReturn
|
||||||
const loaded = ref(false)
|
const loaded = ref(false)
|
||||||
|
|
||||||
function register(instance: DescInstance) {
|
function register(instance: DescInstance) {
|
||||||
if (unref(loaded) && isProdMode())
|
// if (unref(loaded) && isProdMode())
|
||||||
return
|
// return
|
||||||
|
|
||||||
desc.value = instance
|
desc.value = instance
|
||||||
props && instance.setDescProps(props)
|
props && instance.setDescProps(props)
|
||||||
|
|
Loading…
Reference in New Issue