Skip to content

Commit ab7843c

Browse files
committed
Merge remote-tracking branch 'origin/dev'
2 parents c96c0fb + 50e4a32 commit ab7843c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/components/FormLayout/FormLayout.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
<template lang="pug">
22
div(:class="styles.FormLayout")
33
template(
4-
v-if="slotsElms.length",
4+
v-if="!noItemWrap && slotsElms.length",
55
v-for="(item, index) in slotsElms",
66
)
77
Item(
88
v-if="!itemGroupIndexes[index]",
99
:key="index",
10-
:class="styles.Item",
1110
)
1211
component(
1312
:is="item",
@@ -28,6 +27,15 @@ import { extractElement } from '@/utilities/extract-fragment';
2827
import styles from '@/classes/FormLayout.json';
2928
import { Item } from './components';
3029
30+
interface Props {
31+
/** No wrap all stack elements with FormItem */
32+
noItemWrap?: boolean;
33+
}
34+
35+
const props = withDefaults(defineProps<Props>(), {
36+
noItemWrap: false,
37+
});
38+
3139
const itemRefs = ref<any[]>([]);
3240
3341
const itemGroupIndexes = ref<boolean[]>([]);

src/components/FormLayout/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export { default as FormLayout } from './FormLayout.vue';
22
export { Group as FormGroup } from './components/Group';
3+
export { Item as FormItem } from './components/Item';

0 commit comments

Comments
 (0)