Skip to content

Commit 0ff37fb

Browse files
fix: import TaskBody globally
Signed-off-by: Raimund Schlüßler <[email protected]>
1 parent aebb353 commit 0ff37fb

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

src/components/TaskDragContainer.vue

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,9 @@ import { sort } from '../store/storeHelper.js'
4141
import draggable from 'vuedraggable'
4242
import { mapGetters, mapActions, mapMutations } from 'vuex'
4343
44-
import { defineAsyncComponent } from 'vue'
45-
46-
/**
47-
* We asynchronously import here, because we have a circular dependency
48-
* between TaskDragContainer and TaskBody which otherwise cannot be resolved.
49-
* See https://vuejs.org/guide/components/async.html#basic-usage
50-
*
51-
* @return {object} The TaskBody component
52-
*/
53-
const TaskBody = defineAsyncComponent(() =>
54-
import('./TaskBody.vue'),
55-
)
56-
5744
export default {
5845
name: 'TaskDragContainer',
5946
components: {
60-
TaskBody,
6147
draggable,
6248
},
6349
props: {

src/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import App from './App.vue'
2525
import router from './router.js'
2626
import store from './store/store.js'
27+
import TaskBody from './components/TaskBody.vue'
2728

2829
import AlertBoxOutline from 'vue-material-design-icons/AlertBoxOutline.vue'
2930
import CalendarRemove from 'vue-material-design-icons/CalendarRemove.vue'
@@ -68,6 +69,13 @@ Vue.component('IconPulse', Pulse)
6869
// eslint-disable-next-line vue/match-component-file-name
6970
Vue.component('IconTrendingUp', TrendingUp)
7071

72+
/**
73+
* We import TaskBody here globally, because we have a circular dependency
74+
* between TaskDragContainer and TaskBody which otherwise cannot be resolved.
75+
*/
76+
// eslint-disable-next-line vue/match-component-file-name
77+
Vue.component('TaskBody', TaskBody)
78+
7179
if (!OCA.Tasks) {
7280
/**
7381
* @namespace OCA.Tasks

0 commit comments

Comments
 (0)