Closed suqiufang closed 1 hour ago
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Origin Title: [Bug] 4.1版本无法在vue3模版中使用
Title: [Bug] Version 4.1 cannot be used in vue3 template
4.1
https://github.com/awesome-univer/sheets-vite-demo/tree/c47814f1e2f3ef69acab85a7ffaf47cca0e16e24
Version 4.1 is used in the vue3 project, and it is hoped that it can be mounted on non-root nodes.
Version 4.1 is used in the vue3 project and can only be mounted to the root node for rendering, resulting in the inability to render other content.
No response
Our Vue3 example works fine, perhaps you can refer to it. https://univer.ai/playground?title=Vue+3
I have reviewed your code, and the way you're using Vue and Univer is incorrect. You should initialize Univer after the DOM is ready. Please ensure your code has the following structure:
import { onMounted } from "vue";
onMounted(() => {
// Initialize Univer
})
Before you submit this issue, have you checked the following
Affected packages and versions
4.1
Reproduction link
https://github.com/awesome-univer/sheets-vite-demo/tree/c47814f1e2f3ef69acab85a7ffaf47cca0e16e24
Expected behavior
4.1版本在vue3项目中使用,希望可以挂载到非根节点上
Actual behavior
4.1版本在vue3项目中使用,只能挂载到根节点上渲染,导致无法渲染其他内容
System information
No response