Pre Merge pull request !41 from Henry/fix-bug
commit
35343b25a6
|
|
@ -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