File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
src/components/u-form.vue Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 11### 基础表单
22
33``` html
4- <u-form gap = " large "
4+ <u-form
55 ><u-form-item label =" 名称" required >
66 <u-input placeholder =" 由字母、数字和中划线组成" ></u-input >
77 </u-form-item
Original file line number Diff line number Diff line change 11<template >
2- <div :class =" $style.root" @submit.prevent :layout =" layoutValue" >
2+ <div :class =" $style.root" @submit.prevent :layout =" layoutValue" :repeat = " repeat " >
33 <slot ></slot >
44</div >
55</template >
@@ -151,11 +151,15 @@ export default {
151151 margin-bottom : var (--form-item-margin-bottom-large );
152152}
153153
154- .root [gap-width = " large" ][layout = " inline" ] .item :not (:last-child ) {
154+ .root [gap-height = " normal" ][layout = " block" ] .item :not (:last-child ) {
155+ margin-bottom : var (--form-item-margin-bottom );
156+ }
157+
158+ .root [gap-width = " large" ][layout = " inline" ]:not ([repeat ]) .item :not (:last-child ) {
155159 margin-right : var (--space-large );
156160}
157161
158- .root [gap-width = " none" ][layout = " inline" ] .item :not (:last-child ) {
162+ .root [gap-width = " none" ][layout = " inline" ]:not ([ repeat ]) .item :not (:last-child ) {
159163 margin-right : var (--form-item-margin-bottom-none );
160164}
161165
@@ -167,12 +171,17 @@ export default {
167171 margin-bottom : var (--form-item-margin-bottom-none );
168172}
169173
170- .root [gap-width = " small" ][layout = " inline" ] .item :not (:last-child ) {
174+ .root [gap-width = " small" ][layout = " inline" ]:not ([ repeat ]) .item :not (:last-child ) {
171175 margin-right : var (--space-small );
172176}
173177
174- .root [gap-width = " small" ][layout = " inline" ] .item > .item_label {
178+ /* 会导致label样式错乱 先去掉了 */
179+ /* .root[layout="inline"][gap-width="small"]:not([repeat]) .item > .item_label {
175180 padding-right: var(--space-small);
181+ } */
182+
183+ .root [gap-width = " normal" ][layout = " inline" ]:not ([repeat ]) .item :not (:last-child ) {
184+ margin-right : var (--space-medium );
176185}
177186
178187 </style >
You can’t perform that action at this time.
0 commit comments