Global mixins

This commit is contained in:
Dominik Pschenitschni 2022-06-23 03:26:54 +02:00
parent 34bb66bb41
commit 7dfbfa32eb
Signed by: dpschen
GPG Key ID: B257AC0149F43A77
3 changed files with 7 additions and 12 deletions

View File

@ -67,17 +67,6 @@ app.component('x-button', Button)
app.component('modal', Modal)
app.component('card', Card)
// Mixins
import {getNamespaceTitle} from './helpers/getNamespaceTitle'
import {getListTitle} from './helpers/getListTitle'
app.mixin({
methods: {
getNamespaceTitle,
getListTitle,
},
})
app.config.errorHandler = (err, vm, info) => {
if (import.meta.env.DEV) {
console.error(err, vm, info)

View File

@ -75,6 +75,7 @@ import {mapState} from 'vuex'
import Fancycheckbox from '../../components/input/fancycheckbox.vue'
import {LOADING} from '@/store/mutation-types'
import ListCard from '@/components/list/partials/list-card.vue'
import {getNamespaceTitle} from '@/helpers/getNamespaceTitle'
import { setTitle } from '@/helpers/setTitle'
export default defineComponent({
@ -102,6 +103,7 @@ export default defineComponent({
loading: LOADING,
}),
methods: {
getNamespaceTitle,
saveShowArchivedState() {
localStorage.setItem('showArchived', JSON.stringify(this.showArchived))
},

View File

@ -444,8 +444,10 @@ import {CURRENT_LIST} from '@/store/mutation-types'
import {uploadFile} from '@/helpers/attachments'
import ChecklistSummary from '../../components/tasks/partials/checklist-summary.vue'
import CreatedUpdated from '@/components/tasks/partials/createdUpdated.vue'
import { setTitle } from '@/helpers/setTitle'
import type ListModel from '@/models/list'
import { setTitle } from '@/helpers/setTitle'
import {getNamespaceTitle} from '@/helpers/getNamespaceTitle'
import {getListTitle} from '@/helpers/getListTitle'
function scrollIntoView(el) {
if (!el) {
@ -581,6 +583,8 @@ export default defineComponent({
},
},
methods: {
getNamespaceTitle,
getListTitle,
attachmentUpload(...args) {
return uploadFile(this.taskId, ...args)
},