Browse Source

fix(nc-gui): Reviews

pull/4911/head
Muhammed Mustafa 2 years ago
parent
commit
5556dcdf4b
  1. 6
      packages/nc-gui/components/erd/FullScreenToggle.vue
  2. 6
      packages/nc-gui/components/erd/View.vue

6
packages/nc-gui/components/erd/FullScreenToggle.vue

@ -8,10 +8,12 @@ const props = defineProps<{
config: ERDConfig config: ERDConfig
}>() }>()
const config = useVModel(props, 'config') const emit = defineEmits(['toggleFullScreen'])
const { config } = toRefs(props)
const toggleFullScreen = () => { const toggleFullScreen = () => {
config.value.isFullScreen = !config.value.isFullScreen emit('toggleFullScreen')
} }
</script> </script>

6
packages/nc-gui/components/erd/View.vue

@ -66,6 +66,10 @@ const populateTables = async () => {
isLoading = false isLoading = false
} }
const toggleFullScreen = () => {
config.isFullScreen = !config.isFullScreen
}
watch([metas, projectTables], populateTables, { watch([metas, projectTables], populateTables, {
flush: 'post', flush: 'post',
immediate: true, immediate: true,
@ -104,7 +108,7 @@ watch(
</div> </div>
</GeneralOverlay> </GeneralOverlay>
<ErdFullScreenToggle :config="config" /> <ErdFullScreenToggle :config="config" @toggle-full-screen="toggleFullScreen" />
<ErdConfigPanel :config="config" /> <ErdConfigPanel :config="config" />
<ErdHistogramPanel v-if="!config.singleTableMode" /> <ErdHistogramPanel v-if="!config.singleTableMode" />
</LazyErdFlow> </LazyErdFlow>

Loading…
Cancel
Save