|
@@ -1,11 +1,17 @@
|
|
|
import { app } from '@/main'
|
|
|
import { genMount } from './mount'
|
|
|
+import LocaleEnv from '@/components/locale-env/index.vue'
|
|
|
+import { h } from 'vue'
|
|
|
|
|
|
export const mount = genMount(app)
|
|
|
|
|
|
export const renderCompoent = <P>(comp: ComponentConstructor<P>, props: P) => {
|
|
|
const element = document.createElement('div')
|
|
|
- const { destroy } = mount(comp, { props, element })
|
|
|
+ const { destroy } = mount(LocaleEnv, {
|
|
|
+ element,
|
|
|
+ children: { default: () => h(comp as any, props as any) }
|
|
|
+ })
|
|
|
+ // const { destroy } = mount(comp, { props, element })
|
|
|
return () => {
|
|
|
destroy()
|
|
|
if (document.body.contains(element)) {
|