Bug Type: Component
Environment
- Vue Version:
3.3.4
- Element Plus Version:
2.3.8
- Browser / OS:
Chrome 114.0.5735.198 / Linux Mint 20.3 Cinnamon
- Build Tool:
Vite
Reproduction
Related Component
el-scrollbar
Reproduction Link
Steps to reproduce
- Build in prod mode (npm run build) (PROD mode is important, because in dev mode works fine)
- Open builded project
- Click by add button
- See in console. You see
TypeError: Cannot read properties of null (reading 'insertBefore')
What is Expected?
Work indent (without errors)
What is actually happening?
TypeError: Cannot read properties of null (reading 'insertBefore')
Additional comments
I created environment in element-plus-playground, but this bug not reproduce, because element-plus-playground build project in dev mode.
Please, see link with github.
I see next behavior, in TestComp.vue we have
<template v-if="visibleTitle" #title>
<h1>My title</h1>
</template>
If you change this to:
<template #title>
<h1 v-if="visibleTitle">My title</h1>
</template>
Or you comment <el-scrollbar>
in TestItems.vue
Everything will work. This is strange.
4条答案
按热度按时间bogh5gae1#
Looks like: #7280 , #9160#6640 , #5278 , #9029
xzv2uavs2#
And vue core issue , but I can't reproduce in vue without element-plus
nc1teljy3#
我也遇到了类似问题, 页面在dialog关闭后 会报错
Cannot read properties of null (reading 'insertBefore')
element 2.3.9版本vue 3.2.30
fquxozlt4#
所以有什么下文不,