Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch element-ui@2.15.7
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/element-ui/packages/form/src/label-wrap.vue b/node_modules/element-ui/packages/form/src/label-wrap.vue
index d263f7d..a59023a 100644
--- a/node_modules/element-ui/packages/form/src/label-wrap.vue
+++ b/node_modules/element-ui/packages/form/src/label-wrap.vue
@@ -32,7 +32,8 @@ export default {
getLabelWidth() {
if (this.$el && this.$el.firstElementChild) {
const computedWidth = window.getComputedStyle(this.$el.firstElementChild).width;
- return Math.ceil(parseFloat(computedWidth));
+ return Math.ceil(parseFloat(computedWidth) || 0);
} else {
return 0;
}
This issue body was partially generated by patch-package .
1条答案
按热度按时间r55awzrz1#
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
element-ui@2.15.7
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package .
First of all, thank you for your work.I found that your update did not solve this problem (#Error: [ElementForm]unpected width at VueComponent.getLabelWidthIndex), I solved it with the following changes, at least in my project it works well
Welcome to communicate👏👏👏!