diff --git a/src/frontend/src/components/jb-form/index.vue b/src/frontend/src/components/jb-form/index.vue index 88540736f4..37b5fe215e 100644 --- a/src/frontend/src/components/jb-form/index.vue +++ b/src/frontend/src/components/jb-form/index.vue @@ -112,11 +112,13 @@ const { width } = item.querySelector('span').getBoundingClientRect(); max = Math.max(max, width); }); + + const labelWidth = max + labelPadding + safePadding; $labelEleList.forEach((item) => { - item.style.width = `${max + labelPadding + safePadding}px`; + item.style.width = `${labelWidth}px`; }); $formEle.querySelectorAll('.bk-form-content').forEach((item) => { - item.style.marginLeft = `${max + this.paddingLeft}px`; + item.style.marginLeft = `${labelWidth}px`; }); this.max = max; }, @@ -180,22 +182,20 @@ diff --git a/src/frontend/src/components/jb-form/item.vue b/src/frontend/src/components/jb-form/item.vue index 1c5b726d2c..39591b9753 100644 --- a/src/frontend/src/components/jb-form/item.vue +++ b/src/frontend/src/components/jb-form/item.vue @@ -28,14 +28,13 @@