Chrome
2.0.5
2.5.2
程序打包后调用van-popup,直接报错Cannot set property 'zIndex' of undefined,里面只是写了一个div。
本机调试时正常,但是打包后就会出现这个问题。
复现链接无法打开,麻烦提供正确的复现链接
这个比较特殊的地方就是,新建差旅报销界面本身position是fixed的
试了试简单界面使用popup,也是这个问题
没复现问题,最好提供个 codesandbox 链接
codesandbox应该不会出现这个问题,不知道和我打包的环境有没有关系
嗯,建议先检查下打包的配置,自行调试下
嗯,建议先检查下打包的配置,自行调试下
请问下这个问题有结论吗?我也遇到了
我也遇到了 把node_modules删了重新install一下就好了
删除node_modlues并不能解决问题,从2.0.5到2.1.1 popup插件好像都会存在这个问题。不知道怎么解决,官方也没有给解决方案。
TypeError: Cannot set property 'zIndex' of undefined
开了vue-devtools就有很大概率会出现这个问题,关了就不会,不知道是不是有冲突,还经常会报死循环

我也遇到了,头疼
我也遇到了
我也遇到了,不过我这错误环境是:单页面是通过iframe插进去的, debug时,this.$el指向的是注释,当前组件并未挂载到dom上。我目前就就给外层div加了v-show 预渲染下解决了,不知道和你们报错的问题原因是否一样。
这个问题有没有解决啊,我也遇到了这个问题,我的vue版本2.5.2,vant版本:2.6.3

搞定了,
new Vue({
el: '#app',
router,
store,
render: h => h(App)
}).$mount("#app")
把vue升级成2.6.10,就不出现这个问题了
[email protected];[email protected]
我这边也是出现了同样的问题,看别的issue说是vue多次引入,删了node_modules后重新下载后解决。
I managed to solve this on my end after quite a lot of debugging.
It was even stranger because I could not reproduce this on my local development environment.
What in the end did the trick was to configure in my vue.config.js the following highlighted line:

vue$: path.resolve(__dirname, 'node_modules/vue/dist/vue.runtime.esm.js'), is what did the tricker.
I also tried with how it is described here: https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only ('vue$': 'vue/dist/vue.esm.js') but that did not work.
Vant is the only package I have this issue with. It might be slightly connected but I am not sure.
I hope the above will help others to resolve this issue.
vconsole.min.js:10 [Vue warn]: Error in nextTick: "TypeError: Cannot set property 'zIndex' of undefined"
同样遇到了,我试下重装包吧
我这边遇到这种情况的问题是因为在popup里用了picker,但是我的picker在某些初始情况下columns赋了null,导致报错,改一下columns的默认赋值就好了。
Most helpful comment
TypeError: Cannot set property 'zIndex' of undefined