This commit is contained in:
syuilo 2024-09-22 20:44:24 +09:00
parent e6e4182b53
commit f93a575c3a
2 changed files with 7 additions and 5 deletions

View file

@ -12,6 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
ref="bodyEl" ref="bodyEl"
:data-sticky-container-header-height="headerHeight" :data-sticky-container-header-height="headerHeight"
:data-sticky-container-footer-height="footerHeight" :data-sticky-container-footer-height="footerHeight"
style="position: relative; z-index: 0;"
> >
<slot></slot> <slot></slot>
</div> </div>
@ -83,14 +84,14 @@ onMounted(() => {
if (headerEl.value != null) { if (headerEl.value != null) {
headerEl.value.style.position = 'sticky'; headerEl.value.style.position = 'sticky';
headerEl.value.style.top = 'var(--stickyTop, 0)'; headerEl.value.style.top = 'var(--stickyTop, 0)';
headerEl.value.style.zIndex = '1000'; headerEl.value.style.zIndex = '1';
observer.observe(headerEl.value); observer.observe(headerEl.value);
} }
if (footerEl.value != null) { if (footerEl.value != null) {
footerEl.value.style.position = 'sticky'; footerEl.value.style.position = 'sticky';
footerEl.value.style.bottom = 'var(--stickyBottom, 0)'; footerEl.value.style.bottom = 'var(--stickyBottom, 0)';
footerEl.value.style.zIndex = '1000'; footerEl.value.style.zIndex = '1';
observer.observe(footerEl.value); observer.observe(footerEl.value);
} }
}); });

View file

@ -11,6 +11,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<div class="_gaps"> <div class="_gaps">
<MkFolder> <MkFolder>
<template #label>{{ i18n.ts._role.baseRole }}</template> <template #label>{{ i18n.ts._role.baseRole }}</template>
<template #footer>
<MkButton primary rounded @click="updateBaseRole">{{ i18n.ts.save }}</MkButton>
</template>
<div class="_gaps_s"> <div class="_gaps_s">
<MkInput v-model="baseRoleQ" type="search"> <MkInput v-model="baseRoleQ" type="search">
<template #prefix><i class="ti ti-search"></i></template> <template #prefix><i class="ti ti-search"></i></template>
@ -253,8 +256,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #label>{{ i18n.ts.enable }}</template> <template #label>{{ i18n.ts.enable }}</template>
</MkSwitch> </MkSwitch>
</MkFolder> </MkFolder>
<MkButton primary rounded @click="updateBaseRole">{{ i18n.ts.save }}</MkButton>
</div> </div>
</MkFolder> </MkFolder>
<MkButton primary rounded @click="create"><i class="ti ti-plus"></i> {{ i18n.ts._role.new }}</MkButton> <MkButton primary rounded @click="create"><i class="ti ti-plus"></i> {{ i18n.ts._role.new }}</MkButton>
@ -280,6 +281,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup> <script lang="ts" setup>
import { computed, reactive, ref } from 'vue'; import { computed, reactive, ref } from 'vue';
import { ROLE_POLICIES } from '@@/js/const.js';
import XHeader from './_header_.vue'; import XHeader from './_header_.vue';
import MkInput from '@/components/MkInput.vue'; import MkInput from '@/components/MkInput.vue';
import MkFolder from '@/components/MkFolder.vue'; import MkFolder from '@/components/MkFolder.vue';
@ -293,7 +295,6 @@ import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js'; import { definePageMetadata } from '@/scripts/page-metadata.js';
import { instance, fetchInstance } from '@/instance.js'; import { instance, fetchInstance } from '@/instance.js';
import MkFoldableSection from '@/components/MkFoldableSection.vue'; import MkFoldableSection from '@/components/MkFoldableSection.vue';
import { ROLE_POLICIES } from '@@/js/const.js';
import { useRouter } from '@/router/supplier.js'; import { useRouter } from '@/router/supplier.js';
const router = useRouter(); const router = useRouter();