Skip to content

Commit

Permalink
⚡ async load TableEditor (Monaco Editor)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidZhang73 committed Feb 27, 2022
1 parent 22b469e commit 873e000
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/pages/configuration/components/TableBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,12 @@

<script setup>
import { storeToRefs } from 'pinia'
import { computed, ref } from 'vue'
import { computed, defineAsyncComponent, ref } from 'vue'
import ZoomImage from '~/components/ZoomImage.vue'
import TableEditor from '~/pages/configuration/components/TableEditor.vue'
import { useConfigurationStore } from '~/store/configuration.js'
const TableEditor = defineAsyncComponent(() => import('~/pages/configuration/components/TableEditor.vue'))
const props = defineProps({
title: {
required: true,
Expand Down
2 changes: 1 addition & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const router = createRouter({
})

router.beforeEach((to, from) => {
if (to.path === from.path || Object.keys(to.query).length) return true
if (to.path === from.path || Object.keys(to.query).length || !Object.keys(from.query).length) return true
return { ...to, query: from.query }
})

Expand Down

0 comments on commit 873e000

Please sign in to comment.