Compare commits
2
Commits
9b61376830
...
b3c324653b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3c324653b | ||
|
|
5b5a5190e3 |
@@ -124,7 +124,7 @@ defineSlots<BottomPopupSlots>();
|
||||
|
||||
.body {
|
||||
flex: 1;
|
||||
padding: .75rem 0 env(safe-area-inset-bottom, 0);
|
||||
padding: 0 0 env(safe-area-inset-bottom, 0);
|
||||
overflow: auto;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Comment, Fragment, Teleport, defineComponent, h, isVNode, onBeforeUpdate, useSlots } from "vue";
|
||||
import { Comment, Fragment, Teleport, defineComponent, h, isVNode, useSlots } from "vue";
|
||||
import type { CSSProperties, PropType, VNode, VNodeChild } from "vue";
|
||||
import type { SpaceProps, SpaceSlots, SpaceSize } from "./type";
|
||||
|
||||
@@ -76,15 +76,9 @@ const props = defineProps({
|
||||
|
||||
const slots = useSlots() as SpaceSlots;
|
||||
|
||||
let children = flattenChildren(slots.default?.() ?? []);
|
||||
let separatorContent = resolveSeparatorContent();
|
||||
let hasSeparator = hasSeparatorContent(separatorContent);
|
||||
|
||||
onBeforeUpdate(() => {
|
||||
children = flattenChildren(slots.default?.() ?? []);
|
||||
separatorContent = resolveSeparatorContent();
|
||||
hasSeparator = hasSeparatorContent(separatorContent);
|
||||
});
|
||||
const children = computed(() => flattenChildren(slots.default?.() ?? []));
|
||||
const separatorContent = computed(() => resolveSeparatorContent());
|
||||
const hasSeparator = computed(() => hasSeparatorContent(separatorContent.value));
|
||||
|
||||
function resolveSeparatorContent(): VNodeChild | undefined {
|
||||
if (props.separator !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user