mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 添加多页签右键菜单
This commit is contained in:
37
src/components/common/HoverContainer/index.vue
Normal file
37
src/components/common/HoverContainer/index.vue
Normal file
@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div v-if="showTooltip">
|
||||
<n-tooltip :placement="placement" trigger="hover">
|
||||
<template #trigger>
|
||||
<div class="flex-center h-full cursor-pointer hover:bg-[#f6f6f6] dark:hover:bg-[#333]">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
{{ content }}
|
||||
</n-tooltip>
|
||||
</div>
|
||||
<div v-else class="flex-center cursor-pointer hover:bg-[#f6f6f6] dark:hover:bg-[#333]">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { PropType } from 'vue';
|
||||
import { NTooltip } from 'naive-ui';
|
||||
import type { FollowerPlacement } from 'vueuc';
|
||||
|
||||
defineProps({
|
||||
showTooltip: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
placement: {
|
||||
type: String as PropType<FollowerPlacement>,
|
||||
default: 'bottom'
|
||||
},
|
||||
content: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style scoped></style>
|
@ -3,5 +3,6 @@ import SystemLogo from './SystemLogo/index.vue';
|
||||
import ExceptionSvg from './ExceptionSvg/index.vue';
|
||||
import LoginBg from './LoginBg/index.vue';
|
||||
import BannerSvg from './BannerSvg/index.vue';
|
||||
import HoverContainer from './HoverContainer/index.vue';
|
||||
|
||||
export { AppProviderContent, SystemLogo, ExceptionSvg, LoginBg, BannerSvg };
|
||||
export { AppProviderContent, SystemLogo, ExceptionSvg, LoginBg, BannerSvg, HoverContainer };
|
||||
|
@ -1,2 +1,2 @@
|
||||
export { AppProviderContent, SystemLogo, ExceptionSvg, LoginBg, BannerSvg } from './common';
|
||||
export { AppProviderContent, SystemLogo, ExceptionSvg, LoginBg, BannerSvg, HoverContainer } from './common';
|
||||
export { CountTo } from './custom';
|
||||
|
Reference in New Issue
Block a user