-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form: label-width supports width auto #14944
Conversation
Deploy preview for element ready! Built with commit c6024f1 |
@ziyoung ---> at packages/form/src/label-wrap.vue |
@ziyoung When I use label-width="auto" on el-form which is located in an el-tab, will also get the error
There is a demo: https://codepen.io/bh20077/pen/NVObdd Main code from the demo: #app
p
el-button(type="primary" @click="toggleCard") 隐藏
p 请打开控制台,然后点击上面的按钮,将会隐藏下面的 card,此时在控制台会报错。经过排查是 el-form 上面的 label-width = "auto" 属性导致的,如果不设置或者设置居 label-width="100px" 就不会报错
el-card(v-if="show_card")
//- 直接写在这里面也不会报错的,但是将 form 写到下面的 el-tabs 里面就会报错
//- el-form(label-width="auto")
//- el-form-item
//- el-form-item(label="任务名称")
//- el-input(v-model="task_name" type="text" placeholder="请填写任务名称")
el-tabs(stretch)
el-tab-pane(label="基本信息")
//- 这里的 label-width = "auto" 在点击按钮后的时候会报错
el-form(label-width="auto")
el-form-item
el-form-item(label="任务名称")
el-input
el-tab-pane(label="运行参数") 运行参数 |
I also encountered this problem, although it did not affect, but there was an error.Hope to fix this problem |
@VanLiuZhi Please create a new issue. |
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.