mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-03 10:06:53 +00:00
* chore: sync various Signed-off-by: mertmit <mertmit99@gmail.com> * test: ws scope Signed-off-by: mertmit <mertmit99@gmail.com> * fix(nc-gui): ncSubmenu right icon visibility issue * fix(nc-gui): use viewTypeAlias in all the places --------- Signed-off-by: mertmit <mertmit99@gmail.com> Co-authored-by: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com>
47 lines
1.2 KiB
Vue
47 lines
1.2 KiB
Vue
<script lang="ts" setup>
|
|
import { PanelPosition } from '@vue-flow/additional-components'
|
|
import type { AiBaseSchema, AiERDConfig } from './utils'
|
|
|
|
interface Props {
|
|
showAllColumns?: boolean
|
|
aiBaseSchema: AiBaseSchema
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
showAllColumns: true,
|
|
})
|
|
|
|
const config = reactive<AiERDConfig>({
|
|
showPkAndFk: true,
|
|
showViews: false,
|
|
showAllColumns: props.showAllColumns,
|
|
singleTableMode: false,
|
|
showMMTables: false,
|
|
showJunctionTableNames: false,
|
|
isFullScreen: false,
|
|
})
|
|
|
|
const toggleFullScreen = () => {
|
|
config.isFullScreen = !config.isFullScreen
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
class="w-full bg-white"
|
|
:class="{
|
|
'z-100 h-screen w-screen fixed top-0 left-0 right-0 bottom-0': config.isFullScreen,
|
|
'nc-erd-vue-flow-single-table': config.singleTableMode,
|
|
'nc-erd-vue-flow': !config.singleTableMode,
|
|
}"
|
|
>
|
|
<div class="relative h-full">
|
|
<LazyAiErdFlow :ai-base-schema="aiBaseSchema" :config="config">
|
|
<ErdFullScreenToggle :config="config" :position="PanelPosition.TopRight" @toggle-full-screen="toggleFullScreen" />
|
|
</LazyAiErdFlow>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style lang="scss" scoped></style>
|