mirror of https://github.com/nocodb/nocodb
Muhammed Mustafa
2 years ago
5 changed files with 43 additions and 4 deletions
@ -0,0 +1,28 @@ |
|||||||
|
<script lang="ts" setup> |
||||||
|
import { Panel, PanelPosition } from '@vue-flow/additional-components' |
||||||
|
import type { ERDConfig } from './utils' |
||||||
|
import MiFullscreen from '~icons/material-symbols/fullscreen' |
||||||
|
import MiFullscreenExit from '~icons/material-symbols/fullscreen-exit' |
||||||
|
|
||||||
|
const props = defineProps<{ |
||||||
|
config: ERDConfig |
||||||
|
}>() |
||||||
|
|
||||||
|
const config = useVModel(props, 'config') |
||||||
|
|
||||||
|
const toggleFullScreen = () => { |
||||||
|
config.value.isFullScreen = !config.value.isFullScreen |
||||||
|
} |
||||||
|
</script> |
||||||
|
|
||||||
|
<template> |
||||||
|
<Panel |
||||||
|
class="text-xs bg-white border-1 rounded-md p-0.5 border-gray-50 z-50 nc-erd-histogram cursor-pointer hover:bg-gray-100" |
||||||
|
:position="PanelPosition.TopLeft" |
||||||
|
> |
||||||
|
<div class="flex"> |
||||||
|
<MiFullscreenExit v-if="config.isFullScreen" class="h-5 w-5" @click="() => toggleFullScreen()" /> |
||||||
|
<MiFullscreen v-else class="h-5 w-5" @click="() => toggleFullScreen()" /> |
||||||
|
</div> |
||||||
|
</Panel> |
||||||
|
</template> |
Loading…
Reference in new issue