2020-11-25 21:31:34 +09:00
|
|
|
<template>
|
2021-09-30 00:50:45 +09:00
|
|
|
<div class="vrtktovg _debobigegoItem _debobigegoNoConcat" v-size="{ max: [500] }" v-sticky-container>
|
|
|
|
<div class="_debobigegoLabel"><slot name="label"></slot></div>
|
|
|
|
<div class="main _debobigego_group" ref="child">
|
2020-11-25 21:31:34 +09:00
|
|
|
<slot></slot>
|
|
|
|
</div>
|
2021-09-30 00:50:45 +09:00
|
|
|
<div class="_debobigegoCaption"><slot name="caption"></slot></div>
|
2020-11-25 21:31:34 +09:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2021-04-16 17:34:06 +09:00
|
|
|
import { defineComponent, onMounted, ref } from 'vue';
|
2020-11-25 21:31:34 +09:00
|
|
|
|
|
|
|
export default defineComponent({
|
2021-04-16 17:34:06 +09:00
|
|
|
setup(props, context) {
|
|
|
|
const child = ref<HTMLElement | null>(null);
|
|
|
|
|
|
|
|
const scanChild = () => {
|
|
|
|
if (child.value == null) return;
|
|
|
|
const els = Array.from(child.value.children);
|
|
|
|
for (let i = 0; i < els.length; i++) {
|
|
|
|
const el = els[i];
|
2021-09-30 00:50:45 +09:00
|
|
|
if (el.classList.contains('_debobigegoNoConcat')) {
|
|
|
|
if (els[i - 1]) els[i - 1].classList.add('_debobigegoNoConcatPrev');
|
|
|
|
if (els[i + 1]) els[i + 1].classList.add('_debobigegoNoConcatNext');
|
2021-04-16 17:34:06 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
scanChild();
|
|
|
|
|
|
|
|
const observer = new MutationObserver(records => {
|
|
|
|
scanChild();
|
|
|
|
});
|
|
|
|
|
|
|
|
observer.observe(child.value, {
|
|
|
|
childList: true,
|
|
|
|
subtree: false,
|
|
|
|
attributes: false,
|
|
|
|
characterData: false,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
return {
|
|
|
|
child
|
|
|
|
};
|
|
|
|
}
|
2020-11-25 21:31:34 +09:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.vrtktovg {
|
|
|
|
> .main {
|
2021-09-30 00:50:45 +09:00
|
|
|
> ::v-deep(*):not(._debobigegoNoConcat) {
|
|
|
|
&:not(._debobigegoNoConcatNext) {
|
2021-04-16 17:34:06 +09:00
|
|
|
margin: 0;
|
|
|
|
}
|
2020-11-25 21:31:34 +09:00
|
|
|
|
2021-09-30 00:50:45 +09:00
|
|
|
&:not(:last-child):not(._debobigegoNoConcatPrev) {
|
|
|
|
&._debobigegoPanel, ._debobigegoPanel {
|
2020-11-25 21:31:34 +09:00
|
|
|
border-bottom: solid 0.5px var(--divider);
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
}
|
|
|
|
}
|
2021-04-16 17:34:06 +09:00
|
|
|
|
2021-09-30 00:50:45 +09:00
|
|
|
&:not(:first-child):not(._debobigegoNoConcatNext) {
|
|
|
|
&._debobigegoPanel, ._debobigegoPanel {
|
2021-04-16 15:44:17 +09:00
|
|
|
border-top: none;
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
}
|
|
|
|
}
|
2020-11-25 21:31:34 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|