mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-24 11:38:09 +09:00
1fd815beea
This reverts commit 5e86bafb24a714f3351da0a205bc57f54332e33c, reversing changes made to d1977fc3204e16523b3c94be2a2b1878f18dca56.
56 lines
1005 B
Vue
56 lines
1005 B
Vue
<template>
|
|
<MkModal
|
|
ref="modal"
|
|
v-slot="{ type, maxHeight }"
|
|
:z-priority="'high'"
|
|
:src="src"
|
|
:transparent-bg="true"
|
|
@click="modal.close()"
|
|
@closed="emit('closed')"
|
|
tabindex="-1"
|
|
v-focus
|
|
>
|
|
<MkMenu
|
|
:items="items"
|
|
:align="align"
|
|
:width="width"
|
|
:max-height="maxHeight"
|
|
:as-drawer="type === 'drawer'"
|
|
class="sfhdhdhq"
|
|
:class="{ drawer: type === 'drawer' }"
|
|
@close="modal.close()"
|
|
/>
|
|
</MkModal>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import {} from "vue";
|
|
import MkModal from "./MkModal.vue";
|
|
import MkMenu from "./MkMenu.vue";
|
|
import { MenuItem } from "@/types/menu";
|
|
|
|
defineProps<{
|
|
items: MenuItem[];
|
|
align?: "center" | string;
|
|
width?: number;
|
|
viaKeyboard?: boolean;
|
|
src?: any;
|
|
}>();
|
|
|
|
const emit = defineEmits<{
|
|
(ev: "closed"): void;
|
|
}>();
|
|
|
|
let modal = $ref<InstanceType<typeof MkModal>>();
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.sfhdhdhq {
|
|
&.drawer {
|
|
border-radius: 24px;
|
|
border-bottom-right-radius: 0;
|
|
border-bottom-left-radius: 0;
|
|
}
|
|
}
|
|
</style>
|