Skip to content

Commit

Permalink
Merge c85867a into 5390f40
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Nov 2, 2021
2 parents 5390f40 + c85867a commit 43ab864
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/form/src/label-wrap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export default {
methods: {
getLabelWidth() {
if (this.$el && this.$el.firstElementChild) {
const computedWidth = window.getComputedStyle(this.$el.firstElementChild).width;
if (this.$el) {
const computedWidth = window.getComputedStyle(this.$el).width;
return Math.ceil(parseFloat(computedWidth));
} else {
return 0;
Expand Down

0 comments on commit 43ab864

Please sign in to comment.