feat(Row): add wrap prop (#8393)

This commit is contained in:
neverland
2021-03-23 13:05:52 +08:00
committed by GitHub
parent 71d60cdca0
commit 49430a1ef6
5 changed files with 23 additions and 1 deletions
+6 -1
View File
@@ -31,6 +31,10 @@ export default defineComponent({
type: String as PropType<keyof HTMLElementTagNameMap>,
default: 'div',
},
wrap: {
type: Boolean,
default: true,
},
gutter: {
type: [Number, String],
default: 0,
@@ -86,12 +90,13 @@ export default defineComponent({
linkChildren({ spaces });
return () => {
const { tag, align, justify } = props;
const { tag, wrap, align, justify } = props;
return (
<tag
class={bem({
[`align-${align}`]: align,
[`justify-${justify}`]: justify,
nowrap: !wrap,
})}
>
{slots.default?.()}