Vue3使用render的时候收到一个警告

我用vue3动态往body生成一个全局唯一的模态框组件的时候,遇到以下问题:

先上组件代码 modal.js

template>
  <transition enter-active-class='fade' enter-to-class='show' leave-from-class='show' leave-active-class='fade'>
    <div class='modal-backdrop vb-modal-backdrop' v-show='show'></div>
  </transition>
</template>
<script>
import {defineComponent,ref} from 'vue';
export default defineComponent({
  setup(){
    let show = ref(false);
    return {
      show
    }
  }
})
</script>

初始化代码

import ModalConstructor from './modal';
import { h, render} from 'vue'
const Modal = {
  init : function(){
    if(this.vm) return;
    const vnode = h(ModalConstructor);
    render(vnode, document.body);
    this.vm = vnode.component;
  },
  //...
}

调用Modal.init render执行的时候报了一个警告,

[Vue warn]: onBeforeUnmount is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.

请问各位大大应该怎么处理呢?