Enjoy the good life everyday!
关闭
欢迎来PyGo个人空间 ^_^
Element-UI【Form组件】unpected-width报错的解决 | PyGo²

Element-UI【Form组件】unpected-width报错的解决

在使用Element-UI的Form组件时候,发现控制台报了一个Error:[ElementForm]unpected width

VUE Element-UI

报错:

1
2
3
4
5
6
7
8
9
10
11
vue.esm.js:1897 Error: [ElementForm]unpected width
at VueComponent.getLabelWidthIndex (element-ui.common.js:23014)
at VueComponent.deregisterLabelWidth (element-ui.common.js:23027)
at VueComponent.updateLabelWidth (element-ui.common.js:23226)
at VueComponent.beforeDestroy (element-ui.common.js:23253)
at invokeWithErrorHandling (vue.esm.js:1863)
at callHook (vue.esm.js:4222)
at VueComponent.Vue.$destroy (vue.esm.js:3981)
at destroy (vue.esm.js:3168)
at invokeDestroyHook (vue.esm.js:6119)
at invokeDestroyHook (vue.esm.js:6124)

使用el-form组件的时候,设置labelWidth设为auto时,如果el-form-item内容如果你用了v-show会提示上面的错误,可以v-if替换成v-show,每次重新渲染组件,这样就可以了。

  • 本文作者:mingliang.gao【一个爱老婆Python程序猿。。。。。。】
  • 本文链接: http://pygo2.top/articles/16084/
  • 版权声明: 本博客所有文章欢迎转载,转载请注明出处!
觉得有帮助 请偶坐个公交车
0%