1
0

feat: use new async component definition

- fix see: https://v3.vuejs.org/guide/migration/async-components.html
- put async editor in separate component
This commit is contained in:
Dominik Pschenitschni
2021-08-23 21:18:29 +02:00
parent 51a740f53c
commit 421ff9a188
10 changed files with 38 additions and 74 deletions

View File

@ -69,6 +69,8 @@
</template>
<script>
import AsyncEditor from '@/components/input/AsyncEditor'
import ListService from '../../services/list'
import TaskService from '../../services/task'
import TaskModel from '../../models/task'
@ -76,8 +78,6 @@ import priorities from '../../models/constants/priorities'
import EditLabels from './partials/editLabels'
import Reminders from './partials/reminders'
import ColorPicker from '../input/colorPicker'
import LoadingComponent from '../misc/loading'
import ErrorComponent from '../misc/error'
export default {
name: 'edit-task',
@ -99,12 +99,7 @@ export default {
ColorPicker,
Reminders,
EditLabels,
editor: () => ({
component: import('../../components/input/editor'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
}),
editor: AsyncEditor,
},
props: {
task: {

View File

@ -152,22 +152,17 @@
</template>
<script>
import AsyncEditor from '@/components/input/AsyncEditor'
import TaskCommentService from '../../../services/taskComment'
import TaskCommentModel from '../../../models/taskComment'
import LoadingComponent from '../../misc/loading'
import ErrorComponent from '../../misc/error'
import {uploadFile} from '@/helpers/attachments'
import {mapState} from 'vuex'
export default {
name: 'comments',
components: {
editor: () => ({
component: import('../../input/editor'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
}),
editor: AsyncEditor,
},
props: {
taskId: {

View File

@ -30,8 +30,7 @@
</template>
<script>
import LoadingComponent from '@/components/misc/loading.vue'
import ErrorComponent from '@/components/misc/error.vue'
import AsyncEditor from '@/components/input/AsyncEditor'
import {LOADING} from '@/store/mutation-types'
import {mapState} from 'vuex'
@ -39,12 +38,7 @@ import {mapState} from 'vuex'
export default {
name: 'description',
components: {
editor: () => ({
component: import('@/components/input/editor.vue'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
}),
editor: AsyncEditor,
},
data() {
return {