From 0ff37fbf9b0f59808ffd0d38c9e26f6161974bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Sun, 7 Jan 2024 21:26:34 +0100 Subject: [PATCH] fix: import TaskBody globally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raimund Schlüßler --- src/components/TaskDragContainer.vue | 14 -------------- src/main.js | 8 ++++++++ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/components/TaskDragContainer.vue b/src/components/TaskDragContainer.vue index 49e45c301..4faf464a8 100644 --- a/src/components/TaskDragContainer.vue +++ b/src/components/TaskDragContainer.vue @@ -41,23 +41,9 @@ import { sort } from '../store/storeHelper.js' import draggable from 'vuedraggable' import { mapGetters, mapActions, mapMutations } from 'vuex' -import { defineAsyncComponent } from 'vue' - -/** - * We asynchronously import here, because we have a circular dependency - * between TaskDragContainer and TaskBody which otherwise cannot be resolved. - * See https://vuejs.org/guide/components/async.html#basic-usage - * - * @return {object} The TaskBody component - */ -const TaskBody = defineAsyncComponent(() => - import('./TaskBody.vue'), -) - export default { name: 'TaskDragContainer', components: { - TaskBody, draggable, }, props: { diff --git a/src/main.js b/src/main.js index b1549a940..347d53ac7 100644 --- a/src/main.js +++ b/src/main.js @@ -24,6 +24,7 @@ import App from './App.vue' import router from './router.js' import store from './store/store.js' +import TaskBody from './components/TaskBody.vue' import AlertBoxOutline from 'vue-material-design-icons/AlertBoxOutline.vue' import CalendarRemove from 'vue-material-design-icons/CalendarRemove.vue' @@ -68,6 +69,13 @@ Vue.component('IconPulse', Pulse) // eslint-disable-next-line vue/match-component-file-name Vue.component('IconTrendingUp', TrendingUp) +/** + * We import TaskBody here globally, because we have a circular dependency + * between TaskDragContainer and TaskBody which otherwise cannot be resolved. + */ +// eslint-disable-next-line vue/match-component-file-name +Vue.component('TaskBody', TaskBody) + if (!OCA.Tasks) { /** * @namespace OCA.Tasks